/**
 * Giriş / kayıt / şifre sıfırlama — split layout (mod_theme_settings: Giriş / Kayıt / Şifre)
 */

:root {
    --rainy-auth-topbar-h: 56px;
    --rainy-auth-footer-h: 52px;
}

/*
 * Giriş / kayıt kabuğu açık zemin; rainy-panel.css koyu modda html’e --text-color veriyor.
 * Aksi halde firma adı ve dil butonu beyaz üzerinde soluk kalıyor.
 */
html.rainy-auth-html {
    --text-color: #0f172a;
    --text-muted: #475569;
    --border-color: #e2e8f0;
    color-scheme: only light;
}

html.rainy-auth-html {
    background: #f1f5f9;
    height: auto;
    min-height: 100%;
}

html.rainy-auth-html,
body.rainy-auth-active.primary-bg-color {
    background: #f1f5f9 !important;
    min-height: 100%;
}

/* Alt tarafta theme body rengi şerit göstermesin */
body.rainy-auth-active {
    margin-bottom: 0 !important;
}

body.rainy-auth-active #main-body {
    padding-top: 0 !important;
    min-height: 0 !important;
}

/* theme.css section#main-body padding — auth */
section#main-body.rainy-auth-body-section {
    padding: 0 !important;
    margin: 0 !important;
    background: #f1f5f9;
    display: flex;
    flex-direction: column;
}

/*
 * Giriş + kayıt + şifre sıfırlama: içerik kadar yükseklik (varsayılan min-height yok).
 * Önceki calc(100dvh) + flex:1 zinciri #main-body’yi şişirip footer’ı aşağı itiyordu.
 */
body.rainy-auth-page-login section#main-body.rainy-auth-body-section,
body.rainy-auth-page-password section#main-body.rainy-auth-body-section,
body.rainy-auth-page-register section#main-body.rainy-auth-body-section {
    min-height: 0 !important;
    flex: 0 1 auto;
}

body.rainy-auth-page-login section#main-body.rainy-auth-body-section > .container-fluid,
body.rainy-auth-page-password section#main-body.rainy-auth-body-section > .container-fluid,
body.rainy-auth-page-register section#main-body.rainy-auth-body-section > .container-fluid {
    flex: 0 1 auto !important;
}

body.rainy-auth-page-login section#main-body.rainy-auth-body-section > .container-fluid > .row,
body.rainy-auth-page-password section#main-body.rainy-auth-body-section > .container-fluid > .row,
body.rainy-auth-page-register section#main-body.rainy-auth-body-section > .container-fluid > .row {
    flex: 0 1 auto !important;
    align-items: flex-start;
}

body.rainy-auth-page-login section#main-body.rainy-auth-body-section .primary-content.rainy-auth-primary,
body.rainy-auth-page-password section#main-body.rainy-auth-body-section .primary-content.rainy-auth-primary,
body.rainy-auth-page-register section#main-body.rainy-auth-body-section .primary-content.rainy-auth-primary {
    flex: 0 1 auto !important;
}

section#main-body.rainy-auth-body-section > .container-fluid {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

section#main-body.rainy-auth-body-section > .container-fluid > .row {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
    min-height: 0;
    margin-left: 0;
    margin-right: 0;
}

section#main-body.rainy-auth-body-section .primary-content.rainy-auth-primary {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* İçerik sütunu + sol panel */
.rainy-auth-layout {
    display: flex;
    flex: 1 1 auto;
    align-items: stretch;
    width: 100%;
    min-height: 0;
}

body.rainy-auth-page-login .rainy-auth-layout,
body.rainy-auth-page-password .rainy-auth-layout {
    flex: 0 1 auto !important;
    min-height: 0 !important;
    align-items: flex-start;
}

/*
 * Kayıt: sol + sağ sütun aynı yükseklikte (stretch).
 * Uzun formda yapışkan sabit yükseklik sol paneli kısa bırakıp altında açık gri/beyaz boşluk bırakıyordu.
 */
body.rainy-auth-page-register .rainy-auth-layout,
.rainy-auth-layout[data-rainy-auth-page="register"] {
    flex: 0 1 auto !important;
    min-height: 0 !important;
    align-items: stretch;
}

.rainy-auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    min-height: var(--rainy-auth-topbar-h);
    background: #fff;
    border-bottom: 1px solid var(--border-color, #e8eaef);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.rainy-auth-topbar__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex: 1 1 auto;
    text-decoration: none !important;
    color: #0f172a !important;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.rainy-auth-topbar__brand:hover,
.rainy-auth-topbar__brand:focus {
    color: #0f172a !important;
}

.rainy-auth-topbar__brand-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rainy-auth-topbar__brand img {
    max-height: 36px;
    width: auto;
    flex-shrink: 0;
}

.rainy-auth-topbar__actions {
    flex-shrink: 0;
}

.rainy-auth-lang-btn {
    border: 1px solid var(--border-color, #e8eaef) !important;
    background: #fff !important;
    color: #334155 !important;
    border-radius: var(--radius, 10px);
    padding: 0.45rem 0.85rem !important;
    min-height: 40px;
    font-size: 0.8125rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: border-color 0.15s, box-shadow 0.15s, color 0.15s;
}

.rainy-auth-lang-btn .rainy-auth-lang-chevron {
    font-size: 0.65rem;
    opacity: 0.55;
    margin-left: 0.1rem;
}

.rainy-auth-lang-btn:hover {
    border-color: color-mix(in srgb, var(--primary-color, #059669) 35%, var(--border-color, #e8eaef)) !important;
    color: #0f172a !important;
}

.rainy-auth-lang-btn:hover .rainy-auth-lang-chevron {
    opacity: 0.85;
}

@media (max-width: 420px) {
    .rainy-auth-lang-label {
        max-width: 42vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

.rainy-auth-aside {
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    align-self: stretch;
    flex: 0 0 42%;
    width: 42%;
    max-width: 520px;
    min-height: 0;
    padding: 2.25rem 1.75rem 2rem;
    color: #f8fafc;
    position: relative;
    overflow: hidden;
    text-align: center;
}

@media (min-width: 992px) {
    .rainy-auth-aside {
        display: flex;
    }

    /* Giriş + şifre: yapışkan sol panel, viewport bandı */
    body.rainy-auth-page-login .rainy-auth-aside,
    body.rainy-auth-page-password .rainy-auth-aside {
        align-self: flex-start;
        position: sticky;
        top: var(--rainy-auth-topbar-h);
        z-index: 2;
        min-height: 0 !important;
        height: calc(100dvh - var(--rainy-auth-topbar-h) - var(--rainy-auth-footer-h));
        max-height: calc(100dvh - var(--rainy-auth-topbar-h) - var(--rainy-auth-footer-h));
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        justify-content: space-between;
    }

    /*
     * Kayıt: sol panel form ile aynı yükseklikte uzar — altta kopuk şerit kalmaz.
     * Kısa sayfada en az viewport bandı; uzun formda sütun boyunca gradient.
     */
    body.rainy-auth-page-register .rainy-auth-aside,
    .rainy-auth-layout[data-rainy-auth-page="register"] .rainy-auth-aside {
        align-self: stretch;
        position: relative;
        top: auto;
        z-index: 2;
        min-height: calc(100dvh - var(--rainy-auth-topbar-h) - var(--rainy-auth-footer-h));
        height: auto;
        max-height: none;
        overflow-x: hidden;
        overflow-y: visible;
        justify-content: space-between;
        flex: 0 0 48%;
        width: 48%;
        max-width: 620px;
        padding: 2.5rem 2rem 2.25rem;
    }

    body.rainy-auth-page-login .rainy-auth-main,
    body.rainy-auth-page-password .rainy-auth-main,
    body.rainy-auth-page-register .rainy-auth-main,
    .rainy-auth-layout[data-rainy-auth-page="register"] .rainy-auth-main {
        flex: 1 1 0;
        min-width: 0;
        min-height: 0 !important;
        align-self: flex-start;
    }
}

.rainy-auth-aside__glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 90% 60% at 50% 8%, rgba(255, 255, 255, 0.14), transparent 55%);
    pointer-events: none;
}

.rainy-auth-aside__inner {
    position: relative;
    z-index: 1;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
}

.rainy-auth-aside__brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    opacity: 0.96;
}

.rainy-auth-aside__headline {
    font-size: clamp(1.45rem, 2.1vw, 1.8rem);
    font-weight: 700;
    line-height: 1.28;
    letter-spacing: -0.03em;
    margin: 0 0 1rem;
}

.rainy-auth-aside__sub {
    font-size: 0.94rem;
    line-height: 1.6;
    color: rgba(248, 250, 252, 0.76);
    margin: 0 auto;
    max-width: 22rem;
}

.rainy-auth-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    margin-top: auto;
    padding-top: 2rem;
    width: 100%;
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
}

/* Tüm auth sayfaları: sabit sol kutuda istatistikler altta */
body.rainy-auth-page-login .rainy-auth-stats,
body.rainy-auth-page-password .rainy-auth-stats,
body.rainy-auth-page-register .rainy-auth-stats {
    margin-top: auto;
    padding-top: 1.25rem;
}

.rainy-auth-stat {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 0.9rem 0.5rem;
    text-align: center;
    backdrop-filter: blur(8px);
}

.rainy-auth-stat__val {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.rainy-auth-stat__lab {
    display: block;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: rgba(248, 250, 252, 0.58);
    margin-top: 0.4rem;
}

.rainy-auth-main {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    min-height: 0;
    padding: 1.35rem 1.25rem 1.25rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

@media (min-width: 992px) {
    .rainy-auth-main {
        padding: 2rem 2rem 1.35rem;
    }
}

.rainy-auth-main-inner {
    width: 100%;
    max-width: 420px;
}

.rainy-auth-layout[data-rainy-auth-page="register"] .rainy-auth-main-inner {
    max-width: 560px;
}

/* Segment — modern pill bar */
.rainy-auth-segment {
    display: flex;
    padding: 5px;
    margin-bottom: 1.25rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.05),
        0 8px 28px -8px rgba(15, 23, 42, 0.1);
    gap: 2px;
}

.rainy-auth-segment__btn {
    flex: 1;
    text-align: center;
    padding: 0.55rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    text-decoration: none !important;
    border-radius: 999px;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    line-height: 1.25;
}

@media (min-width: 480px) {
    .rainy-auth-segment__btn {
        font-size: 0.8125rem;
        padding: 0.58rem 0.65rem;
    }
}

.rainy-auth-segment__btn:hover {
    color: #0f172a;
    background: rgba(15, 23, 42, 0.05);
}

.rainy-auth-segment__btn.is-active {
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
    color: #fff !important;
    box-shadow: 0 4px 14px -4px rgba(15, 23, 42, 0.45);
}

.rainy-auth-segment__btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color, #059669) 45%, transparent);
}

/* Kart */
.rainy-auth-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.07);
    border-radius: 20px;
    padding: 1.45rem 1.35rem 1.2rem;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 18px 48px -18px rgba(15, 23, 42, 0.12);
}

.rainy-auth-card__title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 0.35rem;
    color: #0f172a;
}

.rainy-auth-card__sub {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #64748b;
    margin: 0 0 1rem;
}

/* Birincil aksiyon satırı (giriş: buton + beni hatırla) */
.rainy-auth-card__actions {
    margin-top: 0.15rem;
    margin-bottom: 0;
}

/* Kart altı ikincil bağlantı — ince ayırıcı, fazla boşluk yok */
.rainy-auth-card__foot {
    margin-top: 0.95rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(15, 23, 42, 0.07);
    line-height: 1.45;
}

.rainy-auth-card__foot a {
    color: color-mix(in srgb, var(--primary-color, #059669) 88%, #0f172a);
    text-decoration: none;
}

.rainy-auth-card__foot a:hover {
    text-decoration: underline;
}

/* reCAPTCHA — kart içi dikey ritim */
.rainy-auth-captcha-wrap {
    margin-bottom: 0.65rem;
}

.rainy-auth-captcha-wrap:last-child {
    margin-bottom: 0;
}

.rainy-auth-card .recaptcha-container {
    margin-bottom: 0 !important;
}

.rainy-auth-card__submit {
    margin-bottom: 0 !important;
    padding-top: 0.1rem;
}

.rainy-auth-btn-row .btn + .btn {
    margin-left: 0.45rem;
}

/* Başarı / bilgi mesajı kartı */
.rainy-auth-card--message .alert {
    margin-bottom: 0.75rem;
}

.rainy-auth-card__message-text {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #475569;
}

@media (max-width: 479.98px) {
    .rainy-auth-btn-row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .rainy-auth-btn-row .btn {
        width: 100%;
        margin: 0 !important;
    }
}

.rainy-auth-card .form-control {
    border-radius: 12px;
    border-color: #e2e8f0;
}

.rainy-auth-card .form-control:focus {
    border-color: color-mix(in srgb, var(--primary-color, #059669) 55%, #e2e8f0);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color, #059669) 18%, transparent);
}

.rainy-auth-card .btn-primary {
    border-radius: 12px;
    font-weight: 600;
    padding: 0.55rem 1.35rem;
    box-shadow: 0 4px 14px -4px color-mix(in srgb, var(--primary-color, #059669) 55%, transparent);
}

.rainy-auth-card .input-group-text {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.rainy-auth-register .card {
    border-radius: 18px;
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 8px 32px -12px rgba(15, 23, 42, 0.1);
}

.rainy-auth-register #containerNewUserSignup > .card.mb-4 {
    margin-bottom: 1.125rem !important;
}

.rainy-auth-register #containerNewUserSignup .card-body {
    padding: 1.35rem !important;
}

@media (min-width: 576px) {
    .rainy-auth-register #containerNewUserSignup .card-body {
        padding: 1.5rem !important;
    }
}

.rainy-auth-register .card-title {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: #0f172a;
}

.rainy-auth-main-body {
    width: 100%;
}

/* Tek satır telif — giriş/şifrede kayıt sayfasıyla aynı ince şerit */
footer.rainy-auth-footer-min {
    display: block;
    margin: 0 !important;
    padding: 0.55rem 1rem calc(0.55rem + env(safe-area-inset-bottom, 0px)) !important;
    text-align: center;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #475569;
    letter-spacing: 0.01em;
    background: #fff !important;
    border-top: 1px solid #e2e8f0;
    box-shadow: none !important;
}

footer.rainy-auth-footer-min a {
    color: var(--primary-color, #059669);
    font-weight: 500;
}

/* Sabit sohbet / widget ile çakışmayı azalt */
@media (max-width: 767.98px) {
    footer.rainy-auth-footer-min {
        font-size: 0.78rem;
        padding-left: 0.85rem;
        padding-right: 0.85rem;
        padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)) !important;
    }
}

.rainy-auth-main-body .alert {
    border-radius: 12px;
}
