/* ============================================================================
   notary-auth.css  (v3)
   Design system for Notary Signup / Sign In / Forgot Password.

   Structure: ONE centered card on a plain neutral page - no split screen,
   no separate full-width header band (that caused an overflow bug on
   narrow screens in v2). All branding lives inside the card itself.

   Palette
     --n-maroon        #8e0709   brand colour
     --n-maroon-dark   #6e0506   hover/pressed, gradient depth
     --n-maroon-tint   #fbebec   light fill for icon chips, callouts
     --n-ink           #24211f   body text
     --n-muted         #756f6c   secondary text
     --n-line          #e3ddda   borders
     --n-paper         #ffffff   card / field surface
     --n-canvas        #f2efec   page background
     --n-gold          #d69a1f   CTA glow accent

   Fields use a bordered, rounded "icon chip + stacked label/value" style
   (small coloured icon square on the left, label above value on the
   right) rather than a plain underline - closer to the reference design
   the client approved, adapted to our maroon palette.
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --n-maroon: #8e0709;
    --n-maroon-dark: #6e0506;
    --n-maroon-tint: #fbebec;
    --n-ink: #24211f;
    --n-muted: #756f6c;
    --n-line: #e3ddda;
    --n-paper: #ffffff;
    --n-canvas: #f2efec;
    --n-gold: #d69a1f;
}

* {
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body:has(.notary-auth-page) {
    background: var(--n-canvas);
}

.notary-auth-page {
    min-height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: clamp(1rem, 4vw, 3rem) 1rem;
}

.notary-auth-card {
    width: 100%;
    max-width: 980px;
    background: var(--n-paper);
    border-radius: 18px;
    box-shadow: 0 24px 55px -30px rgba(142, 7, 9, 0.4);
    padding: clamp(1.5rem, 4vw, 2.75rem);
    height: fit-content;
}

.notary-auth-card--narrow {
    max-width: 560px;
}

/* --- Card header: logo + department + page title, all inside the card --- */
.notary-auth-header {
    text-align: center;
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--n-line);
}

.notary-auth-header img {
    width: 400px;
    max-width: 100%;
    object-fit: contain;
    border: 0px solid var(--n-line);
    padding: 6px;
    background: #fff;
    margin-bottom: 2rem;
}

.notary-auth-header__dept {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    color: var(--n-muted);
    margin-bottom: 0.35rem;
}

.notary-auth-header h1 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: clamp(1.35rem, 3vw, 1.7rem);
    color: var(--n-maroon);
    margin: 0 0 0.3rem;
}

.notary-auth-header p {
    color: var(--n-muted);
    font-size: 0.92rem;
    margin: 0;
}

/* --- Fields: icon chip + stacked label/value, bordered rounded box --- */
.notary-field {
    margin-bottom: 1rem;
}

.notary-field-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1.5px solid var(--n-line);
    border-radius: 10px;
    padding: 0.5rem 0.85rem;
    background: var(--n-paper);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    min-width: 0;
}

.notary-field-box:focus-within {
    border-color: var(--n-maroon);
    box-shadow: 0 0 0 3px rgba(142, 7, 9, 0.1);
}

.notary-field.is-invalid .notary-field-box {
    border-color: #b3261e;
}

.notary-field-box__icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--n-maroon-tint);
    color: var(--n-maroon);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.notary-field-box__value {
    flex: 1 1 auto;
    min-width: 0;
}

.notary-field-box__value label {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--n-muted);
    margin-bottom: 0.1rem;
}

.notary-field-box__value label .req {
    color: var(--n-maroon);
    margin-left: 2px;
}

.notary-field-box .form-control,
.notary-field-box .form-select {
    /* !important here is deliberate and narrowly scoped: a global stylesheet
       (rev.css) used elsewhere in this app applies
       ".form-control, .form-select { border: ... !important; }" site-wide.
       Since that rule also carries !important, only an equally-forceful rule
       can override it on these three pages. Scoping it to
       ".notary-field-box .form-control" (a class that only exists on
       Signup/Sign In/Forgot Password) means this has no effect anywhere
       else rev.css is loaded. */
    border: none !important;
    padding: 0;
    background: transparent;
    font-size: 0.95rem;
    color: var(--n-ink);
    width: 100%;
    box-shadow: none !important;
}

.notary-field-box .form-control:focus,
.notary-field-box .form-select:focus {
    border: none !important;
    box-shadow: none;
}

.notary-field-box .form-select {
    appearance: auto;
}

.notary-field .form-text {
    font-size: 0.76rem;
    color: var(--n-muted);
    margin-top: 0.3rem;
    margin-left: 0.2rem;
}

.notary-field .notary-error {
    display: none;
    font-size: 0.76rem;
    color: #b3261e;
    margin-top: 0.3rem;
    margin-left: 0.2rem;
}

.notary-field.is-invalid .notary-error {
    display: block;
}

/* Password field needs room for the eye toggle button */
.notary-field-box__value .auth-pass-inputgroup {
    position: relative;
    display: flex;
    align-items: center;
}

.notary-field-box__value .password-addon {
    position: absolute;
    right: -0.5rem;
    padding: 0.2rem 0.4rem;
    color: var(--n-muted);
}

.notary-field-box__value input.password-input {
    padding-right: 1.75rem;
}

/* --- Appointment Letter upload --- */
.notary-upload {
    border: 1.5px dashed var(--n-line);
    border-radius: 10px;
    padding: 0.65rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    min-width: 0;
    height: 100%;
}

.notary-upload:hover,
.notary-upload.is-dragover {
    border-color: var(--n-maroon);
    background: var(--n-maroon-tint);
}

.notary-upload input[type="file"] {
    display: none;
}

.notary-upload__icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--n-maroon-tint);
    color: var(--n-maroon);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.notary-upload__text {
    min-width: 0;
}

.notary-upload__filename {
    font-size: 0.85rem;
    color: var(--n-ink);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notary-upload__hint {
    font-size: 0.72rem;
    color: var(--n-muted);
}

/* --- Math CAPTCHA: styled as a highlighted callout box --- */
.notary-captcha {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1.5px solid var(--n-maroon-tint);
    background: #fff9f9;
    border-radius: 10px;
    padding: 0.6rem 0.85rem;
    flex-wrap: wrap;
}

.notary-captcha__label {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--n-maroon-dark);
    flex: 1 1 100%;
}

.notary-captcha__question {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--n-maroon-dark);
    white-space: nowrap;
}

.notary-captcha__input {
    flex: 1 1 120px;
    min-width: 100px;
    border: none;
    border-bottom: 1.5px solid var(--n-line);
    background: transparent;
    padding: 0.3rem 0.1rem;
    font-size: 0.95rem;
}

.notary-captcha__input:focus {
    outline: none;
    border-bottom-color: var(--n-maroon);
    box-shadow: none;
}

/* --- Buttons --- */
.notary-btn-primary {
    background: var(--n-maroon);
    border: 1px solid var(--n-maroon);
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.65rem 1rem;
}

.notary-btn-primary:hover,
.notary-btn-primary:focus {
    background: var(--n-maroon-dark);
    border-color: var(--n-maroon-dark);
    color: #fff;
}

.notary-btn-primary .spinner-border,
.notary-btn-cta .spinner-border {
    width: 1rem;
    height: 1rem;
    margin-right: 0.4rem;
    vertical-align: -2px;
}

.notary-btn-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    background: linear-gradient(135deg, var(--n-maroon) 0%, var(--n-maroon-dark) 100%);
    border: none;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 10px;
    padding: 0.9rem 1.5rem;
    box-shadow:
        0 0 0 3px rgba(214, 154, 31, 0.28),
        0 14px 30px -12px rgba(142, 7, 9, 0.55);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.notary-btn-cta:hover,
.notary-btn-cta:focus {
    color: #fff;
    transform: translateY(-2px);
    box-shadow:
        0 0 0 4px rgba(214, 154, 31, 0.4),
        0 18px 34px -10px rgba(142, 7, 9, 0.6);
}

.notary-btn-cta:active {
    transform: translateY(0);
}

.notary-btn-cta[disabled] {
    opacity: 0.75;
    transform: none;
}

.notary-auth-links {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--n-muted);
}

.notary-auth-links a.notary-pill-link {
    display: inline-block;
    margin-left: 0.4rem;
    background: var(--n-maroon);
    color: #fff;
    font-weight: 600;
    font-size: 0.82rem;
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    text-decoration: none;
}

.notary-auth-links a.notary-pill-link:hover {
    background: var(--n-maroon-dark);
}

/* --- Alerts --- */
.notary-alert {
    border: none;
    border-left: 4px solid var(--n-maroon);
    background: var(--n-maroon-tint);
    color: var(--n-ink);
    border-radius: 6px;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
}

.notary-alert ul {
    margin: 0.35rem 0 0;
    padding-left: 1.1rem;
}

.notary-alert.notary-alert-success {
    border-left-color: #2e9e5b;
    background: #eaf7ef;
}

/* --- Top-of-form prominent CTA banner (used on Sign In: "New here? Register") --- */
.notary-cta-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(135deg, var(--n-maroon) 0%, var(--n-maroon-dark) 100%);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    box-shadow: 0 10px 24px -14px rgba(142, 7, 9, 0.55);
}

.notary-cta-banner__text {
    color: #fff;
    min-width: 0;
}

.notary-cta-banner__text strong {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.02rem;
}

.notary-cta-banner__text span {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.85);
}

.notary-cta-banner .notary-cta-banner__btn {
    flex: 0 0 auto;
    background: #fff;
    color: var(--n-maroon-dark);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border-radius: 8px;
    padding: 0.6rem 1.1rem;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 0 0 3px rgba(214, 154, 31, 0.35);
    transition: transform 0.15s ease;
}

.notary-cta-banner .notary-cta-banner__btn:hover {
    transform: translateY(-1px);
    color: var(--n-maroon-dark);
}

/* --- Registration / reset success card --- */
.notary-success-card {
    text-align: center;
    max-width: 520px;
    margin: 0 auto;
}

.notary-success-card__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #eaf7ef;
    color: #2e9e5b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    margin: 0 auto 1rem;
}

.notary-success-card__ref {
    display: inline-block;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    background: var(--n-maroon-tint);
    border: 1px solid #f2d3d4;
    color: var(--n-maroon-dark);
    border-radius: 8px;
    padding: 0.3rem 0.9rem;
    margin: 0.5rem 0 1.25rem;
    letter-spacing: 0.02em;
}

.notary-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--n-line);
    padding: 0.55rem 0;
    font-size: 0.9rem;
    text-align: left;
}

.notary-summary-row:last-child {
    border-bottom: none;
}

.notary-summary-row span:first-child {
    color: var(--n-muted);
    flex: 0 0 auto;
}

.notary-summary-row span:last-child {
    color: var(--n-ink);
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

/* ============================= Responsive ================================= */

@media (max-width: 767.98px) {
    .notary-auth-card {
        border-radius: 14px;
    }

    .notary-cta-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .notary-cta-banner__text {
        text-align: center;
    }

    .notary-cta-banner .notary-cta-banner__btn {
        text-align: center;
    }
}

@media (max-width: 420px) {
    .notary-field-box {
        padding: 0.5rem 0.65rem;
    }

    .notary-field-box__icon {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
}
