/**
 * My Account shipment tracking — keep the identifier unmistakable until the
 * carrier confirms delivery. Scoped to the FLORA account components.
 */

body.woocommerce-account .flora-account-shipments {
    --flora-track-ink: #173d2a;
    --flora-track-green: #247447;
    --flora-track-lime: #dff4d8;
    margin: 0 0 28px;
    padding: clamp(18px, 3vw, 28px);
    border: 1px solid #bdd8bd;
    border-radius: 24px;
    background:
        radial-gradient(circle at 92% 5%, rgba(178, 229, 158, 0.52), transparent 32%),
        linear-gradient(145deg, #f8fff5 0%, #eef9ea 100%);
    box-shadow: 0 16px 42px rgba(28, 79, 47, 0.12);
    color: var(--flora-track-ink);
}

body.woocommerce-account .flora-account-shipments__heading {
    margin-bottom: 18px;
}

body.woocommerce-account .flora-account-shipments__eyebrow {
    margin: 0 0 5px;
    color: var(--flora-track-green);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

body.woocommerce-account .flora-account-shipments h2 {
    margin: 0;
    color: #123b27;
    font-size: clamp(22px, 3.2vw, 32px);
    line-height: 1.08;
    letter-spacing: -0.025em;
}

body.woocommerce-account .flora-account-shipments__list {
    display: grid;
    gap: 12px;
}

body.woocommerce-account .flora-account-shipment {
    position: relative;
    overflow: hidden;
    padding: clamp(17px, 2.4vw, 24px);
    border: 2px solid #56a56f;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 9px 24px rgba(31, 103, 60, 0.15);
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

body.woocommerce-account .flora-account-shipment::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 7px;
    background: linear-gradient(180deg, #56a56f, #1f6f43);
}

body.woocommerce-account .flora-account-shipment__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

body.woocommerce-account a.flora-account-shipment__order {
    color: #225f3d;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

body.woocommerce-account a.flora-account-shipment__order:hover,
body.woocommerce-account a.flora-account-shipment__order:focus-visible {
    color: #103d26;
    text-decoration: underline;
}

body.woocommerce-account .flora-account-shipment__badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    background: var(--flora-track-lime);
    color: #174e30;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

body.woocommerce-account .flora-account-shipment__date {
    margin: 13px 0 2px;
    color: #41614d;
    font-size: 14px;
    font-weight: 650;
}

body.woocommerce-account .flora-account-shipment__label {
    margin: 18px 0 4px;
    color: #5d6f63;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

body.woocommerce-account a.flora-account-shipment__number,
body.woocommerce-account span.flora-account-shipment__number {
    display: inline-block;
    max-width: 100%;
    color: #0d4f2d;
    font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: clamp(25px, 5vw, 38px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0.055em;
    overflow-wrap: anywhere;
    text-decoration: underline;
    text-decoration-color: #91cba0;
    text-decoration-thickness: 3px;
    text-underline-offset: 6px;
}

body.woocommerce-account a.flora-account-shipment__number:hover,
body.woocommerce-account a.flora-account-shipment__number:focus-visible {
    color: #073c21;
    text-decoration-color: #247447;
}

body.woocommerce-account .flora-account-shipment__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 20px;
}

body.woocommerce-account a.flora-account-shipment__track,
body.woocommerce-account button.flora-account-shipment__copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0;
    padding: 10px 16px;
    border: 1px solid #247447;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

body.woocommerce-account a.flora-account-shipment__track {
    background: #247447;
    color: #fff;
}

body.woocommerce-account button.flora-account-shipment__copy {
    background: #fff;
    color: #225f3d;
}

body.woocommerce-account a.flora-account-shipment__track:hover,
body.woocommerce-account a.flora-account-shipment__track:focus-visible {
    background: #185d37;
    color: #fff;
}

body.woocommerce-account button.flora-account-shipment__copy:hover,
body.woocommerce-account button.flora-account-shipment__copy:focus-visible {
    background: #eef8eb;
}

/* The new top block replaces the small duplicate inside the legacy detail card. */
body.woocommerce-view-order.flora-account-tracking-enhanced .flora-order-delivery-track {
    display: none !important;
}

@media (max-width: 700px) {
    body.woocommerce-account .flora-account-shipments {
        margin-inline: -4px;
        padding: 17px 13px;
        border-radius: 18px;
    }

    body.woocommerce-account .flora-account-shipments__heading {
        margin-bottom: 16px;
    }

    body.woocommerce-account .flora-account-shipment {
        padding: 16px 14px 17px 19px;
        border-radius: 15px;
    }

    body.woocommerce-account .flora-account-shipment__topline {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    body.woocommerce-account a.flora-account-shipment__number,
    body.woocommerce-account span.flora-account-shipment__number {
        font-size: clamp(23px, 7.6vw, 32px);
        letter-spacing: 0.025em;
    }

    body.woocommerce-account .flora-account-shipment__actions,
    body.woocommerce-account a.flora-account-shipment__track,
    body.woocommerce-account button.flora-account-shipment__copy {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.woocommerce-account .flora-account-shipment {
        transition: none;
    }
}
