/*
  OrvaPro Neo — kompakt header v2 ("nxt" namespace)
  bayigram-tarzı: ince topbar + canlı teslimat ticker'ı + slim nav bandı.
  Mevcut fdh-* işlevselliği korunur; sadece yoğunluk/yerleşim sıkılaştırılır.
*/

/* ---------- Topbar sıkılaştırma ---------- */

.nxt-compact .fdh-topbar {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
}

.nxt-compact .fdh-shell--topbar {
    min-height: 2.1rem;
}

/* ---------- Canlı teslimat ticker'ı ---------- */

.nxt-ticker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 24rem;
    padding: 0.22rem 0.3rem 0.22rem 0.28rem;
    border-radius: 999px;
    background: rgba(16, 201, 143, 0.09);
    border: 1px solid rgba(16, 201, 143, 0.22);
}

.nxt-ticker__live {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    flex: 0 0 auto;
    padding: 0.16rem 0.55rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #34e3b0;
    background: rgba(16, 201, 143, 0.18);
}

.nxt-ticker__dot {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: #10c98f;
}

.nxt-ticker__viewport {
    position: relative;
    display: block;
    width: 17rem;
    max-width: 46vw;
    height: 1.35rem;
    overflow: hidden;
}

.nxt-ticker__item {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    min-width: 0;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
    pointer-events: none;
}

.nxt-ticker__item.is-active {
    opacity: 1;
    transform: translateY(0);
}

.nxt-ticker__item.is-leaving {
    opacity: 0;
    transform: translateY(-100%);
}

.nxt-ticker__ic {
    flex: 0 0 auto;
    font-size: 0.95rem;
    line-height: 1;
    color: var(--tone, #2563eb);
}

.nxt-ticker__txt {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.76rem;
    font-weight: 500;
    color: rgba(242, 246, 255, 0.88);
}

.nxt-ticker__txt strong {
    font-weight: 700;
    color: #ffffff;
}

.nxt-ticker__meta {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    flex: 0 0 auto;
    font-size: 0.68rem;
    font-weight: 700;
    color: #2fd6a5;
    white-space: nowrap;
}

.nxt-ticker__meta > i {
    font-size: 0.82rem;
    line-height: 1;
}

@media (prefers-reduced-motion: no-preference) {
    .nxt-ticker__dot {
        animation: nxtPulse 2s ease-out infinite;
    }
}

@keyframes nxtPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 201, 143, 0.45);
    }
    70% {
        box-shadow: 0 0 0 0.42rem rgba(16, 201, 143, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 201, 143, 0);
    }
}

html[data-bs-theme="dark"] .nxt-ticker {
    background: rgba(16, 201, 143, 0.1);
    border-color: rgba(16, 201, 143, 0.26);
}

html[data-bs-theme="dark"] .nxt-ticker__txt {
    color: #e9effb;
}

/* ---------- Topbar duyuru (sol) ---------- */

/* Topbar zemini her temada koyu — metinler tema bağımsız açık */
.nxt-announce {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(242, 246, 255, 0.92);
}

.nxt-announce__ic {
    flex: 0 0 auto;
    font-size: 1rem;
    color: #8ab0ff;
}

.nxt-announce__txt {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nxt-announce__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    flex: 0 0 auto;
    font-weight: 700;
    color: #9cc2ff;
    text-decoration: none;
}

.nxt-announce__cta:hover {
    text-decoration: underline;
    color: #b7d4ff;
}

/* ---------- Ana bant: logo + arama + aksiyonlar ---------- */

.nxt-compact .fdh-main-band {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.nxt-mainrow {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.5vw, 2rem);
}

.nxt-compact .fdh-logo {
    height: 2.3rem;
    width: auto;
}

/* Hızlı arama */
.nxt-search {
    position: relative;
    flex: 1 1 auto;
    max-width: 34rem;
    margin: 0 auto;
    min-width: 0;
}

.nxt-search__ic {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.05rem;
    color: rgba(15, 27, 51, 0.55);
    pointer-events: none;
    z-index: 1;
}

.nxt-search__input {
    width: 100%;
    padding: 0.66rem 1rem 0.66rem 2.5rem;
    border: 1.5px solid rgba(15, 27, 51, 0.16);
    border-radius: 0.9rem;
    background: #fff;
    box-shadow: 0 4px 16px -10px rgba(15, 27, 51, 0.35);
    font-size: 0.9rem;
    font-weight: 500;
    color: #0f1b33;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nxt-search__input:focus {
    border-color: rgba(37, 99, 235, 0.6);
    background: #fff;
    box-shadow: 0 0 0 0.22rem rgba(37, 99, 235, 0.14);
}

.nxt-search__input::placeholder {
    color: rgba(15, 27, 51, 0.48);
}

.nxt-search__input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.nxt-search__panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    z-index: 1200;
    padding: 0.4rem;
    border-radius: 0.9rem;
    background: #fff;
    border: 1px solid rgba(15, 27, 51, 0.08);
    box-shadow: 0 22px 48px -18px rgba(15, 27, 51, 0.35);
    max-height: 22rem;
    overflow-y: auto;
}

.nxt-search__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.nxt-search__row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.7rem;
    border-radius: 0.6rem;
    text-decoration: none;
    color: #0f1b33;
    transition: background 0.15s ease;
}

.nxt-search__row:hover,
.nxt-search__row:focus-visible {
    background: rgba(37, 99, 235, 0.07);
    color: #0f1b33;
}

.nxt-search__row > i:first-child {
    flex: 0 0 auto;
    font-size: 1.1rem;
}

.nxt-search__t {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 600;
}

.nxt-search__s {
    flex: 0 0 auto;
    font-size: 0.74rem;
    font-weight: 600;
    color: rgba(15, 27, 51, 0.45);
    background: rgba(15, 27, 51, 0.05);
    padding: 0.14rem 0.5rem;
    border-radius: 999px;
}

.nxt-search__go {
    margin-left: auto;
    font-size: 1rem;
    color: rgba(15, 27, 51, 0.3);
}

.nxt-search__empty {
    margin: 0;
    padding: 0.7rem 0.8rem;
    font-size: 0.84rem;
    color: rgba(15, 27, 51, 0.5);
}

/* Giriş butonu etiketi */
.nxt-login .nxt-login__txt {
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
}

/* ---------- Alt nav bandı ---------- */

.nxt-navband {
    border-top: 1px solid rgba(15, 27, 51, 0.07);
    background: transparent;
}

.nxt-navrow {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 2.9rem;
}

.nxt-navrow .fdh-nav {
    flex: 1 1 auto;
    min-width: 0;
}

.nxt-track {
    flex: 0 0 auto;
    margin-left: auto;
}

/* ---------- Dark tema ---------- */

html[data-bs-theme="dark"] .nxt-announce {
    color: #e9effb;
}

html[data-bs-theme="dark"] .nxt-search__input {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(233, 239, 251, 0.28);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 4px 16px -10px rgba(0, 0, 0, 0.5);
    color: #e9effb;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

html[data-bs-theme="dark"] .nxt-search__input:focus {
    background: rgba(17, 25, 40, 0.95);
    border-color: rgba(125, 179, 255, 0.65);
    box-shadow: 0 0 0 0.22rem rgba(96, 151, 255, 0.16);
}

html[data-bs-theme="dark"] .nxt-search__input::placeholder {
    color: rgba(233, 239, 251, 0.62);
}

html[data-bs-theme="dark"] .nxt-search__ic {
    color: rgba(233, 239, 251, 0.68);
}

html[data-bs-theme="dark"] .nxt-search__panel {
    background: #131c2e;
    border-color: rgba(233, 239, 251, 0.1);
}

html[data-bs-theme="dark"] .nxt-search__row {
    color: #e9effb;
}

html[data-bs-theme="dark"] .nxt-search__row:hover,
html[data-bs-theme="dark"] .nxt-search__row:focus-visible {
    background: rgba(96, 151, 255, 0.12);
    color: #e9effb;
}

html[data-bs-theme="dark"] .nxt-search__s {
    color: rgba(233, 239, 251, 0.5);
    background: rgba(233, 239, 251, 0.08);
}

html[data-bs-theme="dark"] .nxt-search__empty {
    color: rgba(233, 239, 251, 0.5);
}

html[data-bs-theme="dark"] .nxt-navband {
    border-top-color: rgba(233, 239, 251, 0.08);
}

/* ---------- Arama tetikleyicisi (palet açar) ---------- */

/* Header zemini her temada koyu — tetikleyici cam stil (tema bağımsız) */
.nxt-search__trigger {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.62rem 0.8rem 0.62rem 2.5rem;
    border: 1.5px solid rgba(233, 239, 251, 0.24);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nxt-search__trigger:hover,
.nxt-search__trigger:focus-visible {
    border-color: rgba(233, 239, 251, 0.45);
    background: rgba(255, 255, 255, 0.13);
    box-shadow: 0 0 0 0.2rem rgba(125, 179, 255, 0.12);
}

.nxt-search__ph {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(233, 239, 251, 0.62);
}

.nxt-search .nxt-search__ic {
    color: rgba(233, 239, 251, 0.65);
}

.nxt-search__kbd {
    flex: 0 0 auto;
    padding: 0.14rem 0.45rem;
    border-radius: 0.4rem;
    border: 1px solid rgba(233, 239, 251, 0.22);
    background: rgba(233, 239, 251, 0.08);
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(233, 239, 251, 0.65);
    white-space: nowrap;
}

/* Palet içi kbd'ler panel zeminine göre (light/dark ayrımı korunur) */
.nxk-foot kbd,
.nxk-close kbd {
    flex: 0 0 auto;
    padding: 0.14rem 0.45rem;
    border-radius: 0.4rem;
    border: 1px solid rgba(15, 27, 51, 0.14);
    background: rgba(15, 27, 51, 0.04);
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(15, 27, 51, 0.55);
    white-space: nowrap;
}

html[data-bs-theme="dark"] .nxk-foot kbd,
html[data-bs-theme="dark"] .nxk-close kbd {
    border-color: rgba(233, 239, 251, 0.2);
    background: rgba(233, 239, 251, 0.08);
    color: rgba(233, 239, 251, 0.65);
}

/* ---------- Komut paleti ---------- */

body.nxk-open {
    overflow: hidden;
}

.nxk-overlay {
    position: fixed;
    inset: 0;
    z-index: 4000;
    background: rgba(6, 11, 25, 0.55);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Panel: arama kutusunun üzerine oturur, sonuçlar altına açılır (JS top/left/width verir) */
.nxk-panel {
    position: absolute;
    width: min(40rem, calc(100vw - 2rem));
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    border-radius: 1.1rem;
    background: #fff;
    border: 1px solid rgba(15, 27, 51, 0.08);
    box-shadow: 0 40px 90px -30px rgba(4, 10, 30, 0.7);
    overflow: hidden;
    animation: nxkDrop 0.2s cubic-bezier(0.22, 0.61, 0.36, 1);
    transform-origin: top center;
}

/* Tetikleyici görünmüyorsa (mobil/scroll) ortalanmış fallback */
.nxk-panel.nxk-panel--center {
    left: 50% !important;
    top: 12vh !important;
    transform: translateX(-50%);
}

@keyframes nxkDrop {
    from {
        opacity: 0;
        transform: translateY(-6px) scaleY(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scaleY(1);
    }
}

.nxk-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.95rem 1.1rem;
    border-bottom: 1px solid rgba(15, 27, 51, 0.08);
}

.nxk-head__ic {
    font-size: 1.2rem;
    color: rgba(15, 27, 51, 0.45);
}

.nxk-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 1.05rem;
    font-weight: 500;
    color: #0f1b33;
}

.nxk-input::placeholder {
    color: rgba(15, 27, 51, 0.38);
}

.nxk-close {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.nxk-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0.6rem 0.6rem 0.8rem;
}

.nxk-group__label {
    padding: 0.65rem 0.6rem 0.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(15, 27, 51, 0.45);
}

.nxk-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 0.7rem;
    border-radius: 0.7rem;
    text-decoration: none;
    color: #0f1b33;
}

.nxk-row.is-sel {
    background: rgba(37, 99, 235, 0.08);
}

.nxk-row__ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    border-radius: 0.6rem;
    font-size: 1.05rem;
    color: var(--tone, #2563eb);
    background: rgba(37, 99, 235, 0.08);
    background: color-mix(in srgb, var(--tone, #2563eb) 11%, transparent);
}

.nxk-row__t {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.92rem;
    font-weight: 600;
}

.nxk-mark {
    padding: 0;
    background: transparent;
    color: var(--bs-primary, #2563eb);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.nxk-row__s {
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(15, 27, 51, 0.45);
    background: rgba(15, 27, 51, 0.05);
    padding: 0.14rem 0.5rem;
    border-radius: 999px;
}

.nxk-row__go {
    margin-left: auto;
    font-size: 1rem;
    color: rgba(15, 27, 51, 0.25);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.nxk-row.is-sel .nxk-row__go {
    opacity: 1;
}

.nxk-empty {
    margin: 0;
    padding: 1.2rem 1rem;
    font-size: 0.9rem;
    color: rgba(15, 27, 51, 0.5);
}

.nxk-foot {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1.1rem;
    border-top: 1px solid rgba(15, 27, 51, 0.08);
    background: rgba(15, 27, 51, 0.02);
}

.nxk-foot__hint {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(15, 27, 51, 0.45);
}

html[data-bs-theme="dark"] .nxk-panel {
    background: #101a2e;
    border-color: rgba(233, 239, 251, 0.1);
}

html[data-bs-theme="dark"] .nxk-head {
    border-bottom-color: rgba(233, 239, 251, 0.08);
}

html[data-bs-theme="dark"] .nxk-input {
    color: #e9effb;
}

html[data-bs-theme="dark"] .nxk-input::placeholder {
    color: rgba(233, 239, 251, 0.4);
}

html[data-bs-theme="dark"] .nxk-head__ic {
    color: rgba(233, 239, 251, 0.5);
}

html[data-bs-theme="dark"] .nxk-group__label {
    color: rgba(233, 239, 251, 0.45);
}

html[data-bs-theme="dark"] .nxk-row {
    color: #e9effb;
}

html[data-bs-theme="dark"] .nxk-row.is-sel {
    background: rgba(96, 151, 255, 0.14);
}

html[data-bs-theme="dark"] .nxk-mark {
    color: #8ab0ff;
}

html[data-bs-theme="dark"] .nxk-row__s {
    color: rgba(233, 239, 251, 0.5);
    background: rgba(233, 239, 251, 0.08);
}

html[data-bs-theme="dark"] .nxk-row__go {
    color: rgba(233, 239, 251, 0.35);
}

html[data-bs-theme="dark"] .nxk-empty {
    color: rgba(233, 239, 251, 0.5);
}

html[data-bs-theme="dark"] .nxk-foot {
    border-top-color: rgba(233, 239, 251, 0.08);
    background: rgba(233, 239, 251, 0.03);
}

html[data-bs-theme="dark"] .nxk-foot__hint {
    color: rgba(233, 239, 251, 0.45);
}

/* ---------- Hesap kartı (bayigram tarzı) ---------- */

/* Hesap kartı da header zeminiyle uyumlu cam stil (tema bağımsız) */
.nxt-acct__btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.42rem 0.7rem 0.42rem 0.5rem;
    border: 1.5px solid rgba(233, 239, 251, 0.22);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.nxt-acct__btn::after {
    display: none !important;
}

.nxt-acct__btn:hover,
.nxt-acct__btn[aria-expanded="true"] {
    border-color: rgba(233, 239, 251, 0.42);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 0.18rem rgba(125, 179, 255, 0.12);
}

.nxt-acct__ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 0.65rem;
    font-size: 1.15rem;
    color: #9cc2ff;
    background: rgba(125, 179, 255, 0.16);
}

.nxt-acct__avatar {
    flex: 0 0 auto;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 0.65rem;
    object-fit: cover;
}

.nxt-acct__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
    min-width: 0;
}

.nxt-acct__meta strong {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 800;
    color: #f2f6ff;
}

.nxt-acct__meta small {
    font-size: 0.72rem;
    font-weight: 600;
    color: #2fd6a5;
}

.nxt-acct__caret {
    font-size: 1.05rem;
    color: rgba(233, 239, 251, 0.5);
}

.nxt-acct__panel {
    min-width: 21rem;
    padding: 0.8rem;
    border-radius: 1rem;
    border: 1px solid rgba(15, 27, 51, 0.08);
    box-shadow: 0 24px 55px -22px rgba(4, 10, 30, 0.4);
}

.nxt-acct__cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
}

.nxt-acct__cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 1.05rem 0.8rem;
    border-radius: 0.85rem;
    font-size: 0.92rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    transition: transform 0.18s ease, filter 0.18s ease;
}

.nxt-acct__cta:hover,
.nxt-acct__cta:focus-visible {
    color: #fff;
    transform: translateY(-2px);
    filter: brightness(1.06);
}

.nxt-acct__cta > i {
    font-size: 1.5rem;
    line-height: 1;
}

.nxt-acct__cta--login {
    background: linear-gradient(135deg, #34d39b 0%, #0ea474 100%);
    box-shadow: 0 12px 24px -12px rgba(14, 164, 116, 0.6);
}

.nxt-acct__cta--reg {
    background: linear-gradient(135deg, #5b7cfa 0%, #3d55e0 100%);
    box-shadow: 0 12px 24px -12px rgba(61, 85, 224, 0.6);
}

html[data-bs-theme="dark"] .nxt-acct__btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(233, 239, 251, 0.18);
}

html[data-bs-theme="dark"] .nxt-acct__meta strong {
    color: #e9effb;
}

html[data-bs-theme="dark"] .nxt-acct__caret {
    color: rgba(233, 239, 251, 0.45);
}

html[data-bs-theme="dark"] .nxt-acct__ic {
    background: rgba(96, 151, 255, 0.14);
    color: #8ab0ff;
}

html[data-bs-theme="dark"] .nxt-acct__panel {
    background: #101a2e;
    border-color: rgba(233, 239, 251, 0.1);
}

/* ---------- Responsive ---------- */

@media (max-width: 1199.98px) {
    .nxt-ticker {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .nxt-search {
        display: none;
    }

    .nxk-overlay {
        padding-top: 6vh;
    }
}
