/* ==========================================================================
   ORESS Signup Page - Page-Specific Styles
   Base styles are in auth-base.css
   ========================================================================== */

/* ==========================================================================
   Signup-Specific Overrides
   ========================================================================== */

/* Wider card for signup form */
.auth-card {
    max-width: 580px;
}

/* Compact header for signup */
.auth-header {
    padding: 1.25rem 2rem 0.75rem;
}

.auth-logo {
    width: 42px;
    height: 42px;
    margin: 0 auto 0.5rem;
}

.auth-logo i {
    font-size: 1.125rem;
}

.auth-title {
    font-size: 1.375rem;
    margin: 0 0 0.125rem;
}

.auth-subtitle {
    font-size: 0.8rem;
}

/* Compact body padding */
.auth-body {
    padding: 0 2rem 1rem;
}

/* ==========================================================================
   Form Grid (Signup-specific)
   ========================================================================== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* ==========================================================================
   Compact Form Fields
   ========================================================================== */
.form-group {
    margin-bottom: 0.5rem;
}

.form-label {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.input-icon {
    left: 0.875rem;
    font-size: 0.875rem;
}

.form-input {
    padding: 0.5rem 0.75rem 0.5rem 2.125rem;
    font-size: 0.8125rem;
}

/* ==========================================================================
   Terms Checkbox (Signup-specific)
   ========================================================================== */
.terms-group {
    margin: 0.5rem 0;
    padding: 0.5rem 0.75rem;
    background: var(--gray-50);
    border-radius: var(--auth-radius-md);
    border: 1px solid var(--gray-100);
}

.terms-group .checkbox-label {
    align-items: flex-start;
    font-size: 0.6875rem;
    line-height: 1.4;
}

.terms-group .checkbox-input {
    width: 1rem;
    height: 1rem;
    min-width: 1rem;
    margin-top: 0.0625rem;
}

.terms-group .checkbox-input:checked::after {
    top: 1px;
    left: 4px;
    width: 4px;
    height: 7px;
}

/* ==========================================================================
   Submit Button (Signup-specific)
   ========================================================================== */
.btn-submit {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ==========================================================================
   "Check your inbox" (UI-22)
   signup.js shows this in place of the form once the account exists. It ships
   with the `hidden` attribute; the first rule keeps that attribute in charge
   whatever `display` a later rule gives the panel.
   ========================================================================== */
.signup-sent[hidden] {
    display: none;
}

.signup-sent {
    padding: 0.5rem 0 1rem;
    text-align: center;
}

.signup-sent__title {
    font-size: 1.25rem;
    margin: 0 0 0.75rem;
}

/* balance: a sentence that runs two lines breaks near its middle instead of
   leaving one word alone on the second. */
.signup-sent p {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--gray-600);
    text-wrap: balance;
}

.signup-sent strong {
    color: var(--gray-900);
    overflow-wrap: anywhere;
}

/* Not the page's main action (that is opening the email), so not the filled
   button: a bordered one. */
.signup-sent__resend {
    margin: 0.75rem 0 0.5rem;
    padding: 0.625rem 1.25rem;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-800);
    background: white;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--auth-radius-md);
    cursor: pointer;
    transition: border-color var(--transition-fast);
}

.signup-sent__resend:hover {
    border-color: var(--gray-400);
}

.signup-sent__resend:disabled {
    opacity: 0.6;
    cursor: default;
}

/* One line tall even when empty, so a message arriving moves nothing. */
.signup-sent p.signup-sent__status {
    min-height: 1.3125rem;
}

.signup-sent__status[data-status='success'] {
    color: #15803d;
}

.signup-sent__status[data-status='danger'] {
    color: #b91c1c;
}

.signup-sent p.signup-sent__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1.25rem;
    margin: 0.5rem 0 0;
}

/* The same blue as the footer's link (#1a4c68, about 8.8:1 on the card). */
.signup-sent__link {
    padding: 0;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a4c68;
    background: none;
    border: 0;
    text-decoration: none;
    cursor: pointer;
}

.signup-sent__link:hover {
    color: #11415a;
    text-decoration: underline;
}

/* ==========================================================================
   Footer (Signup-specific)
   ========================================================================== */
.auth-footer {
    padding: 0.75rem 2rem;
}

.auth-footer p {
    font-size: 0.8125rem;
}

/* ==========================================================================
   Responsive Design - Signup Specific
   ========================================================================== */
@media (max-width: 600px) {
    .auth-wrapper {
        padding: 1rem;
    }

    .auth-header {
        padding: 1.5rem 1.5rem 1rem;
    }

    /* No max-height here: the form is taller than a phone viewport and the
       card clips overflow, so capping the body hid everything past ~Password.
       The page scrolls instead. */
    .auth-body {
        padding: 0 1.5rem 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .auth-footer {
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 400px) {
    .auth-wrapper {
        padding: 0.75rem;
    }

    .auth-header {
        padding: 1.25rem 1.25rem 0.75rem;
    }

    .auth-body {
        padding: 0 1.25rem 1.25rem;
    }

    .auth-footer {
        padding: 1rem 1.25rem;
    }

    .form-input {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }
}

/* ==========================================================================
   Short screens (UI-10)
   At 1280x720 the form was 6px taller than the window, so the page had a
   scrollbar for 6px. Trim the wrapper's own breathing room there and it fits.
   ========================================================================== */
@media (min-width: 1024px) and (max-height: 760px) {
    .auth-wrapper {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
}
