/* SubjectLine.com Keycloak login theme — split-screen (registration + login) */

@font-face { font-family: 'Figtree'; font-weight: 400; font-display: swap; src: url('../fonts/figtree-400.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 500; font-display: swap; src: url('../fonts/figtree-500.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 600; font-display: swap; src: url('../fonts/figtree-600.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 700; font-display: swap; src: url('../fonts/figtree-700.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 800; font-display: swap; src: url('../fonts/figtree-800.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 900; font-display: swap; src: url('../fonts/figtree-900.woff2') format('woff2'); }

:root {
    --sl-pink: #FF206E;
    --sl-lime: #F4FF1A;
    --sl-ink: #111111;
    --sl-black: #000000;
    --sl-muted: #6b7280;
    --sl-muted-soft: #9ca3af;
    --sl-line: #e8e8ec;
    --sl-input-bg: #f6f6f8;
    --sl-card: #141414;
    --sl-font: 'Figtree', 'Segoe UI', system-ui, -apple-system, sans-serif;
    /* Legacy aliases kept for older selectors */
    --sl-blue: var(--sl-pink);
    --sl-orange: var(--sl-lime);
    --sl-dark: var(--sl-black);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.sl-auth-page {
    font-family: var(--sl-font);
    background: #fff;
    color: var(--sl-ink);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

#kc-header,
#kc-header-wrapper,
#kc-locale,
.brand-logo {
    display: none !important;
}

.sl-auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sl-auth-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: 1;
    min-height: 0;
}

/* ---- Left column (form) ---- */
.sl-auth-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 48px;
    background: #fff;
}

.sl-auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 36px;
}

.sl-auth-logo-link img {
    height: 38px;
    width: auto;
    display: block;
}

.sl-auth-powered {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

.sl-auth-powered span {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
}

.sl-auth-powered img {
    height: 16px;
    width: auto;
}

.sl-auth-form-box {
    width: 100%;
    max-width: 420px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#kc-content,
#kc-content-wrapper,
#kc-form,
#kc-form-wrapper {
    width: 100%;
}

#kc-page-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--sl-ink);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    text-align: left;
    line-height: 1.2;
}

.subtitle {
    font-size: 15px;
    color: var(--sl-muted);
    margin-bottom: 28px;
    line-height: 1.5;
    text-align: left;
}

.sl-auth-icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
}

.sl-auth-icon-circle-blue {
    background: #fce7f0;
}

/* Social */
#kc-social-providers ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sl-social-btn,
#kc-social-providers a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: #fff;
    border: 1.5px solid var(--sl-line);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--sl-ink);
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.sl-social-btn:hover,
#kc-social-providers a:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: #d1d5db;
    background: #fff;
    color: var(--sl-ink);
    text-decoration: none;
}

.google-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.separator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    color: var(--sl-muted-soft);
    font-size: 13px;
    font-weight: 500;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.separator span {
    white-space: nowrap;
}

/* Form fields */
.form-group {
    margin-bottom: 16px;
}

.form-group label,
.control-label,
.sl-auth-left label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--sl-ink);
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
#kc-form-login input[type="text"],
#kc-form-login input[type="password"],
.sl-auth-left input[type="text"],
.sl-auth-left input[type="email"],
.sl-auth-left input[type="password"],
.sl-auth-left select {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1.5px solid var(--sl-line);
    border-radius: 12px;
    font-size: 15px;
    font-family: var(--sl-font);
    color: var(--sl-ink);
    background: var(--sl-input-bg);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.form-group input:focus,
#kc-form-login input:focus,
.sl-auth-left input:focus,
.sl-auth-left select:focus {
    border-color: var(--sl-pink);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 32, 110, 0.12);
}

.form-group input::placeholder {
    color: #b0b8c4;
}

.form-group select {
    padding-right: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.41 0 6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    appearance: none;
    cursor: pointer;
}

.field-hint {
    font-size: 11px;
    color: var(--sl-muted-soft);
    margin: 8px 0 0;
    line-height: 1.5;
}

.password-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.password-label-row label {
    margin-bottom: 0;
}

.forgot-password-link,
.sl-auth-left .forgot-password-link {
    font-size: 13px;
    color: var(--sl-ink) !important;
    text-decoration: underline;
    font-weight: 700;
}

.forgot-password-link:hover {
    color: var(--sl-pink) !important;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 20px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--sl-pink);
    cursor: pointer;
}

.checkbox-wrapper label {
    font-size: 14px;
    color: var(--sl-muted);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    margin: 0;
    cursor: pointer;
}

#kc-login,
.btn-primary,
input[type="submit"].btn-primary,
.sl-auth-left button[type="submit"],
.sl-auth-left input[type="submit"] {
    width: 100%;
    height: 56px;
    padding: 0 20px;
    background: var(--sl-lime);
    color: var(--sl-ink);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    font-family: var(--sl-font);
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    box-shadow: none;
    margin-top: 4px;
}

#kc-login:hover,
.btn-primary:hover,
.sl-auth-left input[type="submit"]:hover {
    background: #e8ed00;
    transform: translateY(-1px);
}

.sl-ghost-cta,
.sl-auth-left .sl-auth-secondary {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 16px 20px;
    text-align: center;
    background: #fff;
    color: var(--sl-ink) !important;
    border: 1.5px solid var(--sl-line);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.sl-ghost-cta:hover,
.sl-auth-left .sl-auth-secondary:hover {
    background: #fafafa;
    border-color: #d1d5db;
    color: var(--sl-ink) !important;
    transform: translateY(-1px);
    text-decoration: none !important;
}

#kc-registration {
    text-align: center;
    margin-top: 20px;
}

#kc-registration span {
    font-size: 14px;
    color: var(--sl-muted);
}

#kc-registration a,
.sl-auth-left #kc-registration a {
    color: var(--sl-ink);
    font-weight: 700;
    text-decoration: underline;
}

#kc-registration a:hover {
    color: var(--sl-pink);
}

#kc-info {
    text-align: center;
    margin-top: 20px;
}

#kc-info a,
.sl-auth-left #kc-info a {
    color: var(--sl-ink);
    text-decoration: underline;
    font-size: 14px;
    font-weight: 700;
}

#kc-info a:hover {
    color: var(--sl-pink);
}

/* GURU Conference co-registration opt-in — matches design mockup.
   Must beat `.sl-auth-left label { display:block; text-transform:uppercase }`
   which otherwise collapses the custom checkbox to a thin purple line. */
.sl-auth-left label.guru-optin,
label.guru-optin {
    --guru-purple: #6d28d9;
    --guru-purple-soft: #c4b5fd;
    --guru-lavender: #f3f0ff;
    --guru-lavender-border: #e9e5ff;

    position: relative;
    display: flex !important;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 8px 0 18px !important;
    padding: 16px 16px;
    border: 1px solid var(--guru-lavender-border);
    border-radius: 12px;
    background: var(--guru-lavender);
    cursor: pointer;
    font-size: inherit;
    font-weight: 400;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: inherit;
    box-sizing: border-box;
}

.sl-auth-left label.guru-optin .guru-optin-input,
label.guru-optin .guru-optin-input {
    position: absolute !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    pointer-events: none;
    appearance: none;
}

.sl-auth-left label.guru-optin .guru-optin-box,
label.guru-optin .guru-optin-box {
    display: inline-flex !important;
    flex: 0 0 20px;
    align-items: center;
    justify-content: center;
    width: 20px !important;
    min-width: 20px;
    height: 20px !important;
    min-height: 20px;
    margin: 0 !important;
    padding: 0 !important;
    border: 2px solid var(--guru-purple-soft);
    border-radius: 5px;
    background: #fff;
    box-sizing: border-box;
}

.sl-auth-left label.guru-optin .guru-optin-check,
label.guru-optin .guru-optin-check {
    display: none;
    width: 11px;
    height: 9px;
}

.sl-auth-left label.guru-optin.is-checked .guru-optin-box,
label.guru-optin.is-checked .guru-optin-box {
    border-color: var(--guru-purple);
    background: var(--guru-purple);
}

.sl-auth-left label.guru-optin.is-checked .guru-optin-check,
label.guru-optin.is-checked .guru-optin-check {
    display: block;
}

.sl-auth-left label.guru-optin .guru-optin-copy,
label.guru-optin .guru-optin-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1 1 auto;
    text-align: left;
}

.sl-auth-left label.guru-optin .guru-optin-title,
label.guru-optin .guru-optin-title {
    display: block;
    margin: 0;
    font-family: var(--sl-font);
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #111111;
    line-height: 1.25;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.sl-auth-left label.guru-optin .guru-optin-sub,
label.guru-optin .guru-optin-sub {
    display: block;
    margin: 0;
    font-family: var(--sl-font);
    font-size: 13px !important;
    line-height: 1.4;
    color: #6b7280;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.sl-auth-left label.guru-optin .guru-optin-sub a,
label.guru-optin .guru-optin-sub a {
    color: var(--guru-purple) !important;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sl-auth-register .legal-text,
.legal-text {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.55;
    margin: 0 0 18px;
}

.legal-text a,
.sl-auth-left .legal-text a {
    color: var(--sl-ink);
    font-weight: 600;
    text-decoration: underline;
}

.input-error {
    display: block;
    color: #dc2626;
    font-size: 13px;
    margin-top: 6px;
}

.alert {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.5;
}

.alert-error,
.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-warning {
    background: #fffbeb;
    border: 1px solid #fed7aa;
    color: #d97706;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #2563eb;
}

.instruction {
    font-size: 14px;
    color: var(--sl-muted);
    margin-bottom: 20px;
    line-height: 1.5;
}

/* ---- Right column (marketing) ---- */
.sl-auth-right {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px;
    background-color: var(--sl-black);
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 28px 28px;
}

.sl-auth-orb {
    display: none;
}

.sl-auth-right-inner {
    position: relative;
    z-index: 1;
    max-width: 460px;
}

.sl-auth-right h2 {
    font-size: clamp(26px, 2.8vw, 34px);
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.sl-accent {
    color: var(--sl-pink);
}

.sl-auth-right-sub {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 32px;
}

.sl-auth-badge {
    display: inline-flex;
    align-items: center;
    background: var(--sl-lime);
    color: var(--sl-ink);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 8px 16px;
    margin-bottom: 24px;
    border: none;
}

.sl-auth-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.sl-auth-stat {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
}

.sl-auth-stat-num {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    margin-bottom: 6px;
}

.sl-auth-stat-num span {
    font-size: 18px;
    color: var(--sl-pink);
}

.sl-auth-stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
}

.sl-auth-testimonial {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px 22px;
    margin-bottom: 16px;
}

.sl-auth-testimonial > p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.65;
    margin: 0 0 16px;
    font-style: italic;
}

.sl-auth-testimonial-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sl-auth-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--sl-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.sl-auth-testimonial-author h5 {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 2px;
}

.sl-auth-testimonial-author p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    font-style: normal;
}

.sl-auth-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sl-auth-feat {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px 18px;
}

.sl-auth-feat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 32, 110, 0.18);
    color: var(--sl-pink);
}

.sl-auth-feat h4 {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}

.sl-auth-feat p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
    line-height: 1.5;
}

.sl-auth-score-preview {
    background: #fff;
    border: none;
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.sl-auth-score-ring {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #0b7a55;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
}

.sl-auth-score-info {
    min-width: 0;
    flex: 1;
}

.sl-auth-score-info h5 {
    font-size: 12px;
    color: var(--sl-muted);
    margin: 0 0 2px;
    font-weight: 500;
}

.sl-auth-score-info p {
    font-size: 13px;
    color: var(--sl-ink);
    margin: 0;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sl-auth-score-badge {
    margin-left: auto;
    background: #e7f8f1;
    color: #0b7a55;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    border: none;
    white-space: nowrap;
}

/* Footer */
.sl-auth-footer {
    background: #fff;
    border-top: 1px solid var(--sl-line);
    padding: 20px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    color: var(--sl-muted);
    font-size: 13px;
}

.sl-auth-footer nav {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.sl-auth-footer a {
    color: var(--sl-muted);
    text-decoration: underline;
}

.sl-auth-footer a:hover {
    color: var(--sl-ink);
}

/* Logo / secondary links should not inherit form link underline */
.sl-auth-left .sl-auth-logo a,
.sl-auth-left .sl-social-btn,
.sl-auth-left #kc-social-providers a {
    text-decoration: none;
}

/* Legacy Keycloak wrappers */
.login-pf-page,
.card-pf {
    all: unset;
}

@media (max-width: 1024px) {
    .sl-auth-wrap {
        grid-template-columns: 1fr;
    }

    .sl-auth-right {
        display: none;
    }

    .sl-auth-left {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    #kc-page-title {
        font-size: 24px;
    }

    .sl-auth-left {
        padding: 24px 16px 32px;
    }

    .sl-auth-form-box {
        width: 100%;
        max-width: none;
    }

    .sl-auth-logo {
        margin-bottom: 28px;
    }

    .sl-auth-footer {
        flex-direction: column;
        gap: 12px;
        padding: 20px;
        text-align: center;
    }

    .sl-auth-footer nav {
        justify-content: center;
        gap: 16px;
    }
}

/* UK/EU marketing opt-out row reuses .guru-optin; display:flex !important there beats [hidden]. */
.sl-auth-left label.guru-optin.sl-optout[hidden],
label.guru-optin.sl-optout[hidden] {
    display: none !important;
}

.sl-auth-left label.guru-optin.sl-optout .guru-optin-sub,
label.guru-optin.sl-optout .guru-optin-sub {
    color: #374151;
}
