/* ==========================================================================
   Register (kayıt) formu ve yasal sözleşme modalı stilleri
   libraries.php > header > 'login/register_form' altında yüklenir.
   ========================================================================== */


    /* Sol üyelik tanıtım alanı: validation mesajları açıldığında sağ form uzasa bile
       solda gereksiz esneme, boşluk ve iç scroll oluşmaması için bağımsız kart yapısı. */
    .nr-auth-hero .row.align-items-stretch {
        align-items: flex-start !important;
    }

    .nr-auth-hero .col-lg-5,
    .nr-auth-hero .col-lg-7 {
        min-width: 0;
    }

    .nr-auth-hero .col-lg-5 {
        align-self: flex-start !important;
        flex: 0 0 auto;
    }

    .nr-auth-hero .col-lg-7 {
        align-self: flex-start !important;
    }

    /* Sol panel form validation mesajlarından bağımsız kalır.
       Sticky/height:100/overflow:auto etkileri kapatıldı; böylece sağdaki form uzayıp
       kısalırken solda scroll, zıplama veya gereksiz esneme oluşmaz. */
    .nr-auth-intro.nr-register-intro-card,
    .nr-register-intro-card {
        height: auto !important;
        min-height: unset !important;
        max-height: none !important;
        overflow: visible !important;
        overflow-y: visible !important;
        position: relative !important;
        top: auto !important;
        align-self: flex-start !important;
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding: clamp(24px, 3vw, 34px) !important;
        transform: none !important;
        will-change: auto !important;
    }

    .nr-register-intro-card::before,
    .nr-register-intro-card::after {
        pointer-events: none;
    }

    .nr-register-intro-top h1 {
        margin-bottom: 14px;
        line-height: 1.08;
    }

    .nr-register-intro-top p {
        margin-bottom: 0;
        max-width: 100%;
        line-height: 1.65;
    }

    .nr-register-value-grid {
        display: grid;
        gap: 12px;
    }

    .nr-register-value-item {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding: 14px;
        border: 1px solid rgba(255, 255, 255, .18);
        border-radius: 18px;
        background: rgba(255, 255, 255, .10);
        backdrop-filter: blur(8px);
    }

    .nr-register-value-item i {
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
        display: grid;
        place-items: center;
        border-radius: 13px;
        color: #0f766e;
        background: rgba(255, 255, 255, .92);
        box-shadow: 0 12px 24px rgba(2, 6, 23, .14);
    }

    .nr-register-value-item strong {
        display: block;
        margin-bottom: 3px;
        color: #fff;
        font-size: 14px;
        font-weight: 850;
    }

    .nr-register-value-item span {
        display: block;
        color: rgba(255, 255, 255, .78);
        font-size: 12.5px;
        line-height: 1.5;
    }

    .nr-register-process {
        margin-top: 0 !important;
    }

    .nr-register-trust-box {
        display: flex;
        align-items: flex-start;
        gap: 11px;
        padding: 14px 15px;
        border-radius: 18px;
        color: rgba(255, 255, 255, .84);
        background: rgba(2, 6, 23, .16);
        border: 1px solid rgba(255, 255, 255, .13);
        font-size: 12.5px;
        line-height: 1.55;
    }

    .nr-register-trust-box i {
        margin-top: 2px;
        color: #5eead4;
    }

    .nr-register-card {
        height: auto !important;
        min-height: 0 !important;
    }

    @media (min-width: 992px) {
        .nr-auth-hero .col-lg-5 {
            position: relative;
        }

        .nr-register-intro-card {
            width: 100%;
        }
    }

    .nr-auth-form .row.g-3 {
        align-items: flex-start;
    }

    .nr-legal-consent-card {
        display: flex;
        gap: 14px;
        padding: 16px;
        margin-top: 4px;
        border: 1px solid rgba(15, 23, 42, .08);
        border-radius: 18px;
        background: linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(245, 249, 255, .92));
        box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
    }

    .nr-legal-consent-icon {
        width: 46px;
        height: 46px;
        flex: 0 0 46px;
        display: grid;
        place-items: center;
        color: #fff;
        border-radius: 15px;
        background: linear-gradient(135deg, #0f766e, #14b8a6);
        box-shadow: 0 12px 25px rgba(20, 184, 166, .24);
    }

    .nr-legal-consent-content strong {
        display: block;
        color: #0f172a;
        font-size: 15px;
        margin-bottom: 4px;
    }

    .nr-legal-consent-content p {
        margin: 0 0 10px;
        color: #64748b;
        font-size: 13px;
        line-height: 1.55;
    }

    .nr-legal-shortcuts {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .nr-legal-open {
        border: 1px solid rgba(20, 184, 166, .25);
        color: #0f766e;
        background: rgba(20, 184, 166, .08);
        border-radius: 999px;
        padding: 8px 12px;
        font-size: 12px;
        font-weight: 700;
        transition: .2s ease;
    }

    .nr-legal-open:hover {
        transform: translateY(-1px);
        background: rgba(20, 184, 166, .14);
    }

    .nr-terms-box-enhanced {
        margin-top: 12px;
        padding: 14px 14px 14px 42px;
        border-radius: 14px;
        background: rgba(15, 23, 42, .035);
    }

    .nr-legal-modal {
        position: fixed;
        inset: 0;
        z-index: 9999;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 22px;
    }

    .nr-legal-modal.is-open { display: flex; }

    .nr-legal-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(2, 6, 23, .68);
        backdrop-filter: blur(10px);
    }

    .nr-legal-dialog {
        position: relative;
        width: min(960px, 100%);
        max-height: min(88vh, 860px);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border-radius: 28px;
        background: #fff;
        box-shadow: 0 35px 90px rgba(2, 6, 23, .35);
        animation: nrLegalModalIn .22s ease both;
    }

    @keyframes nrLegalModalIn {
        from { opacity: 0; transform: translateY(18px) scale(.98); }
        to { opacity: 1; transform: translateY(0) scale(1); }
    }

    .nr-legal-header {
        display: flex;
        justify-content: space-between;
        gap: 18px;
        padding: 26px 28px 20px;
        color: #fff;
        background:
            radial-gradient(circle at top right, rgba(255, 255, 255, .22), transparent 34%),
            linear-gradient(135deg, #0f172a, #0f766e);
    }

    .nr-legal-kicker {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 7px 11px;
        border-radius: 999px;
        background: rgba(255, 255, 255, .14);
        font-size: 12px;
        font-weight: 800;
    }

    .nr-legal-header h3 {
        margin: 12px 0 7px;
        font-size: clamp(22px, 3vw, 32px);
        font-weight: 850;
    }

    .nr-legal-header p {
        margin: 0;
        max-width: 660px;
        color: rgba(255, 255, 255, .78);
        line-height: 1.55;
    }

    .nr-legal-close {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        display: grid;
        place-items: center;
        color: #fff;
        border: 1px solid rgba(255, 255, 255, .22);
        border-radius: 14px;
        background: rgba(255, 255, 255, .12);
    }

    .nr-legal-tabs {
        display: flex;
        gap: 10px;
        padding: 16px 20px 12px;
        background: #f8fafc;
        overflow-x: auto;
    }

    .nr-legal-tabs button {
        white-space: nowrap;
        border: 1px solid rgba(15, 23, 42, .08);
        color: #475569;
        background: #fff;
        border-radius: 999px;
        padding: 11px 16px;
        font-weight: 800;
        transition: .2s ease;
    }

    .nr-legal-tabs button.active {
        color: #fff;
        border-color: transparent;
        background: linear-gradient(135deg, #0f766e, #14b8a6);
        box-shadow: 0 14px 26px rgba(20, 184, 166, .22);
    }

    .nr-legal-progress {
        height: 4px;
        background: #e2e8f0;
    }

    .nr-legal-progress span {
        display: block;
        width: 0;
        height: 100%;
        background: linear-gradient(90deg, #0f766e, #14b8a6);
        transition: width .16s ease;
    }

    .nr-legal-body {
        padding: 24px 28px;
        overflow-y: auto;
        color: #334155;
        line-height: 1.72;
    }

    .nr-legal-panel { display: none; }
    .nr-legal-panel.active { display: block; }

    .nr-legal-panel h4 {
        margin: 0 0 14px;
        color: #0f172a;
        font-size: 24px;
        font-weight: 850;
    }

    .nr-legal-panel p {
        margin-bottom: 14px;
    }

    .nr-legal-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 18px 22px;
        border-top: 1px solid #e2e8f0;
        background: #fff;
    }

    .nr-legal-footer-note {
        display: flex;
        align-items: center;
        gap: 9px;
        color: #64748b;
        font-size: 13px;
    }

    .nr-legal-actions {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .nr-legal-secondary,
    .nr-legal-primary {
        border: 0;
        border-radius: 14px;
        padding: 12px 16px;
        font-weight: 850;
    }

    .nr-legal-secondary {
        color: #334155;
        background: #e2e8f0;
    }

    .nr-legal-primary {
        display: inline-flex;
        align-items: center;
        gap: 9px;
        color: #fff;
        background: linear-gradient(135deg, #0f766e, #14b8a6);
        box-shadow: 0 14px 28px rgba(20, 184, 166, .24);
    }



    .nr-field {
        position: relative;
    }

    .nr-password-field {
        position: relative;
    }

    .nr-password-control {
        position: relative;
    }

    .nr-password-control .form-control {
        padding-right: 58px !important;
    }

    .nr-password-control .form-control:focus {
        z-index: 1;
    }

    .nr-password-control .nr-password-toggle {
        position: absolute;
        top: 50%;
        right: 14px;
        z-index: 20;
        width: 38px;
        height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transform: translateY(-50%);
        border: 0;
        border-radius: 12px;
        color: #64748b;
        background: transparent;
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
        pointer-events: auto;
        transition: color .18s ease, background-color .18s ease, box-shadow .18s ease;
    }

    .nr-password-control .nr-password-toggle:hover,
    .nr-password-control .nr-password-toggle:focus {
        color: #0f766e;
        background: rgba(20, 184, 166, .10);
        outline: none;
        box-shadow: 0 0 0 .18rem rgba(20, 184, 166, .12);
    }

    .nr-password-control .nr-password-toggle.is-visible {
        color: #0f766e;
        background: rgba(20, 184, 166, .10);
    }

    .nr-password-control .nr-password-toggle i {
        pointer-events: none;
        font-size: 16px;
        line-height: 1;
    }

    .nr-field .form-control.nr-input-invalid,
    .nr-terms-box.nr-input-invalid {
        border-color: rgba(220, 38, 38, .65) !important;
        box-shadow: 0 0 0 .22rem rgba(220, 38, 38, .10) !important;
    }

    .nr-field .form-control.nr-input-valid {
        border-color: rgba(15, 118, 110, .46) !important;
        box-shadow: 0 0 0 .18rem rgba(20, 184, 166, .09) !important;
    }

    .nr-validation-message {
        display: none;
        align-items: flex-start;
        gap: 7px;
        margin: 7px 2px 0;
        color: #dc2626;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.35;
    }

    .nr-validation-message.is-visible {
        display: flex;
    }

    .nr-validation-message::before {
        content: "!";
        width: 17px;
        height: 17px;
        flex: 0 0 17px;
        display: grid;
        place-items: center;
        margin-top: -1px;
        color: #fff;
        background: #dc2626;
        border-radius: 999px;
        font-size: 11px;
        font-weight: 900;
    }

    .nr-password-strength {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
        margin: 9px 2px 0;
    }

    .nr-password-strength span {
        height: 5px;
        border-radius: 999px;
        background: #e2e8f0;
        transition: .18s ease;
    }

    .nr-password-strength[data-score="1"] span:nth-child(-n+1) { background: #ef4444; }
    .nr-password-strength[data-score="2"] span:nth-child(-n+2) { background: #f59e0b; }
    .nr-password-strength[data-score="3"] span:nth-child(-n+3) { background: #14b8a6; }
    .nr-password-strength[data-score="4"] span:nth-child(-n+4) { background: #0f766e; }

    .nr-form-alert {
        display: none;
        align-items: flex-start;
        gap: 10px;
        padding: 13px 14px;
        margin: 2px 0 14px;
        border: 1px solid rgba(220, 38, 38, .18);
        border-radius: 14px;
        color: #991b1b;
        background: rgba(254, 242, 242, .96);
        font-size: 13px;
        font-weight: 700;
        line-height: 1.45;
    }

    .nr-form-alert.is-visible {
        display: flex;
    }

    .nr-form-alert i {
        margin-top: 2px;
    }

    body.nr-legal-lock { overflow: hidden; }

    @media (max-width: 767.98px) {

        .nr-register-intro-card {
            position: relative !important;
            top: auto !important;
            gap: 16px;
            padding: 24px !important;
            overflow: visible !important;
        }

        .nr-register-value-grid {
            gap: 10px;
        }

        .nr-register-value-item {
            padding: 12px;
        }

        .nr-register-value-item i {
            width: 34px;
            height: 34px;
            flex-basis: 34px;
            border-radius: 11px;
        }

        .nr-register-trust-box {
            padding: 12px 13px;
        }

        .nr-legal-modal { padding: 10px; align-items: flex-end; }
        .nr-legal-dialog { max-height: 94vh; border-radius: 24px 24px 0 0; }
        .nr-legal-header { padding: 22px 20px 18px; }

        .nr-legal-tabs {
            display: grid;
            grid-template-columns: 1fr;
            gap: 8px;
            padding: 12px 14px 10px;
            overflow: visible;
        }

        .nr-legal-tabs button {
            width: 100%;
            min-height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
            white-space: normal;
            text-align: center;
            line-height: 1.25;
            padding: 10px 12px;
            border-radius: 14px;
            font-size: 13px;
            box-sizing: border-box;
        }

        .nr-legal-tabs button.active {
            box-shadow: 0 10px 20px rgba(20, 184, 166, .20);
        }

        .nr-legal-body { padding: 20px; }
        .nr-legal-footer { align-items: stretch; flex-direction: column; }
        .nr-legal-actions { display: grid; grid-template-columns: 1fr; }
        .nr-legal-consent-card { flex-direction: column; }
    }

    @media (min-width: 420px) and (max-width: 767.98px) {
        .nr-legal-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
        .nr-legal-tabs button {
            min-height: 52px;
            padding: 9px 8px;
            font-size: 12px;
        }
    }
