/**
* 2007-2025 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
*  @author    PrestaShop SA <contact@prestashop.com>
*  @copyright 2007-2025 PrestaShop SA
*  @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*
* Don't forget to prefix your containers with your own identifier
* to avoid any conflicts with others containers.
*/

/* Disable cart icon on restricted products */
article.product-miniature :has(.disable-cart) button {
    opacity: 0.5;
}

/* Product restriction alert */
.product-restriction-alert {
    margin-top: 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.product-restriction-alert i {
    margin-right: 10px;
}

/* 
 * Cart restrictions 
*/

.cart-restrictions {
    margin: 16px;
    border: solid 2px #721c24;
    /* background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect fill='none' rx='32' ry='32' stroke='%23333' stroke-width='2' stroke-dasharray='20%2c20' stroke-dashoffset='0' stroke-linecap='round'/%3e%3c/svg%3e"); */

    display: flex; 
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    border-radius: 32px;
    text-align: center;
}

.cart-restrictions p {
    margin-bottom: 0;
}

.cart-restrictions #remove-all-restricted {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 12px;
    text-transform: none;
    width: 100%;
}

.cart-restrictions #remove-all-restricted svg {
    width: 24px;
    height: 24px;
}

.cart-restrictions .cart-action-buttons {
    width: 100%;
}

/* Styling for restricted products */
.product-miniature.restricted-day .add-to-cart {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background-color: #f8f8f8 !important;
    border-color: #ddd !important;
    color: #999 !important;
}

.product-miniature.restricted-day .add-to-cart i {
    opacity: 0.5;
}

/* Styling for restriction message */
.product-restriction-message {
    margin-top: 10px;
    padding: 10px 15px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
}

/* For product page */
.product-add-to-cart.restricted-day .add-to-cart {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background-color: #f8f8f8 !important;
    border-color: #ddd !important;
    color: #999 !important;
}

/* Banner css */

.brandorderdays-banner {
    width: 100%;
    padding: 0;
    margin-bottom: 12px;
}

.brandorderdays-banner .alert {
    margin-bottom: 0;
    text-align: center;
    font-weight: 500;
}

/* Cart product messages */
/* Styling for cart product restriction message */
.cart-product-restriction-message {
    position: absolute;
    right: 0;
    top: 100%;
    /* transform: translateY(-50%); */
    width: 450px;
    padding: 8px 10px;
    color: #721c24;
    font-size: 0.8rem;
    line-height: 1.2;
    z-index: 10;
    margin-right: 10px;
    margin-top: 24px;
    text-align: left;
}

.cart-product-restriction-message p {
    width: fit-content;
    max-width: 100%;
    margin-bottom: 0;
}


/* Make sure the parent container has position relative */
.product-line-grid,
.cart-item {
    position: relative !important;
}

/* Ensure the message is visible */
.cart-product-restriction-message i {
    font-size: 14px;
    vertical-align: middle;
    margin-right: 3px;
}

/* Disabled checkout button styling */
.brand-restricted,
.btn.brand-restricted,
a.brand-restricted {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background-color: #f8f8f8 !important;
    border-color: #ddd !important;
    color: #999 !important;
    text-decoration: none !important;
}

.brand-restricted:hover,
.btn.brand-restricted:hover,
a.brand-restricted:hover {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background-color: #f8f8f8 !important;
    border-color: #ddd !important;
    color: #999 !important;
    text-decoration: none !important;
}

/* Brand restriction flag styling - looks like product flags */
.brand-restriction-flag {
    position: absolute;
    top: 50px;
    left: 10px;
    right: 10px;
    background-color: #dc3545;
    color: white;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    line-height: 1.2;
}

/* Make sure the product miniature container has relative positioning */
article.product-miniature {
    position: relative !important;
}

.product-miniature .product-description {
    position: unset !important;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .cart-product-restriction-message {
        position: static;
        transform: none;
        margin-top: 10px;
        max-width: 300px;
        transform: translateX(-80%);
    }
}