/**
 * Proxima Market - Floating Shipping Banner Styles
 */

.proxima-shipping-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: calc(100% - 32px);
    max-width: 640px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 50px;
    background: #ffffff;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.proxima-shipping-banner.is-hidden {
    transform: translate(-50%, 120%) !important;
    opacity: 0 !important;
    pointer-events: none;
}

.proxima-shipping-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px 10px 14px;
}

/* Badge */
.proxima-banner-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 30px;
    background: #fff3e6;
    color: #e65100;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.proxima-shipping-banner-inner[data-status="tier-free"] .proxima-banner-badge {
    background: #e8f5e9;
    color: #2e7d32;
}

.proxima-badge-icon svg {
    display: block;
}

/* Text */
.proxima-banner-text {
    flex: 1 1 auto;
    font-size: 13.5px;
    color: #222222;
    line-height: 1.35;
}

.proxima-banner-text strong {
    color: #e65100;
    font-weight: 600;
}

.proxima-shipping-banner-inner[data-status="tier-free"] .proxima-banner-text strong {
    color: #2e7d32;
}

/* Actions */
.proxima-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.proxima-banner-cart-btn {
    display: inline-flex;
    align-items: center;
    background: #1a1a1a;
    color: #ffffff !important;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s ease, transform 0.15s ease;
}

.proxima-banner-cart-btn:hover {
    background: #e65100;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.proxima-shipping-banner-inner[data-status="tier-free"] .proxima-banner-cart-btn:hover {
    background: #2e7d32;
}

.proxima-banner-close-btn {
    background: transparent;
    border: none;
    color: #888888;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 50%;
    transition: color 0.2s ease, background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.proxima-banner-close-btn:hover {
    color: #111111;
    background: rgba(0, 0, 0, 0.05);
}

/* Hide banner when Woodmart side panels, mini-cart, or mobile menu are active */
body.woodmart-cart-opened .proxima-shipping-banner,
body.wd-cart-opened .proxima-shipping-banner,
body.woodmart-mobile-menu-opened .proxima-shipping-banner,
body.wd-mobile-menu-opened .proxima-shipping-banner,
body.woodmart-sticky-btn-shown .proxima-shipping-banner,
body.wd-sticky-btn-shown .proxima-shipping-banner {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translate(-50%, 100%) !important;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Responsive & Woodmart Mobile Toolbar adjustment */
@media (max-width: 768px) {
    .proxima-shipping-banner {
        bottom: 72px;
        /* Positioned safely above Woodmart mobile bottom toolbar */
        width: calc(100% - 20px);
        border-radius: 16px;
        bottom: calc(64px + env(safe-area-inset-bottom, 0px));
        /* Positioned safely above Woodmart mobile bottom toolbar */
        width: calc(100% - 16px);
        border-radius: 14px;
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
    }

    .proxima-shipping-banner-inner {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 12px;
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 6px 8px;
        padding: 9px 12px;
    }

    .proxima-banner-text {
        font-size: 12.5px;
        order: 2;
        width: 100%;
    }

    .proxima-banner-badge {
        order: 1;
        padding: 4px 10px;
        font-size: 11.5px;
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        justify-self: start;
        padding: 3px 8px;
        font-size: 11px;
    }

    .proxima-banner-actions {
        order: 1;
        margin-left: auto;
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        justify-self: end;
        gap: 6px;
    }

    .proxima-banner-text {
        grid-column: 1 / 3;
        grid-row: 2 / 3;
        font-size: 12px;
        line-height: 1.3;
    }

    .proxima-banner-cart-btn {
        padding: 5px 11px;
        font-size: 11.5px;
        padding: 4px 10px;
        font-size: 11px;
    }

    .proxima-banner-close-btn {
        width: 32px;
        height: 32px;
        font-size: 20px;
        min-width: 32px;
        min-height: 32px;
    }
}