/**
 * 🔱 RBN Core - Framework [v0.9.7]
 * 🏛️ ARCHITECTURE  : RBN Asset Engine
 * ---------------------------------------
 * 🛰️ COMPONENT     : RbnKit v1.0
 * ⚓ RESOURCE      : rbn-common.css [Core]
 * 🛡️ STATUS        : Verified & Proxied
 * ---------------------------------------
 */

/* ==========================================================================
   RBN Core Framework Common Stylesheet (RbnCommon) 🌐
   ========================================================================== */

/* --- 1. RBN Footer Bottom Bar 🌐 (Token-Driven Engine) --- */
.rbn-footer-bottom-bar {
    background: var(--rbn-footer-bg, var(--bg-surface-subtle, var(--rbn-bg-surface-subtle, #0a1120)));
    color: var(--rbn-footer-text, var(--text-muted, var(--rbn-text-muted, rgba(255, 255, 255, 0.45))));
    border-top: 1px solid var(--rbn-footer-border, var(--border-subtle, var(--rbn-border-subtle, rgba(255, 255, 255, 0.08))));
    padding: var(--rbn-space-6, 24px) 0;
    font-size: 0.85rem;
    width: 100%;
}



.rbn-footer-bottom-container {
    max-width: var(--rbn-container-max, 1200px);
    margin: 0 auto;
    padding: 0 var(--rbn-space-6, 24px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--rbn-space-4, 16px);
}

.rbn-footer-copyright-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.rbn-footer-divider {
    margin: 0 6px;
    opacity: 0.35;
}

.rbn-footer-sitemap-link,
.rbn-footer-powered-link {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.25s ease, border-color 0.25s ease;
    border-bottom: 1px dashed currentColor;
}

.rbn-footer-sitemap-link:hover,
.rbn-footer-powered-link:hover {
    color: var(--rbn-footer-link-hover, var(--rbn-primary, var(--primary-color, var(--rbn-accent, #38bdf8))));
    border-bottom-color: var(--rbn-footer-link-hover, var(--rbn-primary, var(--primary-color, var(--rbn-accent, #38bdf8))));
}

.rbn-footer-powered-by {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rbn-footer-powered-opacity {
    opacity: 0.65;
}

@media (max-width: 768px) {
    .rbn-footer-bottom-bar {
        padding: 20px 0 28px;
        text-align: center;
    }

    .rbn-footer-bottom-container {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 12px;
        padding: 0 16px;
    }

    .rbn-footer-copyright-info {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
    }

    .rbn-footer-links-row {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }

    .rbn-footer-powered-by {
        justify-content: center;
        font-size: 0.8125rem;
    }
}

/* --- 2. RBN Scroll To Top Button 🚀 (Token-Driven Engine) --- */
.rbn-scroll-to-top,
.rbn-scroll-top {
    position: fixed;
    bottom: var(--rbn-scroll-bottom, 30px);
    right: var(--rbn-scroll-right, 30px);
    inset-inline-end: var(--rbn-scroll-right, 30px);
    z-index: 99999;
    width: var(--rbn-scroll-size, 44px);
    height: var(--rbn-scroll-size, 44px);
    background: var(--rbn-scroll-bg, var(--rbn-bg-elevated, var(--bg-surface, #0f172a)));
    color: var(--rbn-scroll-color, var(--rbn-accent, var(--rbn-primary, var(--accent-color, var(--primary-color, #38bdf8)))));
    border-radius: var(--rbn-scroll-radius, var(--rbn-radius-md, var(--radius-md, 10px)));
    border: var(--rbn-scroll-border, 1px solid var(--rbn-border-strong, var(--border-color, rgba(255, 255, 255, 0.15))));
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--rbn-scroll-shadow, var(--rbn-shadow-lg, 0 10px 25px -5px rgba(0, 0, 0, 0.35)));
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 1.25rem;
    line-height: 1;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.rbn-scroll-to-top:hover,
.rbn-scroll-top:hover {
    background: var(--rbn-scroll-hover-bg, var(--rbn-primary, var(--primary-color, #1e293b)));
    color: var(--rbn-scroll-hover-color, #ffffff);
    border-color: var(--rbn-scroll-hover-border, var(--rbn-primary-hover, var(--primary-color, #38bdf8)));
    transform: translateY(-3px);
    box-shadow: var(--rbn-scroll-hover-shadow, var(--rbn-shadow-xl, 0 15px 30px -5px rgba(0, 0, 0, 0.45)));
}

.rbn-scroll-to-top.active,
.rbn-scroll-top.active,
.rbn-scroll-top.show,
.rbn-scroll-to-top.show {
    display: flex;
}

/* İkon Yönetimi: Eğer HTML içinde <i> etiketi varsa onu gösterir; yoksa CSS pseudo RemixIcon fallback devreye girer 🎯 */
.rbn-scroll-to-top:empty::before,
.rbn-scroll-top:empty::before {
    content: var(--rbn-scroll-icon, "\ea76"); /* Varsayılan: ri-arrow-up-line */
    font-family: "remixicon";
    font-style: normal;
    font-size: 1.35rem;
    line-height: 1;
    display: inline-block;
    -webkit-font-smoothing: antialiased;
}

.rbn-scroll-to-top i,
.rbn-scroll-top i {
    font-size: 1.35rem;
    line-height: 1;
    display: inline-block;
}

/* Default Desktop Offset when cookie notice is active */
body.has-cookie-notice .rbn-scroll-to-top,
body.has-cookie-notice .rbn-scroll-top {
    bottom: calc(var(--rbn-scroll-bottom, 30px) + var(--rbn-cookie-offset, 66px)) !important;
}

@media (max-width: 768px) {
    .rbn-scroll-to-top,
    .rbn-scroll-top {
        bottom: 20px !important;
        right: 16px !important;
        inset-inline-end: 16px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 1.15rem !important;
    }

    body.has-cookie-notice .rbn-scroll-to-top,
    body.has-cookie-notice .rbn-scroll-top {
        bottom: calc(var(--rbn-space-5) + var(--rbn-cookie-offset, 160px)) !important;
    }
}

/* --- 3. RBN Legal Cookie Notice Bar 🍪 (Token-Driven Engine) ---
   Üç düğme (kabul / reddet / tercihler) AYNI sınıf, AYNI boyut, AYNI görsel ağırlık (docs yasal/kvkk-web-sitesi-gereksinimleri.md kural 3).
   Düzen her genişlikte aynı: metin üstte TAM GENİŞLİKTE (gövde ≥ 18 px, başlık ≥ 22 px), üç eşit düğme altta (≥ 48 px; ≤ 640 px alt alta tam genişlik).
   Bant ekran yüksekliğinin ≤ %40'ı kadar yer kaplar, taşan içerik bant içinde kaydırılır; Tercihler açıkken bu sınır genişler.
   Proje yalnız --rbn-cookie-* renk token'larını verir; bu bileşen projede yeniden yazılmaz. */
.rbn-cookie-bar {
    position: fixed;
    bottom: max(var(--rbn-space-4), env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    width: calc(100% - var(--rbn-space-8));
    max-width: min(var(--rbn-cookie-max-width, 1100px), 1100px);
    max-height: 40vh;
    max-height: 40dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--rbn-cookie-bg, var(--rbn-slate-900));
    color: var(--rbn-cookie-text, var(--rbn-white));
    backdrop-filter: var(--rbn-cookie-blur, none);
    -webkit-backdrop-filter: var(--rbn-cookie-blur, none);
    border: var(--rbn-cookie-border, 1px solid var(--rbn-border-strong));
    border-radius: var(--rbn-cookie-radius, var(--rbn-radius-lg));
    padding: var(--rbn-space-6);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--rbn-space-6);
    box-shadow: var(--rbn-cookie-shadow, var(--rbn-shadow-modal));
    font-family: var(--rbn-cookie-font, inherit);
    font-size: 1.125rem;
    line-height: 1.6;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
    opacity: 0;
    /* Hidden bar must not cover (or take focus from) the page bottom, e.g. the footer's cookie-settings link */
    visibility: hidden;
    pointer-events: none;
}

.rbn-cookie-bar.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Light Theme Cookie Bar (İsteyen projeler için class veya token ile) ☀️ */
.rbn-cookie-bar.rbn-cookie-light,
[data-theme="light"] .rbn-cookie-bar-auto,
.theme-light .rbn-cookie-bar-auto {
    --rbn-cookie-bg: var(--rbn-bg-surface);
    --rbn-cookie-text: var(--rbn-text-primary);
    --rbn-cookie-border: 1px solid var(--rbn-border);
    --rbn-cookie-btn-bg: var(--rbn-primary);
    --rbn-cookie-btn-text: var(--rbn-text-on-primary);
}

.rbn-cookie-content {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--rbn-cookie-text);
}

.rbn-cookie-content p {
    margin: 0;
}

/* Başlık (ikon + yazı) ve metin (çerez politikası bağlantısı dahil) yatayda ortalı; satır uzunluğu okunur kalır */
.rbn-cookie-content .rbn-cookie-text {
    max-width: 72ch;
    margin-inline: auto;
    text-align: center;
}

.rbn-cookie-content .rbn-cookie-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--rbn-space-2);
    margin-bottom: var(--rbn-space-2);
    text-align: center;
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.4;
}

.rbn-cookie-title i {
    color: var(--rbn-cookie-icon, var(--rbn-accent));
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
}

.rbn-cookie-content a {
    color: var(--rbn-cookie-link, var(--rbn-cookie-text));
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.rbn-cookie-content a:hover {
    color: var(--rbn-cookie-link-hover, var(--rbn-cookie-link, var(--rbn-cookie-text)));
}

/* Üç düğme: eşit sütunlar, aynı yükseklik, aynı dolgu */
.rbn-cookie-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: center;
    gap: var(--rbn-space-3);
}

.rbn-cookie-bar .rbn-cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--rbn-space-2);
    min-height: var(--rbn-space-12);
    padding: var(--rbn-space-2) var(--rbn-space-4);
    background: var(--rbn-cookie-btn-bg, var(--rbn-white));
    color: var(--rbn-cookie-btn-text, var(--rbn-slate-900));
    border: 2px solid var(--rbn-cookie-btn-border-color, var(--rbn-cookie-btn-bg, var(--rbn-white)));
    border-radius: var(--rbn-cookie-btn-radius, var(--rbn-radius-md));
    font-family: inherit;
    font-size: 1rem;
    font-weight: var(--rbn-cookie-btn-font-weight, 700);
    line-height: 1.25;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.rbn-cookie-bar .rbn-cookie-btn i {
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
}

.rbn-cookie-bar .rbn-cookie-btn:hover {
    background: var(--rbn-cookie-btn-hover-bg, var(--rbn-slate-100));
    color: var(--rbn-cookie-btn-hover-text, var(--rbn-cookie-btn-text, var(--rbn-slate-900)));
    border-color: var(--rbn-cookie-btn-hover-bg, var(--rbn-slate-100));
}

.rbn-cookie-bar .rbn-cookie-btn:focus-visible,
.rbn-cookie-content a:focus-visible {
    outline: 3px solid var(--rbn-cookie-focus, var(--rbn-accent));
    outline-offset: 2px;
}

.rbn-cookie-bar .rbn-cookie-btn:active {
    transform: translateY(1px);
}

/* Tercihler paneli */
.rbn-cookie-prefs {
    display: flex;
    flex-direction: column;
    gap: var(--rbn-space-3);
    margin-top: var(--rbn-space-4);
    padding-top: var(--rbn-space-4);
    border-top: 1px solid var(--rbn-cookie-divider, var(--rbn-border-strong));
}

.rbn-cookie-prefs[hidden] {
    display: none;
}

.rbn-cookie-prefs p {
    max-width: 72ch;
    margin-inline: auto;
    text-align: center;
}

.rbn-cookie-prefs label {
    width: 100%;
    max-width: 72ch;
    margin-inline: auto;
    display: flex;
    align-items: flex-start;
    gap: var(--rbn-space-3);
    min-height: var(--rbn-space-12);
    cursor: pointer;
}

.rbn-cookie-prefs input[type="checkbox"] {
    flex-shrink: 0;
    width: var(--rbn-space-6);
    height: var(--rbn-space-6);
    margin: var(--rbn-space-1) 0 0;
    accent-color: var(--rbn-cookie-icon, var(--rbn-accent));
}

/* Seçimi Kaydet: üst satırdaki üç düğmeyle aynı genişlik ve yükseklik */
.rbn-cookie-prefs .rbn-cookie-btn {
    width: calc((100% - var(--rbn-space-3) * 2) / 3);
    margin-inline: auto;
}

/* Tercihler açıkken bant daha yüksek olabilir (yine kaydırılır) */
.rbn-cookie-bar:has(.rbn-cookie-prefs:not([hidden])) {
    max-height: 85vh;
    max-height: 85dvh;
}

/* Dar ekran: düğmeler alt alta tam genişlik; yazı boyutu masaüstüyle aynı kalır; 3 alt alta düğme + 18 px metin %40 sınırına sığmaz, bu yüzden %75 */
@media (max-width: 640px) {
    .rbn-cookie-bar {
        bottom: max(var(--rbn-space-2), env(safe-area-inset-bottom, 0px));
        width: calc(100% - var(--rbn-space-4));
        padding: var(--rbn-space-4);
        gap: var(--rbn-space-4);
        max-height: 75vh;
        max-height: 75dvh;
    }

    .rbn-cookie-actions {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--rbn-space-2);
    }

    .rbn-cookie-prefs .rbn-cookie-btn {
        width: 100%;
    }
}

/* ==========================================================================
   4. RBN Pure-CSS Tooltip Engine (Zero JS / 0 KB) 🪐🛡️⚓
   Kullanım: <button data-tooltip="Şifreyi Göster">...</button>
   Opsiyonel Yön: data-tooltip-pos="bottom" (Varsayılan: top)
   ========================================================================== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before,
[data-tooltip]::after {
    position: absolute;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 999999 !important;
}

/* 1. METİN BALONCUĞU */
[data-tooltip]::before {
    content: attr(data-tooltip);
    bottom: calc(100% + 7px);
    left: calc(50% + var(--rbn-tip-shift, 0px)); /* kenara yakın öğede JS içeri kaydırır */
    transform: translateX(-50%) translateY(4px);
    padding: 5px 10px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 0.72rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.02em;
    white-space: nowrap;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

/* 2. OK UCU ÜÇGENİ */
[data-tooltip]::after {
    content: '';
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    border: 5px solid transparent;
    border-top-color: #0f172a;
}

/* Tablo Sonu Sağ Köşe Elemanları İçin Otomatik Sağ Hizalı Üst Tooltip (Kırpılma Önleyici) */
.text-end [data-tooltip]:last-child::before,
td:last-child [data-tooltip]:last-child::before {
    left: auto;
    right: 0;
    transform: translateX(0) translateY(4px);
}

.text-end [data-tooltip]:last-child::after,
td:last-child [data-tooltip]:last-child::after {
    left: auto;
    right: 10px;
    transform: translateX(0) translateY(4px);
}

.text-end [data-tooltip]:last-child:hover::before,
td:last-child [data-tooltip]:last-child:hover::before,
.text-end [data-tooltip]:last-child:focus-visible::before,
td:last-child [data-tooltip]:last-child:focus-visible::before {
    transform: translateX(0) translateY(0);
}

.text-end [data-tooltip]:last-child:hover::after,
td:last-child [data-tooltip]:last-child:hover::after,
.text-end [data-tooltip]:last-child:focus-visible::after,
td:last-child [data-tooltip]:last-child:focus-visible::after {
    transform: translateX(0) translateY(0);
}

/* Tablo Başı Sol Köşe Elemanları İçin Otomatik Sol Hizalı Üst Tooltip (Kırpılma Önleyici) */
td:first-child [data-tooltip]::before,
.text-start [data-tooltip]:first-child::before {
    left: 0;
    right: auto;
    transform: translateX(0) translateY(4px);
}

td:first-child [data-tooltip]::after,
.text-start [data-tooltip]:first-child::after {
    left: 12px;
    right: auto;
    transform: translateX(0) translateY(4px);
}

td:first-child [data-tooltip]:hover::before,
td:first-child [data-tooltip]:focus-visible::before,
.text-start [data-tooltip]:first-child:hover::before,
.text-start [data-tooltip]:first-child:focus-visible::before {
    transform: translateX(0) translateY(0);
}

td:first-child [data-tooltip]:hover::after,
td:first-child [data-tooltip]:focus-visible::after,
.text-start [data-tooltip]:first-child:hover::after,
.text-start [data-tooltip]:first-child:focus-visible::after {
    transform: translateX(0) translateY(0);
}

/* Hover Tetikleyicisi (Üst Yön) */
[data-tooltip]:hover::before,
[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::before,
[data-tooltip]:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ALT YÖN: data-tooltip-pos="bottom" */
[data-tooltip-pos="bottom"]::before {
    bottom: auto;
    top: calc(100% + 7px);
    transform: translateX(-50%) translateY(-4px);
}

[data-tooltip-pos="bottom"]::after {
    bottom: auto;
    top: calc(100% + 2px);
    transform: translateX(-50%) translateY(-4px);
    border-top-color: transparent;
    border-bottom-color: #0f172a;
}

[data-tooltip-pos="bottom"]:hover::before,
[data-tooltip-pos="bottom"]:hover::after,
[data-tooltip-pos="bottom"]:focus-visible::before,
[data-tooltip-pos="bottom"]:focus-visible::after {
    transform: translateX(-50%) translateY(0);
}

/* SAĞ YÖN: data-tooltip-pos="right" (Örn: Kapalı Sidebar İkonları) 🧭 */
[data-tooltip-pos="right"]::before {
    bottom: auto;
    left: calc(100% + 9px);
    right: auto;
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
}

[data-tooltip-pos="right"]::after {
    bottom: auto;
    left: calc(100% + 3px);
    right: auto;
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    border-top-color: transparent;
    border-right-color: #0f172a;
}

[data-tooltip-pos="right"]:hover::before,
[data-tooltip-pos="right"]:hover::after,
[data-tooltip-pos="right"]:focus-visible::before,
[data-tooltip-pos="right"]:focus-visible::after {
    transform: translateY(-50%) translateX(0);
}

/* SOL YÖN: data-tooltip-pos="left" (Örn: Tablo Sonu Butonları & Sağ Kenar Elemanları) 👈 */
[data-tooltip-pos="left"]::before {
    bottom: auto;
    left: auto;
    right: calc(100% + 9px);
    top: 50%;
    transform: translateY(-50%) translateX(4px);
}

[data-tooltip-pos="left"]::after {
    bottom: auto;
    left: auto;
    right: calc(100% + 3px);
    top: 50%;
    transform: translateY(-50%) translateX(4px);
    border-top-color: transparent;
    border-left-color: #0f172a;
}

[data-tooltip-pos="left"]:hover::before,
[data-tooltip-pos="left"]:hover::after,
[data-tooltip-pos="left"]:focus-visible::before,
[data-tooltip-pos="left"]:focus-visible::after {
    transform: translateY(-50%) translateX(0);
}