/* Giriş / kayıt / şifre sayfaları. Tam ekran sensör ağı + ortada cam kart.
   Renkler sol drawer'ın koyu mor temasıyla aynı aile. */

.bx-auth {
    --bx-bg: #0e0a1d;
    --bx-text: #f4f1ff;
    --bx-muted: #a49cc9;
    --bx-faint: #6f6799;
    --bx-border: rgba(255, 255, 255, .09);
    --bx-border-strong: rgba(162, 151, 224, .35);
    --bx-accent: #6c5ce7;
    --bx-accent-2: #9061f0;
    --bx-accent-soft: #c4b8ff;
    --bx-danger: #ff7a95;
    --bx-radius: 14px;

    margin: 0;
    min-height: 100vh;
    background: var(--bx-bg);
    color: var(--bx-text);
    font-family: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

/* ---------- Zemin: ağ tuvali + ışık ---------- */

.bx-net {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: block;
}

.bx-glow {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(900px 600px at 50% 45%, rgba(108, 92, 231, .22), transparent 65%),
        radial-gradient(700px 500px at 0% 0%, rgba(144, 97, 240, .16), transparent 70%),
        radial-gradient(700px 500px at 100% 100%, rgba(61, 123, 255, .10), transparent 70%);
}

.bx-glow::after {
    /* kenarları karart, gözü ortaya topla */
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 85% 75% at 50% 50%, transparent 55%, rgba(8, 5, 18, .75) 100%);
}

/* ---------- Üst şerit ---------- */

.bx-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.bx-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
}

.bx-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--bx-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: .2px;
}

.bx-brand:hover {
    color: var(--bx-text);
    text-decoration: none;
}

.bx-brand img {
    width: 34px;
    height: 34px;
    display: block;
}

.bx-lang {
    display: inline-flex;
    padding: 4px;
    gap: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--bx-border);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.bx-lang a {
    min-width: 40px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .6px;
    text-align: center;
    color: var(--bx-muted);
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, color .15s;
}

.bx-lang a:hover {
    color: var(--bx-text);
    text-decoration: none;
}

.bx-lang a.is-active {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.bx-lang .bx-spinner {
    margin: 6px 14px;
}

/* ---------- Sahne: kart + çevresindeki etiketler ---------- */

.bx-stage {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 20px 40px;
}

.bx-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 36px 36px 30px;
    border-radius: 24px;
    background:
        radial-gradient(360px circle at var(--mx, 50%) var(--my, -20%), rgba(144, 97, 240, .16), transparent 65%),
        linear-gradient(180deg, rgba(37, 28, 72, .72) 0%, rgba(22, 16, 44, .78) 100%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    backdrop-filter: blur(22px) saturate(140%);
    box-shadow:
        0 30px 80px rgba(5, 3, 15, .6),
        inset 0 1px 0 rgba(255, 255, 255, .06);
    animation: bx-rise .5s cubic-bezier(.2, .7, .2, 1) both;
    view-transition-name: bx-card;
}

/* hata varsa açılıştan sonra kısa bir "hayır" sallanması */
.bx-card.has-errors {
    animation: bx-rise .5s cubic-bezier(.2, .7, .2, 1) both, bx-shake .45s .5s ease-in-out;
}

@keyframes bx-shake {
    20% { transform: translateX(-7px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(2px); }
}

.bx-card::before {
    /* degrade kenar çizgisi */
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    /* üstteki katman imleci takip eden parıltı (--mx/--my JS'ten) */
    background:
        radial-gradient(220px circle at var(--mx, 50%) var(--my, -30%), rgba(220, 212, 255, .95), transparent 70%),
        linear-gradient(140deg, rgba(196, 184, 255, .55) 0%, rgba(255, 255, 255, .06) 35%, rgba(255, 255, 255, .04) 65%, rgba(144, 97, 240, .5) 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
    pointer-events: none;
}

@keyframes bx-rise {
    from { opacity: 0; transform: translateY(14px) scale(.985); }
    to { opacity: 1; transform: none; }
}

.bx-mark {
    position: relative;
    width: 56px;
    height: 56px;
    margin: 0 auto 26px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--bx-accent) 0%, var(--bx-accent-2) 100%);
    box-shadow: 0 10px 30px rgba(108, 92, 231, .5);
    transition: box-shadow .25s;
}

/* her tuşta logo kısa bir parlama yapar */
.bx-mark.is-ping {
    animation: bx-ping .45s ease-out;
}

@keyframes bx-ping {
    0% { transform: scale(1); box-shadow: 0 10px 30px rgba(108, 92, 231, .5); }
    30% { transform: scale(1.07); box-shadow: 0 0 0 6px rgba(196, 184, 255, .18), 0 10px 44px rgba(144, 97, 240, .9); }
    100% { transform: scale(1); box-shadow: 0 10px 30px rgba(108, 92, 231, .5); }
}

.bx-mark img {
    width: 34px;
    height: 34px;
    display: block;
}

.bx-mark::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 22px;
    border: 2px solid rgba(196, 184, 255, .5);
    animation: bx-pulse 2.8s ease-out infinite;
}

@keyframes bx-pulse {
    0% { transform: scale(.92); opacity: .9; }
    70%, 100% { transform: scale(1.25); opacity: 0; }
}

.bx-head {
    margin-bottom: 24px;
    text-align: center;
}

.bx-title {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -.3px;
    color: var(--bx-text);
}

.bx-desc {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--bx-muted);
}

/* sekmeli sayfalarda başlık sekmeyi tekrarlamasın; ekran okuyucu için yerinde kalır */
.bx-tabs ~ div .bx-title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Giriş | Kayıt sekmeleri */
.bx-tabs {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 4px;
    margin-bottom: 22px;
    border-radius: 12px;
    background: rgba(0, 0, 0, .25);
    border: 1px solid var(--bx-border);
}

.bx-tabs a {
    position: relative;
    z-index: 1;
    padding: 9px 0;
    border-radius: 9px;
    text-align: center;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--bx-muted);
    text-decoration: none;
    transition: color .2s;
}

.bx-tabs a:hover {
    color: var(--bx-text);
    text-decoration: none;
}

.bx-tabs a.is-active {
    color: #fff;
}

.bx-tabs__pill {
    /* kayan zemin; sayfa geçişinde view-transition ile yer değiştirir */
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    border-radius: 9px;
    background: linear-gradient(90deg, var(--bx-accent) 0%, var(--bx-accent-2) 100%);
    box-shadow: 0 4px 14px rgba(108, 92, 231, .4);
    view-transition-name: bx-pill;
}

.bx-tabs[data-active="register"] .bx-tabs__pill {
    transform: translateX(100%);
}

/* ---------- Form alanları ---------- */

.bx-field {
    margin-bottom: 16px;
}

.bx-label {
    display: block;
    margin-bottom: 7px;
    font-size: 12.5px;
    font-weight: 500;
    color: #d6d0f0;
}

.bx-control {
    position: relative;
}

.bx-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: var(--bx-faint);
    pointer-events: none;
    transition: color .15s;
}

.bx-input {
    width: 100%;
    height: 50px;
    padding: 0 14px 0 46px;
    border-radius: var(--bx-radius);
    border: 1px solid var(--bx-border);
    background: rgba(8, 5, 20, .45);
    color: var(--bx-text);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}

.bx-input::placeholder {
    color: var(--bx-faint);
}

.bx-input:hover {
    border-color: rgba(255, 255, 255, .18);
}

.bx-input:focus {
    border-color: var(--bx-accent-soft);
    background: rgba(108, 92, 231, .1);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, .25), 0 0 24px rgba(108, 92, 231, .25);
}

.bx-control:focus-within .bx-icon {
    color: var(--bx-accent-soft);
}

.bx-input:-webkit-autofill,
.bx-input:-webkit-autofill:hover,
.bx-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--bx-text);
    -webkit-box-shadow: 0 0 0 1000px #1c1538 inset;
    caret-color: var(--bx-text);
    transition: background-color 9999s;
}

.bx-input--pw {
    padding-right: 50px;
}

.bx-eye {
    position: absolute;
    right: 7px;
    top: 50%;
    width: 36px;
    height: 36px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--bx-faint);
    cursor: pointer;
    transition: color .15s, background-color .15s;
}

.bx-eye:hover,
.bx-eye:focus-visible {
    color: var(--bx-text);
    background: rgba(255, 255, 255, .07);
    outline: none;
}

.bx-eye svg {
    width: 18px;
    height: 18px;
}

.bx-eye .bx-eye__off,
.bx-eye[aria-pressed="true"] .bx-eye__on {
    display: none;
}

.bx-eye[aria-pressed="true"] .bx-eye__off {
    display: block;
}

.bx-field.is-invalid .bx-input {
    border-color: rgba(255, 122, 149, .75);
}

.bx-field.is-invalid .bx-input:focus {
    box-shadow: 0 0 0 4px rgba(255, 122, 149, .18);
}

.bx-field.is-invalid .bx-icon {
    color: var(--bx-danger);
}

.bx-error {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 7px;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--bx-danger);
}

.bx-error::before {
    content: "!";
    flex: none;
    width: 15px;
    height: 15px;
    margin-top: 1px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 122, 149, .18);
    font-size: 10px;
    font-weight: 700;
}

/* ---------- Onay kutusu ve satırlar ---------- */

.bx-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 2px 0 22px;
}

.bx-check {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--bx-muted);
    cursor: pointer;
    user-select: none;
}

.bx-check input {
    -webkit-appearance: none;
    appearance: none;
    flex: none;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(8, 5, 20, .45);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background-color .15s, border-color .15s;
}

.bx-check input::after {
    content: "";
    width: 9px;
    height: 5px;
    margin-top: -2px;
    border: 2px solid #fff;
    border-top: 0;
    border-right: 0;
    transform: rotate(-45deg) scale(0);
    transition: transform .12s;
}

.bx-check input:checked {
    background: linear-gradient(135deg, var(--bx-accent), var(--bx-accent-2));
    border-color: transparent;
}

.bx-check input:checked::after {
    transform: rotate(-45deg) scale(1);
}

.bx-check input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, .3);
}

.bx-field.is-invalid .bx-check input {
    border-color: var(--bx-danger);
}

.bx-agree {
    margin: 4px 0 22px;
}

.bx-link {
    color: var(--bx-accent-soft);
    font-weight: 500;
    text-decoration: none;
    transition: color .15s;
}

.bx-link:hover,
.bx-link:focus {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bx-row .bx-link {
    font-size: 13px;
}

/* ---------- Düğme ---------- */

.bx-btn {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: var(--bx-radius);
    background: linear-gradient(90deg, var(--bx-accent) 0%, var(--bx-accent-2) 100%);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .2px;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(108, 92, 231, .4);
    transition: transform .15s, box-shadow .15s, filter .15s;
}

.bx-btn::before {
    /* üzerinden geçen parıltı */
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent);
    transform: skewX(-20deg);
    transition: left .6s ease;
}

.bx-btn:hover::before {
    left: 120%;
}

.bx-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 14px 34px rgba(108, 92, 231, .5);
}

.bx-btn:active {
    transform: none;
    box-shadow: 0 4px 12px rgba(108, 92, 231, .35);
}

.bx-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, .35), 0 10px 28px rgba(108, 92, 231, .4);
}

.bx-btn .bx-arrow {
    width: 18px;
    height: 18px;
    transition: transform .15s;
}

.bx-btn:hover .bx-arrow {
    transform: translateX(3px);
}

.bx-btn.is-loading {
    pointer-events: none;
    filter: saturate(.8);
}

.bx-btn.is-loading > span,
.bx-btn.is-loading .bx-arrow {
    visibility: hidden;
}

.bx-btn.is-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    animation: bx-spin .7s linear infinite;
}

.bx-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .25);
    border-top-color: #fff;
    animation: bx-spin .7s linear infinite;
}

@keyframes bx-spin {
    to { transform: rotate(360deg); }
}

.bx-alt {
    margin-top: 22px;
    text-align: center;
    font-size: 13.5px;
    color: var(--bx-muted);
}

.bx-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bx-back svg {
    width: 16px;
    height: 16px;
    transition: transform .15s;
}

.bx-back:hover svg {
    transform: translateX(-3px);
}

.bx-tagline {
    max-width: 440px;
    margin: 22px 0 0;
    line-height: 1.6;
    font-size: 13px;
    color: var(--bx-faint);
    text-align: center;
}

/* ---------- Kısa ekran: kart genişlemeden kayıt dahil her şey kaydırmasız sığsın ---------- */

@media (min-width: 576px) and (max-height: 860px) {
    .bx-top {
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .bx-stage {
        padding-top: 0;
        padding-bottom: 8px;
    }

    .bx-card {
        padding: 24px 32px 22px;
    }

    .bx-mark {
        width: 44px;
        height: 44px;
        margin-bottom: 16px;
        border-radius: 14px;
    }

    .bx-mark img {
        width: 27px;
        height: 27px;
    }

    .bx-mark::after {
        border-radius: 18px;
    }

    .bx-tabs {
        margin-bottom: 14px;
    }

    /* sekme zaten "Giriş"/"Kayıt Ol" diyor; altındaki açıklama kısa ekranda yer kaplamasın */
    .bx-tabs ~ div .bx-head {
        display: none;
    }

    .bx-head {
        margin-bottom: 14px;
    }

    .bx-field {
        margin-bottom: 10px;
    }

    .bx-label {
        margin-bottom: 5px;
    }

    .bx-input {
        height: 44px;
    }

    .bx-agree,
    .bx-row {
        margin-bottom: 14px;
    }

    .bx-btn {
        height: 46px;
    }

    .bx-tagline {
        display: none;
    }

    .bx-foot {
        padding-bottom: 10px;
    }
}

/* kayıt formu daha uzun: aynı sıkılaştırma 861-940 px arasında yalnız kayıt sayfasında */
@media (min-width: 576px) and (min-height: 861px) and (max-height: 940px) {
    /* üst şerit ve alt satır burada sıkılaşmaz: sayfalar arası geçişte logo ve dil seçici yerinde kalsın */
    .bx-type-register .bx-stage {
        padding-top: 0;
        padding-bottom: 8px;
    }

    .bx-type-register .bx-card {
        padding: 24px 32px 22px;
    }

    .bx-type-register .bx-mark {
        width: 44px;
        height: 44px;
        margin-bottom: 16px;
        border-radius: 14px;
    }

    .bx-type-register .bx-mark img {
        width: 27px;
        height: 27px;
    }

    .bx-type-register .bx-mark::after {
        border-radius: 18px;
    }

    .bx-type-register .bx-tabs {
        margin-bottom: 14px;
    }

    /* sekme zaten "Giriş"/"Kayıt Ol" diyor; altındaki açıklama kısa ekranda yer kaplamasın */
    .bx-type-register .bx-tabs ~ div .bx-head {
        display: none;
    }

    .bx-type-register .bx-head {
        margin-bottom: 14px;
    }

    .bx-type-register .bx-field {
        margin-bottom: 10px;
    }

    .bx-type-register .bx-label {
        margin-bottom: 5px;
    }

    .bx-type-register .bx-input {
        height: 44px;
    }

    .bx-type-register .bx-agree,
    .bx-type-register .bx-row {
        margin-bottom: 14px;
    }

    .bx-type-register .bx-btn {
        height: 46px;
    }

    .bx-type-register .bx-tagline {
        display: none;
    }

}

@media (min-width: 576px) and (max-height: 800px) {
    /* çok kısa ekran: logo sol üstte zaten var */
    .bx-mark {
        display: none;
    }

    .bx-card {
        padding-top: 20px;
    }

    .bx-error {
        margin-top: 4px;
        font-size: 12px;
        line-height: 1.35;
    }

    .bx-btn {
        height: 44px;
    }
}

/* ---------- Alt satır ---------- */

.bx-foot {
    padding: 0 32px 20px;
    font-size: 12px;
    color: var(--bx-faint);
    text-align: center;
}

/* ---------- Dar ekran ---------- */

@media (max-width: 575.98px) {
    .bx-top {
        padding: 18px 16px;
    }

    .bx-brand span {
        display: none;
    }

    .bx-stage {
        justify-content: flex-start;
        padding: 4px 12px 170px;
    }

    .bx-card {
        padding: 28px 22px 24px;
        border-radius: 20px;
    }
}

@media (max-width: 380px) {
    .bx-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bx-mark::after,
    .bx-card,
    .bx-card.has-errors,
    .bx-mark.is-ping {
        animation: none;
    }

    .bx-btn::before {
        display: none;
    }

    .bx-btn,
    .bx-btn:hover,
    .bx-btn .bx-arrow,
    .bx-back svg {
        transform: none;
        transition: none;
    }
}

.bx-auth #toast-container > div {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
    opacity: 1;
}

/* Çerez bandı: satır içi stilleri ezmek için !important gerekiyor (vendor/cookieConsent) */
.bx-auth .cookie-consent {
    left: 50% !important;
    bottom: 16px !important;
    width: min(720px, calc(100% - 24px)) !important;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 14px;
    padding: 14px 52px 14px 20px;
    border: 1px solid var(--bx-border-strong);
    border-radius: 16px;
    background: rgba(30, 22, 56, .85) !important;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 16px 40px rgba(5, 3, 15, .5);
    opacity: 1 !important;
    font-size: 13px;
}

@media (min-width: 992px) {
    /* masaüstünde ortadaki kartı kapatmasın: sol alt köşe */
    .bx-auth .cookie-consent {
        left: 24px !important;
        bottom: 24px !important;
        width: clamp(240px, calc(50vw - 260px), 400px) !important;
        transform: none;
        justify-content: flex-start;
        text-align: left !important;
    }
}

.bx-auth .cookie-consent .cookie-consent__message {
    color: #d6d0f0 !important;
}

.bx-auth .cookie-consent .site-agreement {
    color: var(--bx-accent-soft);
    font-weight: 500;
}

.bx-auth .cookie-consent .cookie-consent__agree {
    padding: 7px 16px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--bx-accent) 0%, var(--bx-accent-2) 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(108, 92, 231, .35);
}

.bx-auth .cookie-consent .close {
    position: absolute;
    top: 50%;
    right: 14px;
    padding: 4px 8px;
    transform: translateY(-50%);
    color: var(--bx-muted);
    text-shadow: none;
    opacity: 1;
}

/* ---------- Sayfalar arası geçiş (Chrome/Edge 126+; desteklemeyen tarayıcı normal açar) ---------- */

@media (prefers-reduced-motion: no-preference) {
    @view-transition {
        navigation: auto;
    }
}

::view-transition-group(bx-card),
::view-transition-group(bx-pill) {
    animation-duration: .38s;
    animation-timing-function: cubic-bezier(.2, .7, .2, 1);
}

/* Sayfanın geri kalanı çapraz geçiş yapmaz, yeni hali doğrudan ve canlı görünür: logo ve dil
   seçici soluklaşmaz, ağın eski/yeni iki görüntüsü üst üste binmez. Yalnız kart ve sekme zemini
   animasyonla değişir. */
::view-transition-old(root) {
    display: none;
}

::view-transition-new(root) {
    animation: none;
}

/* geçişle gelindiyse kartın açılış animasyonu oynamasın, yoksa yeni görüntü boş yakalanır */
.bx-vt .bx-card {
    animation: none;
}

.bx-vt .bx-card.has-errors {
    animation: bx-shake .45s .3s ease-in-out;
}

/* ---------- Sözleşme görüntüleyici (<dialog>) ---------- */

.bx-doc {
    width: min(760px, calc(100vw - 32px));
    height: min(82vh, 820px);
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 22px;
    overflow: hidden;
    color: var(--bx-text);
    background:
        radial-gradient(500px 260px at 0% 0%, rgba(144, 97, 240, .18), transparent 70%),
        linear-gradient(180deg, rgba(34, 26, 66, .94) 0%, rgba(20, 15, 40, .96) 100%);
    box-shadow:
        0 40px 120px rgba(4, 2, 12, .7),
        0 0 0 1px rgba(196, 184, 255, .22),
        inset 0 1px 0 rgba(255, 255, 255, .07);
    font-family: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* style.bundle.css "dialog { display: block }" diyor; kapalı pencere arkada görünmesin */
.bx-doc:not([open]) {
    display: none;
}

.bx-doc[open] {
    display: flex;
    flex-direction: column;
    animation: bx-doc-in .32s cubic-bezier(.2, .8, .2, 1) both;
}

.bx-doc.is-closing {
    animation: bx-doc-out .18s ease-in both;
}

.bx-doc::backdrop {
    background: rgba(8, 5, 18, .55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: bx-fade .3s ease both;
}

.bx-doc.is-closing::backdrop {
    animation: bx-fade .18s ease reverse both;
}

@keyframes bx-doc-in {
    from { opacity: 0; transform: translateY(18px) scale(.97); filter: blur(4px); }
    to { opacity: 1; transform: none; filter: none; }
}

@keyframes bx-doc-out {
    to { opacity: 0; transform: translateY(10px) scale(.98); }
}

@keyframes bx-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.bx-doc__head {
    position: relative;
    flex: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 16px 20px;
    border-bottom: 1px solid var(--bx-border);
}

.bx-doc__icon {
    width: 36px;
    height: 36px;
    flex: none;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--bx-accent) 0%, var(--bx-accent-2) 100%);
    box-shadow: 0 6px 18px rgba(108, 92, 231, .45);
    color: #fff;
}

.bx-doc__icon svg {
    width: 18px;
    height: 18px;
}

.bx-doc__title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--bx-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bx-doc__tool {
    width: 36px;
    height: 36px;
    flex: none;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--bx-muted);
    cursor: pointer;
    transition: background-color .15s, color .15s;
}

.bx-doc__tool:hover,
.bx-doc__tool:focus-visible {
    background: rgba(255, 255, 255, .08);
    color: #fff;
    outline: none;
}

.bx-doc__tool svg {
    width: 18px;
    height: 18px;
}

/* okuma ilerlemesi: başlığın alt çizgisi boyunca dolar */
.bx-doc__progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    overflow: hidden;
}

.bx-doc__progress i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--bx-accent) 0%, var(--bx-accent-soft) 100%);
    box-shadow: 0 0 10px rgba(196, 184, 255, .7);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .1s linear;
}

.bx-doc__body {
    position: relative;
    flex: 1;
    min-height: 0;
}

.bx-doc__frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    opacity: 0;
    transition: opacity .25s;
}

.bx-doc.is-loaded .bx-doc__frame {
    opacity: 1;
}

.bx-doc__skeleton {
    position: absolute;
    inset: 0;
    padding: 30px 34px;
    transition: opacity .2s;
}

.bx-doc.is-loaded .bx-doc__skeleton {
    opacity: 0;
    pointer-events: none;
}

.bx-doc__skeleton i {
    display: block;
    width: 100%;
    height: 12px;
    margin-bottom: 14px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .05) 0%, rgba(196, 184, 255, .14) 50%, rgba(255, 255, 255, .05) 100%);
    background-size: 200% 100%;
    animation: bx-shimmer 1.2s linear infinite;
}

@keyframes bx-shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

.bx-doc__foot {
    flex: none;
    display: flex;
    justify-content: flex-end;
    padding: 14px 18px;
    border-top: 1px solid var(--bx-border);
    background: rgba(0, 0, 0, .12);
}

.bx-doc__ok {
    min-width: 120px;
    height: 40px;
    padding: 0 20px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(90deg, var(--bx-accent) 0%, var(--bx-accent-2) 100%);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(108, 92, 231, .4);
    transition: filter .15s, transform .15s;
}

.bx-doc__ok:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.bx-doc__ok:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, .35);
}

@media (max-width: 575.98px) {
    /* telefonda alttan açılan tam ekran sayfa */
    .bx-doc {
        width: 100vw;
        height: calc(100dvh - 24px);
        margin: auto 0 0;
        border-radius: 22px 22px 0 0;
    }

    .bx-doc[open] {
        animation-name: bx-sheet-in;
    }

    .bx-doc.is-closing {
        animation-name: bx-sheet-out;
    }

    .bx-doc__skeleton {
        padding: 24px 20px;
    }
}

@keyframes bx-sheet-in {
    from { transform: translateY(100%); }
    to { transform: none; }
}

@keyframes bx-sheet-out {
    to { transform: translateY(100%); }
}

@media (prefers-reduced-motion: reduce) {
    .bx-doc[open],
    .bx-doc.is-closing,
    .bx-doc::backdrop,
    .bx-doc__skeleton i {
        animation: none;
    }
}
