/* Banimode Cart Styles */

/* Modal Styles */
.banimode-modal {
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.banimode-modal-content {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.banimode-modal-header {
    padding: 20px 25px 15px;
    border-bottom: 1px solid #e1e1e1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.banimode-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.banimode-modal-close {
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.banimode-modal-close:hover {
    color: #333;
    background-color: #f5f5f5;
}

.banimode-modal-body {
    padding: 20px 25px 25px;
}

/* Changes Notice */
.banimode-changes-notice {
    margin-bottom: 25px;
}

.banimode-changes-notice p {
    margin: 0 0 15px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.banimode-changes-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.banimode-changes-list li {
    padding: 10px 15px;
    margin-bottom: 8px;
    background-color: #f8f9fa;
    border-left: 4px solid #007cba;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.banimode-changes-list li:last-child {
    margin-bottom: 0;
}

/* Actions */
.banimode-changes-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.banimode-changes-actions .button {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 4px;
    text-decoration: none;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.banimode-changes-actions .button-primary {
    background-color: #007cba;
    border-color: #007cba;
    color: #fff;
}

.banimode-changes-actions .button-primary:hover {
    background-color: #005a87;
    border-color: #005a87;
    color: #fff;
}

.banimode-changes-actions .button-secondary {
    background-color: #f1f1f1;
    border-color: #ccc;
    color: #333;
}

.banimode-changes-actions .button-secondary:hover {
    background-color: #e1e1e1;
    border-color: #999;
    color: #333;
}

.banimode-changes-actions .button:not(.button-primary):not(.button-secondary) {
    background-color: transparent;
    border-color: #ccc;
    color: #666;
}

.banimode-changes-actions .button:not(.button-primary):not(.button-secondary):hover {
    background-color: #f5f5f5;
    border-color: #999;
    color: #333;
}

/* Loading States */
.banimode-cart-loading {
    opacity: 0.6;
    pointer-events: none;
}

.banimode-cart-loading .banimode-changes-actions .button {
    position: relative;
}

.banimode-cart-loading .banimode-changes-actions .button:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: banimode-spin 1s linear infinite;
}

@keyframes banimode-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* RTL Support */
.rtl .banimode-modal-content {
    text-align: right;
}

.rtl .banimode-changes-list li {
    border-left: none;
    border-right: 4px solid #007cba;
}

.rtl .banimode-changes-actions {
    justify-content: flex-start;
}

/* Responsive Design */
@media (max-width: 768px) {
    .banimode-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .banimode-modal-header {
        padding: 15px 20px 10px;
    }
    
    .banimode-modal-header h3 {
        font-size: 16px;
    }
    
    .banimode-modal-body {
        padding: 15px 20px 20px;
    }
    
    .banimode-changes-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .banimode-changes-actions .button {
        width: 100%;
        min-width: auto;
    }
    
    .banimode-changes-list li {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .banimode-modal-content {
        width: 98%;
        margin: 10px;
    }
    
    .banimode-modal-header {
        padding: 12px 15px 8px;
    }
    
    .banimode-modal-body {
        padding: 12px 15px 15px;
    }
}

/* Cart Page Specific Styles */
.woocommerce-cart .banimode-cart-notice {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    color: #856404;
}

.woocommerce-cart .banimode-cart-notice p {
    margin: 0;
    font-size: 14px;
}

.woocommerce-cart .banimode-cart-notice .banimode-notice-actions {
    margin-top: 10px;
}

.woocommerce-cart .banimode-cart-notice .banimode-notice-actions .button {
    margin-left: 8px;
    font-size: 12px;
    padding: 6px 12px;
}

/* Checkout Page Specific Styles */
.woocommerce-checkout .banimode-cart-notice {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    color: #0c5460;
}

.woocommerce-checkout .banimode-cart-notice p {
    margin: 0;
    font-size: 14px;
}

/* Animation for modal appearance */
.banimode-modal {
    animation: banimode-fadeIn 0.3s ease-out;
}

.banimode-modal-content {
    animation: banimode-slideIn 0.3s ease-out;
}

@keyframes banimode-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes banimode-slideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .banimode-modal-content {
        border: 2px solid #000;
    }
    
    .banimode-changes-list li {
        border-left-color: #000;
        background-color: #fff;
    }
    
    .banimode-changes-actions .button {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .banimode-modal,
    .banimode-modal-content {
        animation: none;
    }
    
    .banimode-changes-actions .button {
        transition: none;
    }
    
    .banimode-modal-close {
        transition: none;
    }
}
