/* ==========================================================================
   ZimSingles app-style sign-in page
   Colours, type and spacing mirror the mobile app's theme (src/theme).
   Selectors are deliberately specific so the active theme's and
   Elementor's global form styles don't leak in.
   ========================================================================== */

:root {
    --zs-bg: #FAF5F0;
    --zs-surface: #FFFFFF;
    --zs-surface-alt: #F3EAE2;
    --zs-ink: #23110F;
    --zs-ink-soft: #6F5B56;
    --zs-ink-faint: #A8958E;
    --zs-line: #EADFD6;
    --zs-primary: #C03732;
    --zs-primary-deep: #9C2A26;
    --zs-primary-soft: #F9E3DF;
    --zs-danger: #B3261E;
    --zs-danger-soft: #FBE4E2;
    --zs-success: #146C63;
    --zs-success-soft: #DDF4F1;
    --zs-sunset: linear-gradient(152deg, #A82B2F 0%, #C03732 30%, #E0653A 72%, #EFA13F 100%);
    --zs-button: linear-gradient(90deg, #C03732 0%, #DB5A38 100%);
    --zs-display: "Bricolage Grotesque", "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --zs-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --zs-radius-md: 16px;
    --zs-radius-xl: 32px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --zs-bg: #150D0C;
        --zs-surface: #211614;
        --zs-surface-alt: #2C1E1B;
        --zs-ink: #F7EDE6;
        --zs-ink-soft: #BFA9A1;
        --zs-ink-faint: #8A746D;
        --zs-line: #382825;
        --zs-primary: #E4574F;
        --zs-primary-deep: #C03732;
        --zs-primary-soft: #3A1A18;
        --zs-danger: #F2877F;
        --zs-danger-soft: #3A1A18;
        --zs-success: #3FCFC2;
        --zs-success-soft: #12322F;
        color-scheme: dark;
    }
}

html:has(body.zs-auth-body) {
    background: var(--zs-bg);
}

body.zs-auth-body {
    margin: 0;
    min-height: 100vh;
    background: var(--zs-bg);
    color: var(--zs-ink);
    font-family: var(--zs-body);
    font-size: 16px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.zs-auth,
.zs-auth *,
.zs-auth *::before,
.zs-auth *::after {
    box-sizing: border-box;
}

.zs-auth {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.zs-auth .clr-icon {
    display: block;
    flex: none;
    width: 20px;
    height: 20px;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.zs-auth .zs-auth__hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: calc(36px + env(safe-area-inset-top)) 24px calc(64px + var(--zs-radius-xl));
    background: var(--zs-sunset);
    color: #FFFFFF;
}

.zs-auth .zs-auth__glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.zs-auth .zs-auth__glow--one {
    width: 340px;
    height: 340px;
    right: -140px;
    top: -120px;
    background: radial-gradient(closest-side, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
}

.zs-auth .zs-auth__glow--two {
    width: 420px;
    height: 420px;
    left: -180px;
    bottom: -200px;
    background: radial-gradient(closest-side, rgba(239, 161, 63, 0.35), rgba(239, 161, 63, 0));
}

.zs-auth .zs-auth__watermark {
    position: absolute;
    right: -48px;
    bottom: 8px;
    width: 230px;
    height: 225px;
    color: #FFFFFF;
    opacity: 0.08;
    transform: rotate(-12deg);
    pointer-events: none;
}

.zs-auth .zs-auth__logo,
.zs-auth .zs-auth__logo:hover,
.zs-auth .zs-auth__logo:focus {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    align-self: flex-start;
    color: #FFFFFF;
    text-decoration: none;
    font-family: var(--zs-display);
    font-weight: 800;
    font-size: 30px;
    line-height: 1;
    letter-spacing: -0.6px;
}

.zs-auth .zs-mark {
    display: block;
    flex: none;
}

.zs-auth .zs-auth__logo .zs-mark {
    width: 34px;
    height: 33px;
    margin-top: -4px;
}

.zs-auth .zs-auth__logo:focus-visible {
    outline: 2px solid #FFFFFF;
    outline-offset: 4px;
    border-radius: 6px;
}

.zs-auth .zs-auth__pitch {
    position: relative;
    margin-top: 32px;
}

.zs-auth .zs-auth__headline {
    margin: 0 0 12px;
    padding: 0;
    color: #FFFFFF;
    font-family: var(--zs-display);
    font-weight: 800;
    font-size: 36px;
    line-height: 40px;
    letter-spacing: -0.8px;
    text-wrap: balance;
}

.zs-auth .zs-auth__tagline {
    margin: 0;
    max-width: 360px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 16px;
    line-height: 23px;
}

.zs-auth .zs-auth__legal--hero {
    display: none;
}

/* --------------------------------------------------------------------------
   Form panel
   -------------------------------------------------------------------------- */

.zs-auth .zs-auth__panel {
    position: relative;
    z-index: 1;
    flex: 1;
    margin-top: calc(-1 * var(--zs-radius-xl));
    padding: 24px 24px calc(32px + env(safe-area-inset-bottom));
    background: var(--zs-bg);
    border-radius: var(--zs-radius-xl) var(--zs-radius-xl) 0 0;
}

.zs-auth .zs-auth__card {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}

.zs-auth--register .zs-auth__card {
    max-width: 560px;
}

.zs-auth .zs-auth__head {
    margin: 0 0 20px;
}

.zs-auth .zs-auth__title {
    margin: 0;
    padding: 0;
    color: var(--zs-ink);
    font-family: var(--zs-display);
    font-weight: 700;
    font-size: 21px;
    line-height: 26px;
    letter-spacing: -0.2px;
}

.zs-auth .zs-auth__intro {
    margin: 6px 0 0;
    color: var(--zs-ink-soft);
    font-size: 15px;
    line-height: 22px;
}

.zs-auth .zs-auth__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 20px;
    margin-top: 40px;
    font-size: 13px;
}

.zs-auth .zs-auth__links a,
.zs-auth .zs-auth__links a:hover {
    color: var(--zs-ink-faint);
    text-decoration: none;
}

.zs-auth .zs-auth__links a:hover,
.zs-auth .zs-auth__links a:focus-visible {
    color: var(--zs-ink-soft);
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Form controls
   -------------------------------------------------------------------------- */

.zs-auth .clr-auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: none;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
}

.zs-auth .clr-auth-form p {
    margin: 0;
}

.zs-auth .clr-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.zs-auth .clr-field .clr-field__label {
    display: block;
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
    color: var(--zs-ink-soft);
    font-family: var(--zs-body) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    line-height: 20px !important;
    vertical-align: baseline;
}

.zs-auth .clr-field__box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 0 14px;
    background: var(--zs-surface);
    border: 1.5px solid var(--zs-line);
    border-radius: var(--zs-radius-md);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.zs-auth .clr-field__box:focus-within {
    border-color: var(--zs-primary);
    box-shadow: 0 0 0 4px var(--zs-primary-soft);
}

.zs-auth .clr-field__icon {
    color: var(--zs-ink-faint);
}

.zs-auth .clr-field__box:focus-within .clr-field__icon {
    color: var(--zs-primary);
}

.zs-auth .clr-auth-form .clr-field__input,
.zs-auth .clr-auth-form .clr-field__input:focus {
    /* !important: Elementor's site kit styles every input with
       :not([type=...]) selectors that outrank plain class selectors. */
    flex: 1;
    min-width: 0;
    width: 100% !important;
    height: 49px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    color: var(--zs-ink) !important;
    font-family: var(--zs-body) !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 23px !important;
}

.zs-auth .clr-auth-form .clr-field__input::placeholder {
    color: var(--zs-ink-faint);
    opacity: 1;
}

.zs-auth .clr-auth-form .clr-field__input:-webkit-autofill {
    -webkit-text-fill-color: var(--zs-ink);
    -webkit-box-shadow: 0 0 0 40px var(--zs-surface) inset;
    caret-color: var(--zs-ink);
}

.zs-auth .clr-auth-form select.clr-field__input {
    padding-right: 24px !important;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.zs-auth .clr-field__box--select::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -6px;
    border-right: 1.6px solid var(--zs-ink-faint);
    border-bottom: 1.6px solid var(--zs-ink-faint);
    transform: rotate(45deg);
    pointer-events: none;
}

.zs-auth .clr-auth-form input[type="date"].clr-field__input::-webkit-calendar-picker-indicator {
    opacity: 0.55;
    cursor: pointer;
}

.zs-auth .clr-auth-form .clr-field__toggle,
.zs-auth .clr-auth-form .clr-field__toggle:hover,
.zs-auth .clr-auth-form .clr-field__toggle:focus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0 -8px 0 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 50% !important;
    box-shadow: none !important;
    color: var(--zs-ink-faint) !important;
    cursor: pointer;
}

.zs-auth .clr-auth-form .clr-field__toggle:hover {
    color: var(--zs-ink-soft) !important;
}

.zs-auth .clr-auth-form .clr-field__toggle:focus-visible {
    outline: 2px solid var(--zs-primary);
    outline-offset: 0;
}

.zs-auth .clr-field__toggle .clr-toggle-hide,
.zs-auth .clr-field__toggle[aria-pressed="true"] .clr-toggle-show {
    display: none;
}

.zs-auth .clr-field__toggle[aria-pressed="true"] .clr-toggle-hide {
    display: block;
}

.zs-auth .clr-auth-form .clr-field__hint {
    color: var(--zs-ink-faint);
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
}

.zs-auth .clr-auth-form .clr-forgot {
    margin-top: -8px;
    text-align: right;
    font-size: 14px;
}

.zs-auth .clr-auth-form .clr-forgot a,
.zs-auth .clr-auth-form .clr-forgot a:hover {
    color: var(--zs-ink-soft);
    font-weight: 600;
    text-decoration: none;
}

.zs-auth .clr-auth-form .clr-forgot a:hover {
    color: var(--zs-primary);
}

/* Segmented choice (gender, interested in) */

.zs-auth .clr-segmented {
    display: flex;
    gap: 8px;
}

.zs-auth .clr-segmented__option {
    position: relative;
    flex: 1;
    display: block;
    margin: 0;
    line-height: 1;
}

.zs-auth .clr-segmented__option input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.zs-auth .clr-segmented__option span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 50px;
    padding: 0 8px;
    background: var(--zs-surface);
    border: 1.5px solid var(--zs-line);
    border-radius: var(--zs-radius-md);
    color: var(--zs-ink);
    font-family: var(--zs-body);
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.zs-auth .clr-segmented__option span .clr-icon {
    width: 18px;
    height: 18px;
    color: var(--zs-ink-faint);
}

.zs-auth .clr-segmented__option input:hover + span {
    border-color: var(--zs-ink-faint);
}

.zs-auth .clr-segmented__option input:checked + span {
    background: var(--zs-primary-soft);
    border-color: var(--zs-primary);
    color: var(--zs-primary);
}

.zs-auth .clr-segmented__option input:checked + span .clr-icon {
    color: var(--zs-primary);
}

.zs-auth .clr-segmented__option input:focus-visible + span {
    box-shadow: 0 0 0 4px var(--zs-primary-soft);
    border-color: var(--zs-primary);
}

/* Registration sections */

.zs-auth .clr-auth-form .clr-step {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid var(--zs-line);
    color: var(--zs-ink);
    font-family: var(--zs-display);
    font-weight: 700;
    font-size: 17px;
    line-height: 22px;
}

.zs-auth .clr-auth-form .clr-ajax-errors + input + .clr-step,
.zs-auth .clr-auth-form .clr-step:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.zs-auth .clr-step span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--zs-primary-soft);
    color: var(--zs-primary);
    font-family: var(--zs-body);
    font-size: 13px;
    font-weight: 700;
}

.zs-auth .clr-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* Photo picker */

.zs-auth .clr-photo {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    padding: 14px;
    background: var(--zs-surface);
    border: 1.5px dashed var(--zs-line);
    border-radius: var(--zs-radius-md);
    cursor: pointer;
    line-height: 1.4;
    transition: border-color 0.15s ease;
}

.zs-auth .clr-photo:hover,
.zs-auth .clr-photo:focus-within {
    border-color: var(--zs-primary);
}

.zs-auth .clr-photo.has-photo {
    border-style: solid;
}

.zs-auth .clr-photo__preview {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 72px;
    height: 72px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--zs-primary-soft);
    color: var(--zs-primary);
}

.zs-auth .clr-photo__preview .clr-icon {
    width: 28px;
    height: 28px;
}

.zs-auth .clr-photo__preview img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
}

.zs-auth .clr-photo__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.zs-auth .clr-photo__text strong {
    color: var(--zs-ink);
    font-weight: 600;
    font-size: 16px;
}

.zs-auth .clr-photo__text small {
    color: var(--zs-ink-soft);
    font-size: 13px;
    line-height: 18px;
}

.zs-auth .clr-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
}

/* Primary button */

.zs-auth .clr-auth-form input[type="submit"].clr-button,
.zs-auth .clr-auth-form input[type="submit"].clr-button:hover,
.zs-auth .clr-auth-form input[type="submit"].clr-button:focus {
    display: block;
    width: 100% !important;
    min-height: 52px;
    margin: 4px 0 0;
    padding: 0 24px;
    background: var(--zs-button) !important;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 8px 22px rgba(192, 55, 50, 0.22);
    color: #FFFFFF !important;
    font-family: var(--zs-body);
    font-weight: 600;
    font-size: 16px;
    line-height: 23px;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.zs-auth .clr-auth-form input[type="submit"].clr-button:hover {
    box-shadow: 0 10px 26px rgba(192, 55, 50, 0.3);
    transform: translateY(-1px);
}

.zs-auth .clr-auth-form input[type="submit"].clr-button:active {
    opacity: 0.85;
    transform: none;
}

.zs-auth .clr-auth-form input[type="submit"].clr-button:focus-visible {
    outline: 3px solid var(--zs-primary-soft);
    outline-offset: 3px;
}

.zs-auth .clr-auth-form input[type="submit"].clr-button.is-idle,
.zs-auth .clr-auth-form input[type="submit"].clr-button:disabled {
    opacity: 0.45;
    box-shadow: none;
    transform: none;
}

.zs-auth .clr-auth-form input[type="submit"].clr-button:disabled {
    cursor: progress;
}

.zs-auth .clr-auth-form .clr-fineprint {
    margin-top: -8px;
    color: var(--zs-ink-faint);
    font-size: 12px;
    text-align: center;
}

.zs-auth .clr-switch {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 24px 0 0;
    color: var(--zs-ink-soft);
    font-size: 16px;
    line-height: 23px;
}

.zs-auth .clr-switch a,
.zs-auth .clr-switch a:hover {
    color: var(--zs-primary);
    font-weight: 600;
    text-decoration: none;
}

.zs-auth .clr-switch a:hover,
.zs-auth .clr-switch a:focus-visible {
    text-decoration: underline;
}

/* Messages */

.zs-auth .clr-ajax-errors,
.zs-auth .clr-success-message {
    margin: 0;
    padding: 12px 14px;
    border: 0;
    border-radius: var(--zs-radius-md);
    background: var(--zs-danger-soft);
}

.zs-auth .clr-success-message {
    background: var(--zs-success-soft);
}

.zs-auth .clr-ajax-errors:empty,
.zs-auth .clr-success-message:empty {
    display: none !important;
}

.zs-auth .clr-error,
.zs-auth .clr-success {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--zs-danger);
    font-size: 14px;
    line-height: 20px;
}

.zs-auth .clr-error + .clr-error {
    margin-top: 4px;
}

.zs-auth .clr-success {
    color: var(--zs-success);
}

/* --------------------------------------------------------------------------
   Tablet: centre the hero copy over the card
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
    .zs-auth .zs-auth__hero {
        padding-left: max(40px, calc((100vw - 560px) / 2));
        padding-right: max(40px, calc((100vw - 560px) / 2));
        padding-bottom: calc(80px + var(--zs-radius-xl));
    }

    .zs-auth .zs-auth__headline {
        font-size: 48px;
        line-height: 52px;
        letter-spacing: -1.2px;
    }

    .zs-auth .zs-auth__tagline {
        max-width: 480px;
        font-size: 18px;
        line-height: 26px;
    }

    .zs-auth .zs-auth__panel {
        padding-top: 40px;
    }

    .zs-auth .clr-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* --------------------------------------------------------------------------
   Desktop: split view, hero pinned on the left
   -------------------------------------------------------------------------- */

@media (min-width: 1024px) {
    .zs-auth {
        flex-direction: row;
        align-items: stretch;
    }

    .zs-auth .zs-auth__hero {
        position: sticky;
        top: 0;
        flex: 0 0 50%;
        height: 100vh;
        justify-content: space-between;
        gap: 0;
        padding: 48px calc(clamp(40px, 4.5vw, 72px) + var(--zs-radius-xl)) 40px clamp(40px, 4.5vw, 72px);
    }

    .zs-auth--register .zs-auth__hero {
        flex-basis: 44%;
    }

    .zs-auth.zs-auth--register .zs-auth__headline {
        font-size: clamp(40px, 3.6vw, 58px);
    }

    .zs-auth .zs-auth__glow--one {
        width: 620px;
        height: 620px;
        right: -220px;
        top: -220px;
    }

    .zs-auth .zs-auth__glow--two {
        width: 760px;
        height: 760px;
        left: -280px;
        bottom: -360px;
    }

    .zs-auth .zs-auth__watermark {
        right: calc(var(--zs-radius-xl) + 8px);
        bottom: -110px;
        width: 360px;
        height: 352px;
    }

    .zs-auth .zs-auth__pitch {
        margin: 0;
    }

    .zs-auth .zs-auth__headline {
        margin-bottom: 20px;
        font-size: clamp(44px, 4.2vw, 68px);
        line-height: 1.04;
        letter-spacing: -0.03em;
    }

    .zs-auth .zs-auth__tagline {
        max-width: 480px;
        font-size: 19px;
        line-height: 28px;
    }

    .zs-auth .zs-auth__legal--hero {
        position: relative;
        display: block;
        margin: 0;
        color: rgba(255, 255, 255, 0.7);
        font-size: 13px;
    }

    .zs-auth .zs-auth__panel {
        display: flex;
        flex-direction: column;
        justify-content: center;
        flex: 1 1 auto;
        min-height: 100vh;
        margin: 0 0 0 calc(-1 * var(--zs-radius-xl));
        padding: 64px 48px;
        border-radius: var(--zs-radius-xl) 0 0 var(--zs-radius-xl);
        box-shadow: -18px 0 48px rgba(58, 20, 16, 0.12);
    }

    .zs-auth .zs-auth__card {
        max-width: 400px;
    }

    .zs-auth--register .zs-auth__card {
        max-width: 560px;
    }

    .zs-auth .zs-auth__head {
        margin-bottom: 28px;
    }

    .zs-auth .zs-auth__title {
        font-family: var(--zs-display);
        font-weight: 800;
        font-size: 32px;
        line-height: 38px;
        letter-spacing: -0.6px;
    }

    .zs-auth .zs-auth__intro {
        font-size: 16px;
        line-height: 23px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .zs-auth *,
    .zs-auth *::before,
    .zs-auth *::after {
        transition: none !important;
    }
}
