/**
 * BB-WooAutomate Mini-Cart Frontend Styles
 * 
 * Modern cart sidebar design based on Woostify theme patterns
 * @version 2.0.0
 */

/* =============================================
   OVERLAY
   ============================================= */
.bbwa-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 99998;
}

.bbwa-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =============================================
   FLOATING CART BUTTON
   ============================================= */
#bbwa-floating-cart {
    position: fixed;
    z-index: 99999;
}

#bbwa-floating-cart .bbwa-cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

#bbwa-floating-cart .bbwa-cart-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

#bbwa-floating-cart .bbwa-cart-btn svg {
    display: block;
    transition: transform 0.2s ease;
}

#bbwa-floating-cart .bbwa-cart-btn img {
    width: 50%;
    height: 50%;
    object-fit: contain;
}

/* Badge */
#bbwa-floating-cart .bbwa-cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    animation: bbwa-badge-pulse 0.3s ease;
}

#bbwa-floating-cart .bbwa-cart-badge:not(.has-items) {
    display: none;
}

@keyframes bbwa-badge-pulse {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* =============================================
   CART SIDEBAR
   ============================================= */
#bbwa-cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    background: #fff;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
}

#bbwa-cart-sidebar.open {
    right: 0;
}

/* =============================================
   SIDEBAR HEADER
   ============================================= */
.bbwa-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e5e5;
    flex-shrink: 0;
}

.bbwa-sidebar-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.bbwa-header-count {
    font-weight: 400;
    color: #666;
}

.bbwa-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.bbwa-close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

/* =============================================
   CART ITEMS
   ============================================= */
.bbwa-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

/* Loading Spinner */
.bbwa-loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #999;
}

.bbwa-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f0f0f0;
    border-top-color: #333;
    border-radius: 50%;
    animation: bbwa-spin 0.8s linear infinite;
    margin-bottom: 12px;
}

@keyframes bbwa-spin {
    to { transform: rotate(360deg); }
}

/* Empty Cart */
.bbwa-empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #999;
}

.bbwa-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.bbwa-empty-text {
    font-size: 16px;
    margin: 0 0 20px;
}

.bbwa-continue-shopping {
    display: inline-block;
    padding: 10px 24px;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.2s ease;
}

.bbwa-continue-shopping:hover {
    background: #555;
    color: #fff;
}

/* Cart Item */
.bbwa-cart-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.bbwa-cart-item:last-child {
    border-bottom: none;
}

.bbwa-cart-item.updating {
    opacity: 0.5;
    pointer-events: none;
}

/* Close Button (X icon) */
.bbwa-close-btn {
    position: absolute;
    top: 10px;
    right: 0;
    width: 24px;
    height: 24px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    z-index: 2;
}

.bbwa-close-btn:hover {
    opacity: 1;
}

.bbwa-close-btn svg {
    width: 16px;
    height: 16px;
    stroke: #666;
}

.bbwa-close-btn:hover svg {
    stroke: #e74c3c;
}

/* Item Image */
.bbwa-item-image {
    flex-shrink: 0;
}

.bbwa-item-image a {
    display: block;
}

.bbwa-item-image img {
    display: block;
    object-fit: cover;
}

/* Item Info */
.bbwa-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.bbwa-item-name {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

.bbwa-item-name a {
    color: inherit;
    text-decoration: none;
}

.bbwa-item-name a:hover {
    color: #007cba;
}

.bbwa-item-price {
    font-size: 13px;
    color: #666;
}

/* Quantity Controls Row - contains qty and line total */
.bbwa-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}

/* Quantity Controls */
.bbwa-qty-controls {
    display: flex;
    align-items: center;
    gap: 0;
}

.bbwa-qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.bbwa-qty-btn:hover {
    opacity: 0.8;
}

.bbwa-qty-btn.minus {
    border-radius: 4px 0 0 4px;
}

.bbwa-qty-btn.plus {
    border-radius: 0 4px 4px 0;
}

/* Trash icon when qty is 1 */
.bbwa-qty-btn.trash {
    border-radius: 4px 0 0 4px;
    color: #e74c3c;
}

.bbwa-qty-btn.trash:hover {
    background: #fde8e8 !important;
    color: #c0392b;
}

.bbwa-qty-btn.trash svg {
    width: 14px;
    height: 14px;
}

.bbwa-qty-value {
    width: 36px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    background: #fff;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
}

/* Remove Button - No longer used (replaced by Delete link) */
.bbwa-remove-btn {
    display: none;
}

/* Item Actions (Delete | Save | Share) */
.bbwa-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.bbwa-action-divider {
    color: #ccc;
    font-size: 12px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.bbwa-action-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    color: #007185;
    cursor: pointer;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.bbwa-action-btn:hover {
    color: #c7511f;
    text-decoration: underline;
}

.bbwa-delete-btn:hover {
    color: #e74c3c;
}

.bbwa-action-btn.copied {
    color: #27ae60;
}

.bbwa-action-btn.error {
    color: #e74c3c;
}

.bbwa-save-btn:hover {
    color: #f39c12;
}

.bbwa-save-btn.saved {
    color: #27ae60;
}

.bbwa-save-btn.saving {
    opacity: 0.6;
    pointer-events: none;
}

/* Line Total */
.bbwa-line-total {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: right;
    white-space: nowrap;
}

/* =============================================
   SIDEBAR FOOTER
   ============================================= */
.bbwa-sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid #e5e5e5;
    flex-shrink: 0;
}

/* Coupon Section - Collapsible */
.bbwa-coupon-wrapper {
    margin-bottom: 12px;
}

.bbwa-coupon-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 8px 0;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    transition: color 0.2s ease;
}

.bbwa-coupon-toggle:hover {
    color: #333;
}

.bbwa-coupon-toggle svg {
    transition: transform 0.2s ease;
}

.bbwa-coupon-toggle.active svg {
    transform: rotate(180deg);
}

.bbwa-coupon-section {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e5e5e5;
}

.bbwa-coupon-section.open {
    display: flex;
}

.bbwa-coupon-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.bbwa-coupon-input:focus {
    outline: none;
    border-color: #333;
}

.bbwa-coupon-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.bbwa-coupon-btn:hover {
    opacity: 0.9;
}

.bbwa-coupon-message {
    width: 100%;
    font-size: 13px;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 4px;
    display: none;
}

.bbwa-coupon-message.success {
    color: #155724;
    background: #d4edda;
}

.bbwa-coupon-message.error {
    color: #721c24;
    background: #f8d7da;
}

/* Applied Coupons */
.bbwa-applied-coupons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.bbwa-coupon-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.bbwa-coupon-remove {
    cursor: pointer;
    font-weight: 700;
}

.bbwa-coupon-remove:hover {
    color: #c62828;
}

/* Totals - Collapsible */
.bbwa-totals-wrapper {
    padding: 12px 0;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 16px;
}

.bbwa-totals-header {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 0;
    transition: background 0.2s ease;
}

.bbwa-totals-header:hover {
    background: #f9f9f9;
    margin: 0 -12px;
    padding: 8px 12px;
    border-radius: 4px;
}

.bbwa-totals-header .bbwa-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bbwa-totals-chevron {
    transition: transform 0.2s ease;
}

.bbwa-totals-wrapper.open .bbwa-totals-chevron {
    transform: rotate(180deg);
}

.bbwa-totals-details {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px dashed #e5e5e5;
}

.bbwa-totals-wrapper.open .bbwa-totals-details {
    display: flex;
}

.bbwa-subtotal-row,
.bbwa-tax-row,
.bbwa-shipping-row,
.bbwa-discount-row,
.bbwa-coupon-discount-row,
.bbwa-cart-discount-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
}

.bbwa-discount-row {
    color: #28a745;
}

.bbwa-coupon-discount-row,
.bbwa-cart-discount-row {
    color: #d63384;
}

.bbwa-coupon-discount-row .bbwa-value,
.bbwa-cart-discount-row .bbwa-value {
    text-align: right;
    margin-left: auto;
}

.bbwa-shipping-row .bbwa-value {
    text-align: right;
}

.bbwa-free-shipping {
    color: #28a745;
    font-weight: 600;
}

.bbwa-discount-row .bbwa-value::before {
    content: '-';
}

/* Applied Coupon Tags */
.bbwa-applied-coupons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
}

.bbwa-applied-coupon-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.bbwa-applied-coupon-tag .bbwa-coupon-code {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bbwa-applied-coupon-tag .bbwa-remove-coupon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.15);
    color: inherit;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.bbwa-applied-coupon-tag .bbwa-remove-coupon:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Buttons - Same Row */
.bbwa-buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.bbwa-view-cart-btn,
.bbwa-checkout-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bbwa-view-cart-btn:hover,
.bbwa-checkout-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 480px) {
    #bbwa-cart-sidebar {
        width: 100%;
        right: -100%;
        /* Fix for mobile browsers with dynamic address bar */
        height: 100%;
        height: 100dvh;
        max-height: -webkit-fill-available;
    }

    .bbwa-sidebar-header {
        padding: 14px 16px;
    }

    .bbwa-cart-items {
        padding: 12px 16px;
        /* Ensure proper scrolling with fixed footer */
        min-height: 0;
        flex: 1 1 auto;
        overflow-y: auto;
    }

    .bbwa-sidebar-footer {
        padding: 14px 16px;
        /* Ensure footer is always visible */
        flex-shrink: 0;
        position: relative;
        z-index: 10;
        background: #fff;
    }

    .bbwa-item-image img {
        width: 60px !important;
        height: 60px !important;
    }
    
    /* Item actions responsive */
    .bbwa-qty-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }
    
    .bbwa-qty-controls {
        flex-shrink: 0;
    }
    
    .bbwa-line-total {
        flex: 1;
        text-align: right;
    }
    
    .bbwa-item-actions {
        padding-left: 0;
    }
    
    .bbwa-action-btn {
        font-size: 11px;
    }
}

/* =============================================
   SCROLLBAR
   ============================================= */
.bbwa-cart-items::-webkit-scrollbar {
    width: 6px;
}

.bbwa-cart-items::-webkit-scrollbar-track {
    background: transparent;
}

.bbwa-cart-items::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.bbwa-cart-items::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* =============================================
   CART UPDATING STATE
   ============================================= */
.bbwa-cart-updating .bbwa-cart-items {
    position: relative;
}

.bbwa-cart-updating .bbwa-cart-items::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =============================================
   MILESTONE PROGRESS BAR
   ============================================= */
.bbwa-milestone-section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-bottom: 1px solid #e5e5e5;
    min-height: 80px;
}

.bbwa-milestone-message {
    display: block !important;
    font-size: 14px;
    color: #333;
    margin-bottom: 12px;
    text-align: center;
    line-height: 1.4;
}

.bbwa-milestone-message strong {
    color: #e74c3c;
}

.bbwa-milestone-complete {
    color: #28a745;
    font-weight: 600;
}

/* Progress Bar Container */
.bbwa-milestone-bar {
    position: relative;
    height: 10px;
    min-height: 10px;
    background: #e5e5e5 !important;
    border-radius: 5px;
    margin-bottom: 28px;
    overflow: visible !important;
    display: block !important;
}

/* Progress Fill */
.bbwa-milestone-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #8BC34A 100%) !important;
    border-radius: 5px;
    transition: width 0.5s ease-out;
    min-height: 10px;
}

/* Tier Markers */
.bbwa-milestone-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    background: #fff !important;
    border: 3px solid #e5e5e5;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.bbwa-milestone-marker:hover {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.bbwa-milestone-marker.reached {
    background: #4CAF50 !important;
    border-color: #4CAF50 !important;
    animation: bbwa-marker-pop 0.4s ease;
}

.bbwa-marker-icon {
    font-size: 16px;
    line-height: 1;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.bbwa-marker-icon img.bbwa-tier-icon-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 2px;
}

@keyframes bbwa-marker-pop {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.3); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* Milestone Labels */
.bbwa-milestone-labels {
    position: relative;

/* ==========================================================================
   WCAG 2.1 ACCESSIBILITY - Keyboard Focus States
   ========================================================================== */

/* Screen reader only text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* High contrast focus ring for all interactive elements */
.bbwa-cart-btn:focus,
.bbwa-cart-btn:focus-visible,
.bbwa-header-cart-btn:focus,
.bbwa-header-cart-btn:focus-visible,
.bbwa-close-btn:focus,
.bbwa-close-btn:focus-visible {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0, 95, 204, 0.3);
}

/* Remove default outline when custom focus is applied */
.bbwa-cart-btn:focus:not(:focus-visible),
.bbwa-header-cart-btn:focus:not(:focus-visible),
.bbwa-close-btn:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

/* Checkout buttons in mini-cart */
.bbwa-buttons a:focus,
.bbwa-buttons a:focus-visible,
.bbwa-buttons button:focus,
.bbwa-buttons button:focus-visible {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0, 95, 204, 0.3);
}

/* Product remove button */
.bbwa-product-remove:focus,
.bbwa-product-remove:focus-visible {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0, 95, 204, 0.3);
}

/* Quantity buttons */
.bbwa-qty-btn:focus,
.bbwa-qty-btn:focus-visible {
    outline: 2px solid #005fcc;
    outline-offset: 1px;
    box-shadow: 0 0 0 3px rgba(0, 95, 204, 0.3);
}

/* Coupon input and button */
.bbwa-coupon-input:focus,
.bbwa-coupon-input:focus-visible {
    outline: 2px solid #005fcc;
    outline-offset: -2px;
    border-color: #005fcc;
}

.bbwa-coupon-apply:focus,
.bbwa-coupon-apply:focus-visible,
.bbwa-coupon-toggle:focus,
.bbwa-coupon-toggle:focus-visible {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0, 95, 204, 0.3);
}

/* Links in mini-cart */
.bbwa-product-title:focus,
.bbwa-product-title:focus-visible {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
    text-decoration: underline;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bbwa-cart-btn:focus,
    .bbwa-header-cart-btn:focus,
    .bbwa-close-btn:focus,
    .bbwa-buttons a:focus,
    .bbwa-buttons button:focus {
        outline: 3px solid currentColor;
        outline-offset: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .bbwa-cart-btn,
    .bbwa-header-cart-btn,
    #bbwa-cart-sidebar,
    .bbwa-overlay {
        transition: none !important;
        animation: none !important;
    }
}
    height: 20px;
    margin-top: 4px;
}

.bbwa-milestone-label {
    position: absolute;
    transform: translateX(-50%);
    font-size: 11px;
    color: #999;
    white-space: nowrap;
}

.bbwa-milestone-label.reached {
    color: #4CAF50;
    font-weight: 600;
}

/* Confetti Canvas */
#bbwa-confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999999;
}

/* Milestone Tooltip */
.bbwa-milestone-marker[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    margin-bottom: 8px;
    z-index: 10;
}

/* Responsive */
@media (max-width: 480px) {
    .bbwa-milestone-section {
        padding: 12px 16px;
    }

    .bbwa-milestone-message {
        font-size: 13px;
    }

    .bbwa-milestone-marker {
        width: 24px;
        height: 24px;
    }

    .bbwa-marker-icon {
        font-size: 12px;
    }

    .bbwa-milestone-label {
        font-size: 10px;
    }
}

/* =============================================
   HIDE FLOATING CART ON CART/CHECKOUT PAGES (Mobile)
   Avoids conflict with theme's sticky checkout button
   ============================================= */
@media (max-width: 768px) {
    body.woocommerce-cart #bbwa-floating-cart,
    body.woocommerce-checkout #bbwa-floating-cart {
        display: none !important;
    }
}

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */
.bbwa-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 14px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 99999;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-width: 90%;
    font-size: 14px;
    font-weight: 500;
}

.bbwa-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.bbwa-toast-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: #fff;
}

.bbwa-toast-error {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    color: #fff;
}

.bbwa-toast-info {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    color: #fff;
}

.bbwa-toast-icon {
    font-size: 18px;
    line-height: 1;
}

.bbwa-toast-message {
    line-height: 1.4;
}

/* Item Close Button (separate from header close) */
.bbwa-item-close-btn {
    position: absolute;
    width: 24px;
    height: 24px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    z-index: 2;
}

.bbwa-item-close-btn:hover {
    opacity: 1;
}
