/* ETA Display Box */
.pathao-eta-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #86efac;
    border-left: 4px solid #22c55e;
    border-radius: 8px;
    padding: 10px 15px;
    margin-top: 10px;
    margin-bottom: 5px;
    font-size: 14px;
    color: #14532d;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pathao-eta-text {
    line-height: 1.4;
    text-align: left;
    width: 100%;
    font-weight: 600;
}

.pathao-eta-text strong {
    color: #15803d;
    font-weight: 500;
}

/* --- CRITICAL FIX FOR CART PAGE --- */

/* 1. Override Theme's Flex NoWrap to allow wrapping */
.woocommerce .cart_totals ul#shipping_method li {
    -ms-flex-wrap: wrap !important;
    flex-wrap: wrap !important;
}

/* 2. Force ETA Box to break to a new line and take full width */
.woocommerce-cart .pathao-eta-box {
    display: flex !important;
    width: 100% !important;
    flex: 1 1 100% !important;
    /* Takes up 100% of the flex container */
    margin-top: 8px !important;
    clear: both !important;
}

/* Cart Page: Shipping Rates Breakdown */
.pathao-cart-rates {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f4ff 100%);
    border: 1px solid #c7d2fe;
    border-left: 4px solid #6366f1;
    border-radius: 8px;
    padding: 14px 16px 10px;
    margin-top: 10px;
    margin-bottom: 5px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
    flex: 1 1 100% !important;
}

.pathao-rate-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    color: #334155;
    padding: 7px 0;
    line-height: 1.5;
}

.pathao-rate-row:not(:last-child) {
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

/* Colored dot indicators */
.pathao-rate-dot {
    width: 9px;
    height: 9px;
    min-width: 9px;
    border-radius: 50%;
    margin-top: 5px;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.04);
}

.pathao-dot-green {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15);
}

.pathao-dot-amber {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
}

.pathao-dot-red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

.pathao-rate-label {
    flex: 1;
}

.pathao-rate-label strong {
    color: #1e293b;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.pathao-rate-label small {
    color: #64748b;
    font-weight: 500;
    font-size: 12.5px;
}

/* The wc_price output is inline — style the amount wrapper */
.pathao-rate-label .woocommerce-Price-amount {
    font-weight: 400;
    color: #475569;
}

.pathao-cart-rates-note {
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
    text-align: left;
    width: 100%;
    flex: 1 1 100% !important;
    padding: 6px 0 2px;
    background: linear-gradient(90deg, #7c3aed, #a855f7, #6366f1, #7c3aed);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pathaoGradientFlow 4s ease infinite;
}

@keyframes pathaoGradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Hide the note on checkout page — it only makes sense on the cart */
.woocommerce-checkout .pathao-cart-rates-note {
    display: none !important;
}

/* Dropdown Field Tweaks */
#billing_pathao_city_field .select2-selection,
#billing_pathao_zone_field .select2-selection,
#billing_pathao_area_field .select2-selection {
    height: 40px;
    line-height: 40px;
}

/* Loading State */
.pathao-loading {
    opacity: 0.6;
    pointer-events: none;
    cursor: wait;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Force Hide Standard WooCommerce Fields (City/State) */
/* The plugin handles syncing these values in the background */
#billing_city_field,
#billing_state_field,
#shipping_city_field,
#shipping_state_field,
#billing_postcode_field,
#shipping_postcode_field {
    display: none !important;
}