/* ===== AN Shipping — Checkout Label Alignment ===== */

/* Main label container: flex row */
.an-ship-label {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 36px;
}

/* Logo container: fixed width for alignment */
.an-ship-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    min-width: 60px;
    height: 30px;
    flex-shrink: 0;
}
.an-ship-logo img {
    max-height: 28px;
    max-width: 58px;
    width: auto;
    height: auto;
    object-fit: contain;
}
/* Text fallback badge when no logo */
.an-ship-logo-text {
    background: #555;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 4px;
    padding: 4px 8px;
}

/* Carrier name + delivery badge */
.an-ship-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}
.an-ship-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

/* Estimated delivery date */
.an-ship-eta {
    display: block;
    width: 100%;
    font-size: 11px;
    color: #888;
    font-weight: 400;
    margin-top: -2px;
}

/* Delivery type badges */
.an-ship-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}
.an-ship-badge-relay {
    background: #EBF5FB;
    color: #2980B9;
    border: 1px solid #AED6F1;
}
.an-ship-badge-home {
    background: #EAFAF1;
    color: #27AE60;
    border: 1px solid #A9DFBF;
}

/* Price: push to right */
.an-ship-price {
    margin-left: auto;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Make WC shipping list items use proper layout */
.woocommerce-shipping-methods li {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
}
.woocommerce-shipping-methods li label {
    flex: 1 1 0%;
    display: flex;
    align-items: center;
    cursor: pointer;
    min-width: 0;
}
.woocommerce-shipping-methods li input[type="radio"] {
    flex-shrink: 0;
    margin: 0 6px 0 0;
}


/* ===== Relay Point Picker (Modal) ===== */

.an-relay-btn-wrap {
    flex-basis: 100%;
    width: 100%;
    margin-top: 2px;
    overflow: hidden;
}

/* Responsive modal */
@media (max-width: 768px) {
    #an-relay-modal > div {
        inset: 8px !important;
    }
    #an-modal-body {
        flex-direction: column !important;
    }
    #an-modal-list {
        width: 100% !important;
        max-height: 180px;
        border-left: none !important;
        border-top: 1px solid #eee;
    }
    .an-ship-label {
        flex-wrap: wrap;
        gap: 6px;
    }
    .an-ship-logo {
        width: 45px;
        min-width: 45px;
    }
}
