@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@300;400;500;600;700;800&family=Frank+Ruhl+Libre:wght@400;500;600;700;900&family=Noto+Serif+Hebrew:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;600;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --header-color: #ebeef3;
    --bg-color: #f2f6f9;
    --main-color: #04f9b4;
    --text-color: #07122d;
    /* can use also for bgs/cards etc. */

    --main-font: 'Assistant', 'Arial', system-ui, sans-serif;
    --display-font: 'Frank Ruhl Libre', 'Noto Serif Hebrew', serif;
    --accent-font: 'Noto Serif Hebrew', 'Frank Ruhl Libre', serif;
    --hebo-font: 'Heebo', system-ui, -apple-system, sans-serif;
    --texts-font: var(--hebo-font);
    --font-size-hero: clamp(2.5rem, 4vw, 4rem);
    --font-size-4xl: clamp(2rem, 3vw, 3rem);
    --font-size-3xl: clamp(1.65rem, 2.4vw, 2.3rem);
    --font-size-2xl: clamp(1.35rem, 2vw, 1.8rem);
    --font-size-xl: 1.25rem;
    --font-size-lg: 1.1rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --transition-fast: 180ms ease;
    --surface-color: rgba(19, 26, 41, 0.96);
    --border-color: rgba(255, 255, 255, 0.14);
    --muted-color: rgba(235, 245, 244, 0.74);
    --color-gold: #f6d77a;

    --primary-color: #04f9b4;
    --background-dark: #121212;
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--main-font);
    font-weight: 400;
    line-height: 1.6;
    color: white;
    background-color: var(--bg-color);
    min-height: 100vh;
    overflow-x: hidden;
    /* Header height is ~13vh but at least 70px; use safe safe value */
    padding-top: clamp(70px, 13vh, 110px);
}

*:focus,
*:focus-visible {
    outline: none;
}

.header {
    position: fixed;
    border-radius: 0 0 16px 16px;
    top: 0;
    left: 0;
    right: 0;
    margin-inline: auto;
    z-index: 1000;
    background: var(--header-color);
    border-bottom: 1px solid rgba(135, 156, 175, 0.402);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(0.5rem, 2vw, 1.5rem);
    min-height: clamp(60px, 10vh, 88px);
    width: 100%;
    padding: 0 3vh 0 3vh;
    position: relative;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
    color: var(--text-color);
    transition: transform .25s ease;
}

.brand:hover {
    transform: translateY(-1px);
}

.brand-logo-frame {
    position: relative;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    border-radius: 8px;
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1.70);
    transform-origin: center;
    transition: transform .25s ease, filter .25s ease;
}

.is-header-skeleton {
    overflow: hidden;
    background: rgba(7, 18, 45, 0.07);
}

.is-header-skeleton::after,
.header-identity-skeleton__name::after,
.header-identity-skeleton__avatar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.62) 48%, transparent 76%);
    transform: translateX(-120%);
    animation: header-skeleton-shimmer 1.15s ease-in-out infinite;
}

.is-header-skeleton .brand-logo {
    opacity: .06;
}

.brand:hover .brand-logo {
    transform: scale(1.30);
    filter: drop-shadow(0 10px 24px rgba(4, 249, 180, .3));
}

.brand-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5px;
}

.brand-title {
    font-family: var(--main-font);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--text-color);
    line-height: 20px;
}

.brand-title::after {
    content: "";
    display: block;
    width: 42px;
    height: 3px;
    margin-top: 7px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--main-color), transparent);
}

.brand-subtitle {
    display: block;
    font-family: var(--hebo-font);
    font-size: .82rem;
    color: rgba(7, 18, 45, .58);
    font-weight: 500;
    letter-spacing: .02em;
    margin-top: 2px;
}

.header-nav {
    flex: 1;
    min-width: 0;
    position: relative;
}

.nav-list {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    gap: clamp(0.4rem, 1.5vw, 1.2rem);
    flex-wrap: wrap;
    list-style: none;
}

.nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: clamp(0.45rem, 1.2vw, 0.75rem) clamp(0.65rem, 1.8vw, 1.2rem);
    border-radius: 12px;
    color: var(--text-color);
    letter-spacing: 0.09em;
    font-family: var(--hebo-font);
    font-size: clamp(0.85rem, 1.8vw, 1rem);
    white-space: nowrap;
    transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.nav-item:hover,
.nav-item:focus-visible {
    background: linear-gradient(135deg, #01f9b6, #03fab9);
    color: #0c1330;
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.18);
    transform: translateY(-1px);
}

.nav-item::after {
    content: "";
    position: absolute;
    bottom: 4px;
    left: 54%;
    width: 72px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--main-color), transparent);
    opacity: 0;
    transform: translateX(-50%) scaleX(0);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

.nav-item.is-ni-active::after {
    opacity: 1;
    transform: translateX(-50%) scaleX(1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: clamp(0.4rem, 1.5vw, 0.85rem);
    flex-shrink: 0;
}


.header-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: clamp(0.55rem, 1.5vw, 0.85rem) clamp(0.65rem, 2vw, 1.25rem);
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: clamp(0.8rem, 1.8vw, 1rem);
    transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
    text-decoration: none;
    color: var(--text-color);
    white-space: nowrap;
}

.header-btn:hover,
.header-btn:focus-visible {
    transform: translateY(-1px);
}

.header-cta {
    background: linear-gradient(135deg, #01f9b6, #03fab9);
    color: #0c1330;
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.18);
}

.header-btn:not(.header-cta) {
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-color);
}

.header-toggle {
    display: none;
    appearance: none;
    background: transparent;
    border: none;
    font-size: 1.4rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 8px;
    flex-shrink: 0;
}

.header-cta {
    background: linear-gradient(135deg, #01f9b6, #03fab9);
    color: #0c1330;
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(16, 185, 129, 0.18);
}

.header-btn:not(.header-cta) {
    background: rgba(15, 23, 42, 0.04);
    color: var(--text-color);
}

.header-user-avatar {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.cta-login {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    padding: clamp(0.55rem, 1.5vw, 0.85rem) clamp(0.65rem, 2vw, 1.25rem);

}

.cta-login.is-header-identity-loading {
    width: 108px;
    min-height: 46px;
    pointer-events: none;
}

.header-identity-skeleton {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.header-identity-skeleton__name,
.header-identity-skeleton__avatar {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(7, 18, 45, 0.09);
}

.header-identity-skeleton__name {
    width: 54px;
    height: 12px;
    border-radius: 4px;
}

.header-identity-skeleton__avatar {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    border-radius: 50%;
}

@keyframes header-skeleton-shimmer {
    100% {
        transform: translateX(120%);
    }
}

@media (prefers-reduced-motion: reduce) {

    .is-header-skeleton::after,
    .header-identity-skeleton__name::after,
    .header-identity-skeleton__avatar::after {
        animation: none;
    }
}


.nav-item__icon {
    opacity: 0;
    display: none !important;
}

@media (max-width: 970px) {
    .login-system {
        overflow-y: visible !important;
        /* height: 550px !important; */
        padding-top: 1vh !important;
        paddding-bottom: 0 !important;
        padding-left: 3vh !important;
        padding-right: 3vh !important;
        margin-top: -3.7vh !important;
    }

    #login-form input {
        height: 40px !important;
        border-radius: 6px !important;

    }

    .express-form,
    .delivery-details,
    .package-summary,
    .address-grid {
        grid-template-columns: 1fr;
    }

    .package-options {
        grid-template-columns: 1fr;
    }

    .submit-delivery {
        justify-self: stretch;
    }

    /* ─── Mobile Header: brand-only ─────────────────────────────────────────
       The bottom nav (YouTube-style) handles all navigation on mobile.
       The header becomes a slim, clean brand-only bar.
    ─────────────────────────────────────────────────────────────────────── */
    .header-inner {
        padding: 0.45rem 1rem;
        min-height: 56px;
        justify-content: center;
    }

    /* Hide the hamburger toggle completely — bottom nav replaces it */
    .header-nav {
        display: none !important;
    }

    /* Hide the CTA / login actions — account is in the bottom nav */
    .header-actions {
        display: none !important;
    }

    /* Brand: centered, show logo + name */
    .brand {
        position: static;
        transform: none;
        gap: 0.6rem;
        justify-content: center;
    }

    .brand:hover {
        transform: none;
    }

    .brand-copy {
        display: flex !important;
    }

    .brand-title {
        font-size: 13px;
    }

    .brand-subtitle {
        font-size: 0.72rem;
    }

    .brand-logo {
        transform: scale(1.4);
    }

    .brand-logo-frame {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
    }
}


.page-main {
    background-color: var(--bg-color);
    text-align: center;
}


.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(40px, 8vw, 80px) clamp(16px, 5vw, 30px);
}

.hero p {
    color: rgb(98, 99, 99);
    font-size: clamp(0.95rem, 2.5vw, 1.25rem);
    font-weight: 500;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.38);
    max-width: 600px;
}

.hero h1 {
    font-family: var(--hebo-font), system-ui, sans-serif;
    font-weight: 850;
    font-size: clamp(2rem, 6.5vw, 58px);
    line-height: 1.15;
    letter-spacing: -0.5px;
    word-spacing: 2px;
    color: #0F172A;
    max-width: 750px;
    margin: 0 auto 24px auto;
    white-space: normal;
    text-shadow: none;
}


.trackyourshit {
    width: min(650px, 92vw);
    /* Remove fixed height — let content breathe */
    padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 4vw, 2.5rem);
    margin: clamp(1rem, 3vw, 1.5rem) auto 0;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    color: var(--text-color, #0F172A);
}

.trackyourshit h4 {
    margin: 0 0 clamp(10px, 2vw, 16px) 0;
    font-family: var(--hebo-font), system-ui, sans-serif;
    font-size: clamp(16px, 3vw, 20px);
    font-weight: 700;
    text-align: right;
    color: #0F172A;
}

.flex-in-track {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex-wrap: nowrap;
    /* keep side-by-side on all sizes */
}

#track-form {
    display: flex;
    flex: 1;
    margin: 0;
}

#track-form input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid #E2E8F0;
    background: #F8FAFC;
    color: #111;
    outline: none;
    text-align: right;
    font-size: 16px;
    transition: all 0.2s ease;
}

#track-form input:focus {
    border-color: #00F7B8;
    box-shadow: 0 0 0 3px rgba(0, 247, 184, 0.2);
    background: #ffffff;
}

/*  */

.animated-btn-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: clamp(130px, 30vw, 180px);
    padding: clamp(0.7rem, 2vw, 0.95rem) clamp(1rem, 3vw, 1.7rem);
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #ffffff;
    font-weight: 700;
    font-size: clamp(0.9rem, 2.5vw, 1.15rem);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 34px rgba(37, 211, 102, 0.28);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.animated-btn-msg span {
    display: inline-block;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.animated-btn-msg::after {
    content: '\f232';
    font-family: "Font Awesome 6 Brands";
    font-weight: 700;
    position: absolute;
    top: 50%;
    right: -40%;
    transform: translate(50%, -50%);
    font-size: 1.6rem;
    color: #ffffff;
    opacity: 0;
    transition: all 0.2s ease;
}

.animated-btn-msg:hover span,
.animated-btn-msg:focus-visible span {
    transform: translateX(-150%);
    opacity: 0;
}

.animated-btn-msg:hover::after,
.animated-btn-msg:focus-visible::after {
    right: 50%;
    transform: translate(50%, -50%);
    opacity: 1;
}

/*  end*/

.animated-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: clamp(130px, 30vw, 180px);
    padding: clamp(0.7rem, 2vw, 0.95rem) clamp(1rem, 3vw, 1.7rem);
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #01f9b6, #03fab9);
    color: #0c1330;
    font-weight: 700;
    font-size: clamp(0.9rem, 2.5vw, 1.15rem);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 34px rgba(16, 185, 129, 0.28);
}

.animated-btn span {
    display: inline-block;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.animated-btn::after {
    content: '\f48b';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: -30%;
    transform: translate(-50%, -50%);
    font-size: 1.6rem;
    color: white;
}

.animated-btn:hover span,
.animated-btn:focus-visible span {
    transform: translateX(-150%);
    opacity: 0;
}

.animated-btn:hover::after,
.animated-btn:focus-visible::after {
    animation: drive-truck 1.5s ease-in-out forwards;
}


/* ---------------------------------- */
.track-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: clamp(100px, 28vw, 180px);
    padding: clamp(0.7rem, 2vw, 0.95rem) clamp(0.8rem, 2.5vw, 1.7rem);
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #01f9b6, #03fab9);
    color: #0c1330;
    font-weight: 700;
    font-size: clamp(0.85rem, 2.2vw, 1.15rem);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 34px rgba(16, 185, 129, 0.28);
}

/* the text inside */
.track-submit span {
    display: inline-block;
    transition: transform 0.4s ease, opacity 0.3s ease;
}

.track-submit::after {
    content: '\f48b';
    /* fa-truck-fast */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: -30%;
    transform: translate(-50%, -50%);
    font-size: 1.6rem;
    color: white;
}

.track-submit:hover span,
.track-submit:focus-visible span {
    transform: translateX(-150%);
    opacity: 0;
}

.track-submit:hover::after,
.track-submit:focus-visible::after {
    animation: drive-truck 1.5s ease-in-out forwards;
}

@keyframes drive-truck {
    0% {
        left: -20%;
    }

    40% {
        left: 50%;
    }

    60% {
        left: 50%;
    }

    100% {
        left: 120%;
    }

}


#tracking-result {

    font-size: 1rem;
    color: var(--text-color);
    text-align: right;
}

#tracking-result h3 {
    font-family: var(--display-font);
    font-size: 1.55rem;
    margin-bottom: 0.75rem;
}

#tracking-result p {
    margin-bottom: 0.45rem;
    color: rgba(235, 245, 244, 0.88);
}

#tracking-result strong {
    color: #ffffff;
}

.trackyourshit,
.hero,
section,
#track {
    scroll-margin-top: 110px;
}

@media (max-width: 480px) {
    .cta-delivery {
        padding: 0.55rem 0.85rem;
        font-size: 0.82rem;
    }

    .cta-login {
        padding: 0.55rem 0.75rem;
        font-size: 0.82rem;
    }
}

@media (max-width: 640px) {
    .delivery-order {
        width: min(100% - 20px, 1120px);
        padding: 16px;
        border-radius: 16px;
    }

    .delivery-order h2 {
        font-size: clamp(1.4rem, 5vw, 1.8rem);
    }

    .form-column,
    .delivery-details,
    .package-selector,
    .package-summary {
        padding: 12px;
        border-radius: 12px;
    }

    .package-option {
        min-height: 100px;
    }

    /* Track box stacks on tiny screens */
    .flex-in-track {
        flex-wrap: nowrap;
    }

    #track-form input {
        font-size: 14px;
        padding: 12px 10px;
    }
}

/* ----------------------
     new delivery
     ---------------------- */
.form-group-triple {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .form-group-triple {
        grid-template-columns: 1fr;
    }
}

.autocomplete-wrapper {
    position: relative;
}

.address-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    left: 0;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.3rem;
}

.address-suggestions.is-open {
    display: block;
}

.address-suggestion-btn {
    width: 100%;
    text-align: right;
    background: transparent;
    border: none;
    color: #333333;
    padding: 0.65rem 0.8rem;
    font-family: inherit;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.address-suggestion-btn:hover {
    background: #f0f7ff;
    color: #3b82f6;
}

.address-status {
    padding: 0.8rem;
    text-align: center;
    color: #888888;
    font-size: 0.85rem;
}

.new-delivery {
    position: fixed;
    /* fixed so it stays on screen even when page scrolls */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--header-color, #ffffff);
    padding: clamp(1.25rem, 4vw, 2.5rem) clamp(1rem, 3.5vw, 2rem);
    width: min(650px, 95vw);
    /* never overflows on small phones */
    max-height: min(90vh, 700px);
    z-index: 10000;
    overflow-y: auto;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    direction: rtl;
    display: none;
}

.new-delivery h3 {
    text-align: center;
    font-size: clamp(1.25rem, 4vw, 1.6rem);
    color: var(--text-color, #333);
    font-family: var(--hebo-font, sans-serif);
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.delivery-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(0.75rem, 2.5vw, 1.2rem);
}

.delivery-form .full-width {
    grid-column: span 2;
}

.delivery-address-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(.75rem, 2.5vw, 1.2rem)
}

.delivery-address-heading {
    color: var(--text-color);
    font-weight: 800;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: .35rem
}

.delivery-address-heading small {
    display: block;
    font-weight: 400;
    color: #475569
}

.delivery-type-options {
    border: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    color: var(--text-color)
}

.delivery-type-options legend {
    font-weight: 700;
    margin-bottom: .5rem
}

.delivery-type-option {
    display: flex;
    align-items: center;
    gap: .65rem;
    border: 2px solid #b8c7d1;
    border-radius: 12px;
    padding: .85rem;
    cursor: pointer;
    background: #fff
}

.money-option {
    /* width: 50%; */

}

.flex-this-shitt {
    border: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    width: 100%;
    color: var(--text-color);

    .money-option {
        width: 100%;

    }

}

.delivery-type-option:has(input:checked) {
    border-color: var(--main-color);
    box-shadow: 0 0 0 2px rgba(4, 249, 180, .14)
}

.delivery-type-option i,
.add-delivery-stop i {
    color: #00b987
}

.delivery-type-option input {
    accent-color: #00b987;
    width: 18px;
    height: 18px
}

.delivery-type-option span {
    font-weight: 700
}

.delivery-type-option small {
    display: block;
    font-weight: 400;
    color: #475569
}

.add-delivery-stop {
    border: 2px dashed #00b987;
    background: #f4fffb;
    border-radius: 10px;
    padding: .75rem;
    color: #0f172a;
    font: 700 1rem var(--hebo-font);
    cursor: pointer
}

.additional-stop {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
    gap: .75rem;
    margin: .6rem 0;
    padding: .8rem;
    border: 1px solid #b8c7d1;
    border-radius: 10px;
    color: var(--text-color)
}

.additional-stop button {
    border: 0;
    background: #fee2e2;
    border-radius: 8px;
    padding: .7rem;
    cursor: pointer
}

#future-delivery-schedule[hidden] {
    display: none
}

.delivery-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.delivery-form .form-group label {
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    font-weight: 600;
    color: var(--text-color, #444);
}

.delivery-form .form-group input,
.delivery-form .form-group select,
.delivery-form .form-group textarea {
    width: 100%;
    padding: clamp(0.6rem, 2vw, 0.75rem) clamp(0.75rem, 2.5vw, 1rem);
    border: 1.5px solid rgba(128, 128, 128, 0.612);
    border-radius: 8px;
    font-size: clamp(0.85rem, 2.2vw, 0.95rem);
    font-family: inherit;
    background-color: #fafafa;
    transition: all 0.2s ease-in-out;
    box-sizing: border-box;
}

.delivery-form .form-group input:focus,
.delivery-form .form-group select:focus,
.delivery-form .form-group textarea:focus {
    outline: none;
    border-color: #01f9b6;
    background-color: #fff;
    box-shadow: 0 0 0 1.9px rgba(59, 246, 206, 0.4);
}

.delivery-form .form-group input::placeholder,
.delivery-form .form-group select::placeholder,
.delivery-form .form-group textarea::placeholder {
    color: #aaa;
}

.delivery-form .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.delivery-form .form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    background-size: 1em;
}

.delivery-form .form-actions {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
    display: flex;
    justify-content: center;
}

.delivery-form .form-actions button {
    width: 100%;
    max-width: 250px;
    padding: 0.85rem;
    cursor: pointer;
}

.address-format-hint {
    color: var(--text-color);
}

@media (max-width: 600px) {
    .new-delivery {
        padding: 1.25rem 1rem;
        border-radius: 14px;
    }

    .delivery-form {
        grid-template-columns: 1fr !important;
    }

    .delivery-form .full-width {
        grid-column: span 1 !important;
    }

    .delivery-address-row,
    .delivery-type-options,
    .additional-stop {
        grid-template-columns: 1fr
    }
}


/* ==========================================
   User Dropdown Menu
   ========================================== */
.user-menu-wrapper {
    position: relative;
    display: inline-block;
}

.user-dropdown {
    font-family: var(--hebo-font);
    direction: rtl;
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 230px;
    padding: 1rem;
    background: var(--header-color);
    border: 1px solid rgba(172, 185, 182, 0.25);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    /* box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 20px rgba(1, 249, 182, 0.1); */
    /* backdrop-filter: blur(16px); */
    /* -webkit-backdrop-filter: blur(16px); */
    z-index: 0;

    .dropdown-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        /* padding-bottom: 0.5rem; */

        .welcome-txt {
            color: var(--text-color);
            font-family: var(--hebo-font);
            font-weight: 600;
            font-size: 0.95rem;
            text-shadow: 0 0 5px rgba(0, 0, 0, 0.724);

            strong {
                white-space: nowrap;
                color: var(--main-color, #01f9b6);
            }
        }

        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
            border: 1.2px solid #a3a3a3;
        }

        .user-avatar:hover {
            cursor: pointer;
        }
    }

    .user-badge {
        display: flex;
        margin-top: 1vh;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        background: #10f4b37d;
        color: var(--text-color);
        /* font-size: 6px; */
        letter-spacing: 2px;
        font-family: var(--hebo-font);
        font-weight: 700;
        border-radius: 9px;
        box-shadow: 0 0 7px var(--main-color);
        border: 1px solid rgb(1, 249, 183);
    }

    .dropdown-divider {
        border: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin: 0.6rem 0;
    }

    .dropdown-links {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 0.4rem;

        li a {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.65rem 0.8rem;
            color: rgba(255, 255, 255, 0.85);
            text-decoration: none;
            color: var(--text-color);
            font-family: var(--hebo-font);
            font-weight: 600;
            font-size: 0.95rem;
            border-radius: 10px;
            transition: all 0.2s ease;


            i {
                font-size: 1rem;
                color: var(--main-color, #01f9b6);
                width: 18px;
                text-align: center;
            }

            &:hover {
                background: linear-gradient(to right, var(--main-color) 50%, rgba(1, 249, 182, 0.15) 80%, rgba(1, 249, 183, 0.013) 90%, rgba(1, 249, 183, 0.02) 100%);
                color: #15364c;
                transform: translateX(-3px);
            }
        }
    }

    .logout-btn {
        font-family: var(--hebo-font);
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.6rem;
        padding: 0.65rem;
        background: rgba(255, 107, 107, 0.12);
        color: #ff6b6b;
        border: 1px solid rgba(255, 107, 107, 0.25);
        border-radius: 10px;
        font-size: 0.9rem;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.2s ease;

        &:hover {
            background: rgba(255, 107, 107, 0.25);
            color: #ffffff;
        }
    }

    /* ── Mobile Account Drawer ── */
    @media (max-width: 970px) {
        /* Reset absolute positioning from header */
        position: fixed;
        inset: auto 0 calc(64px + env(safe-area-inset-bottom, 0px)) 0;
        width: 100%;
        max-width: none;
        border-radius: 24px 24px 0 0;
        border: none;
        border-top: 1px solid rgba(7, 18, 45, 0.10);
        background: var(--header-color, #ebeef3);
        box-shadow: 0 -16px 60px rgba(7, 18, 45, 0.14);
        padding: 0.5rem 1.2rem 1.5rem;
        z-index: 999;

        /* Drawer Handle */
        &::before {
            content: '';
            display: block;
            width: 40px;
            height: 4px;
            border-radius: 999px;
            background: rgba(7, 18, 45, 0.18);
            margin: 10px auto 12px;
        }

        .dropdown-header {
            padding: 0.5rem 0;
        }
    }
}

/* ----------------------
     Login / Auth styles
     Uses IDs/classes from public/js/login-system.js
     ---------------------- */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 20;
    display: none;
}

.login-system {
    font-family: var(--hebo-font);
    direction: rtl;
    width: 90%;
    /* max-height: 520px; */
    max-width: 420px;
    padding: 5px clamp(1.5rem, 4vw, 2.5rem);
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(1, 249, 183, 0.3);
    border-radius: 22px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(1, 249, 182, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #ffffff;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -43.5%);
    z-index: 21;
    display: none;
    overflow: hidden;

    h2 {
        font-family: var(--hebo-font);
        font-size: clamp(1.8rem, 3vw, 2.2rem);
        font-weight: 800;
        margin-bottom: 1.5rem;
        text-align: center;
        letter-spacing: -0.5px;
        color: #ffffff;
    }

    #login-form {
        display: flex;
        flex-direction: column;
        gap: 0.9rem;

        .login-input {
            font-family: var(--hebo-font);
            width: 100%;
            padding: 0.9rem 1.1rem;
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            background: rgba(255, 255, 255, 0.06);
            color: #ffffff;
            font-size: 0.98rem;
            text-align: right;
            direction: rtl;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            box-sizing: border-box;

            &::placeholder {
                color: rgba(255, 255, 255, 0.45);
                font-family: var(--hebo-font);
            }

            &:focus {
                outline: none;
                background: rgba(255, 255, 255, 0.1);
                border-color: var(--main-color);
                box-shadow: 0 0 18px rgba(1, 249, 182, 0.25);
                transform: translateY(-2px);
            }

            &.displayed-input {
                display: none;
            }
        }

        .login-submit {
            font-family: var(--hebo-font);
            margin-top: 0.6rem;
            background: linear-gradient(135deg, var(--main-color), #01f9b6);
            color: #0c1330;
            padding: 0.95rem 1.5rem;
            border-radius: 12px;
            border: none;
            font-size: 1.05rem;
            font-weight: 800;
            cursor: pointer;
            transition: all 0.25s ease;
            box-shadow: 0 8px 22px rgba(1, 249, 182, 0.22);

            &:hover {
                transform: translateY(-2px);
                box-shadow: 0 12px 28px rgba(1, 249, 182, 0.38);
                filter: brightness(1.08);
            }

            &:active {
                transform: translateY(0);
            }
        }
    }


    .social-divider {
        display: flex;
        align-items: center;
        text-align: center;
        margin: 1.5rem 0 1rem;
        color: rgba(255, 255, 255, 0.4);
        font-size: 0.9rem;

        &::before,
        &::after {
            content: '';
            flex: 1;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        span {
            padding: 0 15px;
        }
    }

    .social-login-buttons {
        display: flex;
        gap: 1rem;
        margin-bottom: 1rem;

        .social-btn {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.6rem;
            padding: 0.85rem;
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            background: rgba(255, 255, 255, 0.05);
            color: #ffffff;
            font-family: var(--hebo-font);
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.25s ease;

            i {
                font-size: 1.1rem;
            }

            &:hover {
                background: rgba(255, 255, 255, 0.12);
                transform: translateY(-2px);
            }

            &.google-btn:hover {
                border-color: rgba(234, 67, 53, 0.6);
                box-shadow: 0 4px 15px rgba(234, 67, 53, 0.15);
                color: #ea4335;
            }

            &.apple-btn:hover {
                border-color: rgba(255, 255, 255, 0.6);
                box-shadow: 0 4px 15px rgba(255, 255, 255, 0.15);
            }
        }
    }


    #login-stage {
        margin-top: 1.25rem;
        color: rgba(255, 255, 255, 0.65);
        text-align: center;
        font-size: 0.93rem;

        #switch-login-stage {
            color: var(--main-color);
            font-weight: 700;
            cursor: pointer;
            margin-right: 0.4rem;
            text-decoration: underline;
            text-underline-offset: 4px;
            transition: color 0.2s ease;

            &:hover {
                color: #ffffff;
            }
        }
    }

    #login-result {
        margin-top: 1rem;
        min-height: 1.5rem;
        text-align: center;
        font-size: 0.92rem;
        font-weight: 700;
        padding: 0.5rem 0.8rem;
        border-radius: 8px;
        transition: all 0.3s ease;
        opacity: 0;

        &.error,
        &.success {
            opacity: 1;
        }

        &.error {
            color: #ff6b6b;
            background: rgba(255, 107, 107, 0.12);
            border: 1px solid rgba(255, 107, 107, 0.25);
        }

        &.success {
            color: var(--main-color);
            background: rgba(1, 249, 182, 0.12);
            border: 1px solid rgba(1, 249, 182, 0.25);
        }
    }
}

@media (max-width: 640px) {
    .brand {
        /* right: -30%; */
        /* VERIFIED(TD-05): the current bottom navigation is covered by tests/site-browser.test.cjs. */
        /* top: 10vh; */
    }

    .login-system {
        /* height: 465px; */
        margin-top: -3vh;
        padding: 1.1vh 4vh;
        padding-bottom: 0vh !important;
        border-radius: 16px;
    }

    #login-form input {
        width: 95%;
        text-align: center !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.323);
        border-radius: 3.2px !important;
        height: 30px !important;
    }
}



/* RTL Base */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--texts-font);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0;
}

h1 {
    font-size: var(--font-size-hero);
    letter-spacing: 0;
}

h2 {
    font-size: var(--font-size-4xl);
}

h3 {
    font-size: var(--font-size-3xl);
}

h4 {
    font-size: var(--font-size-2xl);
}

h5 {
    font-size: var(--font-size-xl);
}

h6 {
    font-size: var(--font-size-lg);
}

p {
    margin-bottom: var(--space-md);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

ul,
ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}




/* VERIFIED(TD-06): the price preview is a required customer feature; retain its styles. */
.delivery-price-preview {
    display: grid;
    gap: 4px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ccd7e5;
    border-radius: 14px;
    background: #f7faff;
    color: #34445c;
    text-align: right
}

.delivery-price-preview strong {
    font-size: 24px;
    color: #0d6b5b
}

.delivery-price-preview span,
.delivery-price-preview small {
    font-size: 12px;
    line-height: 1.5;
}


.delivery-price-preview[data-state=loading] {
    opacity: .7
}

.delivery-price-preview[data-state=error] {
    border-color: #d69b93;
    color: #8a3027
}

#future-delivery-schedule small {
    color: var(--text-color)
}

/* Booking panel: one readable flow from recipient through confirmation. */
.new-delivery {
    --booking-accent: #14c7a0;
    width: min(700px, calc(100vw - 40px));
    max-height: calc(100dvh - 32px);
    padding: 0;
    border: 1px solid #e1e5e5;
    border-radius: 32px;
    background: #fffdfa;
    box-shadow: 0 32px 90px rgba(13, 37, 58, .26);
    overscroll-behavior: contain;
}

.new-delivery .delivery-form-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 48px clamp(28px, 6vw, 72px) 28px;
    background: transparent;
    color: #17263e;
}

.new-delivery .delivery-form-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: #9df5d8;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .03em;
}

.new-delivery .delivery-form-header h3 {
    margin: 0;
    color: #17263e;
    text-align: right;
    font-size: clamp(1.7rem, 3.8vw, 2.3rem);
    line-height: 1.25;
    font-weight: 500;
}

.new-delivery .delivery-form-header p {
    margin: 10px 0 0;
    color: #64748b;
    line-height: 1.5;
    font-size: 1rem;
}

.new-delivery .delivery-form-close {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border: 1px solid #dfe4e4;
    border-radius: 14px;
    background: #fff;
    color: #587087;
    font-size: 1.2rem;
}

.new-delivery .delivery-form-close:hover,
.new-delivery .delivery-form-close:focus-visible {
    background: #f4f7f7;
    outline: 2px solid var(--booking-accent);
    outline-offset: 2px;
}

.new-delivery .delivery-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 20px;
    padding: 12px clamp(28px, 6vw, 72px) 34px;
}

.new-delivery .delivery-form>*,
.new-delivery .delivery-address-row>* {
    min-width: 0;
}

.new-delivery .delivery-form .full-width {
    grid-column: 1 / -1;
}

.new-delivery .delivery-step {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 16px 0 2px;
    padding: 12px 15px;
    border: 1px solid #d6e7e5;
    border-radius: 16px;
    background: #edf7f4;
    color: #143a43;
}

.new-delivery .delivery-step:first-of-type {
    margin-top: 0;
}

.new-delivery .delivery-step-number {
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    height: 36px;
    border-radius: 12px;
    background: #087e68;
    color: #fff;
    font: 800 .9rem Arial, sans-serif;
}

.new-delivery .delivery-step strong {
    display: block;
    font-size: 1rem;
    line-height: 1.35;
}

.new-delivery .delivery-step small {
    display: block;
    margin-top: 2px;
    color: #48636a;
    line-height: 1.45;
}

.new-delivery .delivery-address-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.new-delivery .delivery-form .form-group label,
.new-delivery .delivery-type-options legend {
    color: #5f6f82;
    font-weight: 800;
    font-size: .93rem;
}

.new-delivery .delivery-form .form-group label small {
    font-weight: 400;
}

.new-delivery .delivery-form .form-group input {
    min-height: 46px;
    border: 1px solid #d6e0e1;
    border-radius: 14px;
    background: #fbfcfc;
    color: #183540;
}

.new-delivery .delivery-form .form-group input:focus-visible {
    border-color: var(--booking-accent);
    box-shadow: 0 0 0 3px rgba(20, 199, 160, .16);
}

.new-delivery .delivery-type-options {
    min-width: 0;
    margin: 8px 0 0;
    padding: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.new-delivery .delivery-type-option {
    min-width: 0;
    min-height: 58px;
    border: 1px solid #d6e0e1;
    border-radius: 14px;
    padding: 9px 14px;
    background: #fbfcfc;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.new-delivery .delivery-type-option:has(input:checked) {
    border: 1px solid var(--booking-accent);
    background: rgba(20, 199, 160, .10);
    box-shadow: none;
}

.new-delivery .delivery-type-option:focus-within {
    outline: 2px solid var(--booking-accent);
    outline-offset: 2px;
}

.new-delivery .delivery-type-option span {
    min-width: 0;
    line-height: 1.4;
}

.new-delivery .delivery-type-option small {
    margin-top: 3px;
    line-height: 1.45;
}

.new-delivery .delivery-type-options>small {
    grid-column: 1 / -1;
    line-height: 1.55;
}

.new-delivery .delivery-optional {
    padding: 0;
    border: 0;
    border-top: 1px solid #dbe1e2;
    border-radius: 0;
}

.new-delivery .delivery-optional summary {
    min-height: 40px;
    color: #5f6f82;
    font-weight: 800;
}

.new-delivery .delivery-optional summary small {
    color: #8491a0;
}

.new-delivery .delivery-optional[open] {
    padding: 0 0 12px;
}

.new-delivery .delivery-optional[open] summary {
    margin-bottom: 8px;
}

.new-delivery .add-delivery-stop {
    margin-top: 8px;
    border: 1px solid #d6e0e1;
    border-radius: 14px;
    padding: 11px;
    background: #fbfcfc;
    color: #5f6f82;
}

.new-delivery #future-delivery-schedule {
    padding: 16px;
    border: 1px solid #cfe3db;
    border-radius: 16px;
    background: #f0faf5;
}

.new-delivery #future-delivery-schedule small {
    line-height: 1.55;
    color: #385b58;
}

.new-delivery #scheduledAt {
    color-scheme: light;
}

.new-delivery .delivery-form .form-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    align-items: stretch;
    gap: 12px;
    margin-top: 4px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.new-delivery .form-actions>* {
    grid-column: 1 / -1;
    min-width: 0;
    margin: 0;
}

.new-delivery .form-actions .delivery-type-options {
    margin: 0;
}

.new-delivery .form-actions .delivery-type-option {
    min-height: 48px;
}

.new-delivery .form-actions .delivery-price-preview {
    box-sizing: border-box;
    overflow-wrap: anywhere;
}

.new-delivery .delivery-payment-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #35556a;
    font-size: .82rem;
    line-height: 1.45;
}

.new-delivery .delivery-payment-note i {
    margin-top: .2em;
    color: var(--booking-accent);
}

.new-delivery .delivery-form .form-actions #submit-new-delivery {
    width: 100%;
    max-width: none;
    min-height: 52px;
    border-radius: 14px;
    background: var(--booking-accent);
    color: #092e30;
    font-size: 1.05rem;
    box-shadow: 0 10px 20px rgba(20, 199, 160, .18);
}

.new-delivery #submit-new-delivery::after {
    display: none;
}

.new-delivery #submit-new-delivery:hover span,
.new-delivery #submit-new-delivery:focus-visible span {
    transform: none;
    opacity: 1;
}

.new-delivery .form-actions .delivery-form-notice {
    text-align: center;
    overflow-wrap: anywhere;
}

@media (max-width: 600px) {
    .new-delivery {
        width: calc(100vw - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 22px;
    }

    .new-delivery .delivery-form-header {
        padding: 30px 20px 18px;
    }

    .new-delivery .delivery-form {
        grid-template-columns: minmax(0, 1fr) !important;
        padding: 12px 20px 24px;
    }

    .new-delivery .delivery-form .full-width {
        grid-column: 1 / -1 !important;
    }

    .new-delivery .delivery-address-row,
    .new-delivery .additional-stop {
        grid-template-columns: minmax(0, 1fr);
    }

    .new-delivery .delivery-type-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .new-delivery .delivery-form .form-actions {
        padding: 0;
    }
}

@media (max-width: 380px) {
    .new-delivery .delivery-type-options {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .new-delivery .delivery-type-option {
        transition: none;
    }
}

/* Compact booking layout, with extra room reserved for the fields people use. */
.new-delivery {
    width: min(760px, calc(100vw - 32px));
    border-radius: 26px;
}

.new-delivery .delivery-form-header {
    padding: 25px 34px 12px;
}

.new-delivery .delivery-form-header h3 {
    font-size: 1.8rem;
}

.new-delivery .delivery-form-header p {
    margin-top: 4px;
    font-size: .9rem;
}

.new-delivery .delivery-form {
    gap: 9px 16px;
    padding: 10px 34px 20px;
}

.new-delivery .delivery-form .form-group {
    gap: 3px;
}

.new-delivery .delivery-form .form-group label,
.new-delivery .delivery-type-options legend {
    font-size: .84rem;
    line-height: 1.25;
}

.new-delivery .delivery-form .form-group input,
.new-delivery .delivery-form .form-group select,
.new-delivery .delivery-form .form-group textarea {
    min-height: 43px;
    padding: 7px 12px;
    border: 1px solid #d6e0e1;
    border-radius: 11px;
    background: #fbfcfc;
    color: #183540;
    font-size: .92rem;
}

.new-delivery .delivery-form .form-group textarea {
    height: 43px;
    min-height: 43px;
    resize: vertical;
}

.new-delivery .delivery-form>.form-group:has(#fullName) {
    order: 1;
}

.new-delivery .delivery-form>.form-group:has(#phone) {
    order: 2;
}

.new-delivery .booking-email {
    grid-column: auto !important;
    order: 3;
}

.new-delivery .delivery-form>.form-group:has(#content) {
    order: 4;
}

.new-delivery .delivery-form>.delivery-address-row {
    order: 5;
}

.new-delivery .delivery-address-row {
    gap: 16px;
}

.new-delivery .address-format-hint {
    display: none;
    font-size: .72rem;
    line-height: 1.25;
}

.new-delivery .autocomplete-wrapper:focus-within .address-format-hint {
    display: block;
}

.new-delivery .booking-pickup {
    order: 6;
}

.new-delivery .booking-stops {
    order: 7;
}

.new-delivery .delivery-form>.delivery-type-options {
    order: 8;
    border-top: 1px solid #dbe1e2;
    padding-top: 10px;
    margin-top: 2px;
}

.new-delivery #future-delivery-schedule {
    order: 9;
    padding: 0;
    border: 0;
    background: transparent;
}

.new-delivery .booking-note {
    order: 10;
}

.new-delivery .form-actions {
    order: 11;
}

.new-delivery .delivery-optional {
    border-top: 0;
}

.new-delivery .delivery-optional summary {
    min-height: 31px;
    line-height: 1.2;
    font-size: .84rem;
}

.new-delivery .delivery-type-option {
    min-height: 42px;
    padding: 6px 10px;
    gap: 8px;
}

.new-delivery .delivery-type-option input {
    width: 14px;
    height: 14px;
}

.new-delivery .delivery-type-option small {
    display: none;
}

.new-delivery .delivery-type-option:has(input:checked) {
    color: #087b65;
}

.new-delivery .delivery-type-option:has(input:checked) i {
    color: #087b65;
}

.new-delivery .booking-schedule {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    padding: 0;
    border: 0;
    background: transparent;
}

.new-delivery .booking-schedule[hidden] {
    display: none;
}

.new-delivery .booking-schedule small {
    grid-column: 1 / -1;
    color: #5f6f82;
    font-size: .73rem;
}

.new-delivery .booking-schedule #scheduledAt {
    display: none;
}

.new-delivery .delivery-form .form-actions {
    gap: 7px;
    margin-top: 0;
}

.new-delivery .booking-payment {
    border-top: 0;
    padding-top: 0;
}

.new-delivery .form-actions .delivery-type-option {
    min-height: 38px;
}

.new-delivery .form-actions .delivery-price-preview {
    padding: 5px 8px;
    font-size: .78rem;
    line-height: 1.3;
}

.new-delivery .delivery-payment-note {
    font-size: .75rem;
    line-height: 1.25;
}

.new-delivery .delivery-form .form-actions #submit-new-delivery {
    min-height: 46px;
    padding: 8px;
    font-size: .98rem;
}

.new-delivery .form-actions .delivery-form-notice {
    font-size: .69rem;
    line-height: 1.25;
}

@media (max-width: 600px) {
    .new-delivery {
        width: calc(100vw - 12px);
        border-radius: 19px;
    }

    .new-delivery .delivery-form-header {
        padding: 20px 16px 8px;
    }

    .new-delivery .delivery-form-header h3 {
        font-size: 1.5rem;
    }

    .new-delivery .delivery-form {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px 10px;
        padding: 8px 16px 16px;
    }

    .new-delivery .delivery-form .full-width {
        grid-column: 1 / -1 !important;
    }

    .new-delivery .booking-email {
        grid-column: 1 / -1 !important;
    }

    .new-delivery .delivery-address-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .new-delivery .booking-schedule {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .new-delivery .delivery-form .form-group label {
        font-size: .76rem;
    }

    .new-delivery .delivery-form .form-group input,
    .new-delivery .delivery-form .form-group select,
    .new-delivery .delivery-form .form-group textarea {
        font-size: .84rem;
    }
}

.login-reset-link {
    display: block;
    margin: 12px auto 0;
    padding: 8px;
    border: 0;
    background: transparent;
    color: #087d61;
    font: 600 .9rem Heebo, Arial, sans-serif;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer
}

.login-reset-link:focus-visible {
    outline: 2px solid #04c995;
    outline-offset: 3px
}

/* Registration consent stays readable alongside the existing login form. */
#registration-consent-label {
    font-size: .9rem;
    line-height: 1.6;
    text-align: right;
    margin: 12px 0;
}

#registration-consent-label[hidden] {
    display: none;
}

#login-form #registration-consent {
    display: inline-block;
    width: 20px;
    height: 20px;
    padding: 0;
    margin: 0 0 0 8px;
    vertical-align: middle;
    accent-color: #b91c1c;
}

#registration-consent-label a {
    text-decoration: underline;
}