#customer-auth-modal {
    width: min(35rem, calc(100% - 2rem));
    max-height: calc(100dvh - 2rem);
    margin: auto;
    padding: 0;
    overflow: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    background: var(--color-bg-surface);
    color: var(--color-text-primary);
    color-scheme: dark;
    font-family: var(--font-family-base);
}

#customer-auth-modal::backdrop {
    background: rgb(2 6 23 / 78%);
    backdrop-filter: blur(4px);
}

#customer-auth-modal :is([hidden], .hidden) {
    display: none !important;
}

.customer-auth-content {
    padding: clamp(1rem, 5vw, 2rem);
}

#auth-modal-title {
    margin: 0 0 1rem;
    color: var(--color-text-primary);
    font-size: 1.65rem;
    font-weight: 800;
    text-align: left;
}

#customer-auth-modal :is(.btn, .customer-auth-google) {
    display: flex;
    width: 100%;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    gap: .625rem;
    padding: .6rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: .875rem;
    font-weight: 650;
    background: var(--color-bg-elevated);
    color: var(--color-text-primary);
    cursor: pointer;
}

#customer-auth-modal .btn-primary {
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
}

#customer-auth-modal .btn-primary:hover {
    background: var(--color-brand-glow);
}

#customer-auth-modal :is(.customer-auth-google, .btn-secondary):hover {
    border-color: var(--color-brand-muted);
}

.customer-auth-divider,
.customer-auth-switch {
    margin-block: .85rem;
    color: var(--color-text-secondary);
    font-size: .875rem;
    text-align: center;
}

#auth-login-form > label,
.signup-step label:not(.signup-terms-consent) {
    display: block;
    margin: .85rem 0 .3rem;
    font-size: .875rem;
    font-weight: 600;
}

#customer-auth-modal :is(input:not([type="checkbox"]), select) {
    display: block;
    width: 100%;
    min-height: 2.75rem;
    padding: .65rem .85rem;
    border: 1px solid #46556d;
    border-radius: var(--radius-md);
    background: var(--color-bg-base);
    color: var(--color-text-primary);
    font: inherit;
}

#customer-auth-modal :is(button, input, select):focus-visible {
    outline: 2px solid var(--color-brand-glow);
    outline-offset: 2px;
}

.customer-auth-password {
    position: relative;
}

#customer-auth-modal .customer-auth-password input {
    padding-inline-end: 3.25rem;
}

[data-password-toggle] {
    position: absolute;
    inset-block: 0;
    inset-inline-end: .15rem;
    width: 2.75rem;
    color: var(--color-text-secondary);
}

[data-password-toggle]:hover,
.customer-auth-switch button {
    color: var(--color-brand-primary);
}

#login-btn {
    margin-top: 1rem;
}

#auth-feedback {
    margin-block: .75rem;
    padding: .7rem .85rem;
    border-radius: var(--radius-sm);
    background: var(--color-bg-elevated);
    font-size: .875rem;
}

#auth-feedback.auth-feedback-error {
    color: #fecaca;
}

#auth-signup-form .space-y-4 > * + * {
    margin-top: .7rem;
}

#auth-signup-form .flex {
    display: flex;
    gap: .5rem;
    margin-block: .75rem;
}

#auth-signup-form .step-dot {
    width: .4rem;
    height: .4rem;
    border-radius: 50%;
    background: var(--color-text-secondary);
}

#auth-signup-form .step-dot.active {
    background: var(--color-brand-primary);
}

#customer-auth-modal [aria-invalid="true"] {
    border-color: #fca5a5;
}

#customer-auth-modal .iti--separate-dial-code input[type="tel"] {
    padding-inline-start: calc(var(--phone-country-width) + .75rem);
}

.signup-terms {
    max-height: min(26rem, 45dvh);
    overflow: auto;
    padding: clamp(.875rem, 3vw, 1.25rem);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-base);
    color: var(--color-text-primary);
    text-align: start;
    line-height: 1.55;
    font-size: .9375rem;
}

.signup-terms-title,
.signup-terms-heading {
    margin-block-end: .5rem;
    font-weight: 700;
}

.signup-terms-heading {
    margin-block-start: 1rem;
    color: var(--color-brand-primary);
}

.signup-terms-consent {
    font-size: .875rem;
    line-height: 1.45;
}

.signup-terms:focus-visible {
    outline: 2px solid var(--color-brand-glow);
    outline-offset: 2px;
}

#customer-auth-modal .iti__country-list {
    max-width: min(25rem, calc(100vw - 4rem));
    max-height: 10rem;
    color: var(--color-text-primary);
    border-color: var(--color-border);
    background: var(--color-bg-surface);
}

#customer-auth-modal .iti__country-list .iti__highlight {
    background: var(--color-bg-elevated);
}

.signup-field-help {
    margin-top: .4rem;
    font-size: .8rem;
    color: var(--color-text-secondary);
}

#customer-auth-modal .iti--container .iti__country-list {
    max-width: 100%;
    max-height: 100%;
}

#signup-confirmation .btn {
    margin-top: .75rem;
}

#customer-auth-modal .signup-step {
    min-width: 0;
    text-align: start;
}

#customer-auth-modal .signup-step .phone-field {
    --phone-country-width: 6rem;
}

#customer-auth-modal .signup-step #signup-email {
    text-align: start;
}
