﻿/* =====================================================
   _Header.css  —  Site Header Stilleri
   Bağlantı: <link rel="stylesheet" href="~/css/_Header.css" />
   ===================================================== */

/* ─── Temel değişkenler ─── */
:root {
    --sh-height: 56px;
    --sh-bg: #ffffff;
    --sh-bg2: #f9fafb;
    --sh-border: rgba(0, 0, 0, 0.07);
    --sh-text: #111827;
    --sh-muted: #6b7280;
    --sh-hover-bg: #f3f4f6;
    --sh-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --sh-panel-shadow: 0 8px 20px rgba(0, 0, 0, 0.07), 0 2px 6px rgba(0, 0, 0, 0.04);
    --sh-radius: 12px;
    --sh-radius-sm: 8px;
    --sh-accent: #2563eb;
    --sh-accent-bg: #eff6ff;
    --sh-accent-text: #1d4ed8;
    --sh-danger: #dc2626;
    --sh-danger-bg: #fef2f2;
    --sh-badge: #ef4444;
    --sh-transition: 0.15s ease;
    --sh-font: -apple-system, 'Segoe UI', system-ui, sans-serif;
}

/* ─── Bootstrap 5 dark mode uyumu ─── */
[data-bs-theme="dark"] {
    --sh-bg: #111111;
    --sh-bg2: #1a1a1a;
    --sh-border: rgba(255, 255, 255, 0.08);
    --sh-text: #f5f5f5;
    --sh-muted: #9ca3af;
    --sh-hover-bg: #1e1e1e;
    --sh-shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
    --sh-panel-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.2);
    --sh-accent-bg: #1e3a5f;
    --sh-accent-text: #93c5fd;
    --sh-danger-bg: #3b1212;
}

/* Bildirim liste öğesi */
.sh-notif-item {
    list-style: none;
}

.sh-notif-link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 16px;
    text-decoration: none;
    color: inherit;
    transition: background .15s;
}

    .sh-notif-link:hover {
        background: var(--bs-secondary-bg, #f8f9fa);
    }

.sh-notif-sender {
    font-weight: 600;
    font-size: .82rem;
}

.sh-notif-subject {
    font-size: .85rem;
}

.sh-notif-preview {
    font-size: .78rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Bildirim liste öğesi son*/

/* ─── Header wrapper ─── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    font-family: var(--sh-font);
}

/* ─── Navbar ─── */
.sh-navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--sh-height);
    padding: 0 1.25rem;
    background: var(--sh-bg);
    border-bottom: 1px solid var(--sh-border);
    box-shadow: var(--sh-shadow);
    position: relative;
    gap: 12px;
}

/* ─── Marka ─── */

.sh-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
}

/* Resim kabı — sabit kare, yuvarlak köşeli */
.sh-logo-wrap {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.sh-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* logo kesilmez, orantılı sığar */
    display: block;
}

.sh-brand:hover .sh-logo-wrap {
    transform: scale(1.07);
    opacity: 0.88;
}

/* Metin */
.sh-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    gap: 1px;
    font-size: 12px;
    text-decoration: none;
    color: brown;
    white-space: nowrap;
    /* font / color / hover sh-brand'den miras alır */
}

    .sh-logo-text small {
        font-size: 10px;
        font-weight: 400;
        color: brown;
        letter-spacing: 0.3px;
        line-height: 1;
        text-decoration: none;
        white-space: nowrap;
    }

/* ── 360 px ve altı ── */
@media (max-width: 390px) {
    .sh-logo-wrap {
        width: 28px;
        height: 28px;
        border-radius: 7px;
    }
    .sh-logo-text {
        display: flex;
        flex-direction: column;
        line-height: 1.2;
        gap: 1px;
        font-size: 10px;
        text-decoration: none;
        /* font / color / hover sh-brand'den miras alır */
    }

        .sh-logo-text small {
            font-size: 8px;
            font-weight: 400;
            color: brown;
            letter-spacing: 0.3px;
            line-height: 1;
            text-decoration: none;
        }
    .sh-brand {
        gap: 7px;
    }

}



/*.sh-brand {
    font-size: 15px;
    font-weight: 700;
    color: var(--sh-text);
    text-decoration: none;
    letter-spacing: -0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

    .sh-brand:hover {
        color: var(--sh-accent);
    }*/

/* ─── Desktop nav linkleri (orta) ─── */
.sh-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.sh-nav__link {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--sh-muted);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--sh-radius-sm);
    transition: background var(--sh-transition), color var(--sh-transition);
    white-space: nowrap;
}

    .sh-nav__link:hover,
    .sh-nav__link.active {
        background: var(--sh-hover-bg);
        color: var(--sh-text);
    }

/* ─── Sağ küme ─── */
.sh-right {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* ─── Ortak ikon butonu ─── */
.sh-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--sh-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    position: relative;
    transition: background var(--sh-transition), border-color var(--sh-transition);
    color: var(--sh-muted);
}

    .sh-icon-btn:hover,
    .sh-icon-btn[aria-expanded="true"] {
        background: var(--sh-hover-bg);
        border-color: var(--sh-border);
        color: var(--sh-text);
    }

    .sh-icon-btn svg {
        width: 17px;
        height: 17px;
        stroke: currentColor;
        fill: none;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

/* ─── Bildirim rozeti ─── */
.sh-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--sh-badge);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    border: 1.5px solid var(--sh-bg);
}

/* ─── Kullanıcı butonu ─── */
.sh-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 10px 0 5px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--sh-radius-sm);
    cursor: pointer;
    transition: background var(--sh-transition), border-color var(--sh-transition);
}

    .sh-user-btn:hover,
    .sh-user-btn[aria-expanded="true"] {
        background: var(--sh-hover-bg);
        border-color: var(--sh-border);
    }

.sh-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--sh-accent-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--sh-accent-text);
    flex-shrink: 0;
    user-select: none;
}

.sh-username {
    font-size: 13px;
    font-weight: 500;
    color: var(--sh-text);
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sh-chevron {
    width: 13px;
    height: 13px;
    stroke: var(--sh-muted);
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform var(--sh-transition);
    flex-shrink: 0;
}

.sh-user-btn[aria-expanded="true"] .sh-chevron {
    transform: rotate(180deg);
}

/* ─── Auth butonları (giriş yapılmamış) ─── */
.sh-auth-btn {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    border-radius: var(--sh-radius-sm);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--sh-transition), border-color var(--sh-transition), color var(--sh-transition);
    white-space: nowrap;
}

.sh-auth-btn--ghost {
    background: transparent;
    border: 1px solid var(--sh-border);
    color: var(--sh-muted);
}

    .sh-auth-btn--ghost:hover {
        background: var(--sh-hover-bg);
        color: var(--sh-text);
        border-color: rgba(0, 0, 0, 0.15);
    }

.sh-auth-btn--solid {
    background: var(--sh-accent);
    border: 1px solid var(--sh-accent);
    color: #fff;
}

    .sh-auth-btn--solid:hover {
        background: #1d4ed8;
        border-color: #1d4ed8;
    }

/* ─── Hamburger (sadece mobilde) ─── */
.sh-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--sh-radius-sm);
    cursor: pointer;
    padding: 0;
    transition: background var(--sh-transition), border-color var(--sh-transition);
}

    .sh-hamburger:hover {
        background: var(--sh-hover-bg);
        border-color: var(--sh-border);
    }

.sh-hamburger__bar {
    display: block;
    width: 17px;
    height: 1.5px;
    background: var(--sh-muted);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease, width 0.2s ease;
    transform-origin: center;
}

.sh-hamburger[aria-expanded="true"] .sh-hamburger__bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.sh-hamburger[aria-expanded="true"] .sh-hamburger__bar:nth-child(2) {
    opacity: 0;
    width: 0;
}

.sh-hamburger[aria-expanded="true"] .sh-hamburger__bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ─── Dropdown panel (ortak) ─── */
.sh-dropdown {
    position: relative;
}

.sh-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--sh-bg);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius);
    box-shadow: var(--sh-panel-shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 1100;
}

    .sh-panel.sh--open {
        opacity: 1;
        pointer-events: all;
        transform: translateY(0) scale(1);
    }

/* ─── Bildirim paneli ─── */
.sh-notif-panel {
    width: 310px;
}

.sh-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px 9px;
}

    .sh-panel__header span {
        font-size: 13px;
        font-weight: 600;
        color: var(--sh-text);
    }

.sh-panel__see-all {
    font-size: 12px;
    color: var(--sh-muted);
    text-decoration: none;
    transition: color var(--sh-transition);
}

    .sh-panel__see-all:hover {
        color: var(--sh-accent);
    }

.sh-divider {
    height: 1px;
    background: var(--sh-border);
    margin: 0;
}

.sh-notif-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
}

.sh-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background var(--sh-transition);
    border-bottom: 1px solid var(--sh-border);
}

    .sh-notif-item:last-child {
        border-bottom: none;
    }

    .sh-notif-item:hover {
        background: var(--sh-hover-bg);
    }

.sh-notif-item__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sh-accent);
    flex-shrink: 0;
    margin-top: 5px;
}

.sh-notif-item__dot--read {
    background: var(--sh-border);
}

.sh-notif-item__text p {
    font-size: 13px;
    color: var(--sh-text);
    line-height: 1.45;
    margin: 0 0 3px;
}

.sh-notif-item__text span {
    font-size: 11px;
    color: var(--sh-muted);
}

/* Boş bildirim durumu */
.sh-notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 14px;
    font-size: 13px;
    color: var(--sh-muted);
    text-align: center;
}

    .sh-notif-empty svg {
        width: 28px;
        height: 28px;
        stroke: var(--sh-border);
        fill: none;
        stroke-width: 1.5;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.sh-panel__footer {
    padding: 8px 14px;
    text-align: center;
}

/* ─── Kullanıcı paneli ─── */
.sh-user-panel {
    width: 220px;
}

.sh-user-info {
    padding: 13px 14px 11px;
}

.sh-user-info__name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--sh-text);
    margin: 0 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sh-user-info__role {
    font-size: 11.5px;
    color: var(--sh-muted);
    margin: 0;
}

/* ─── Menü öğeleri ─── */
.sh-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--sh-text);
    text-decoration: none;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background var(--sh-transition);
    font-family: var(--sh-font);
}

    .sh-menu-item:hover {
        background: var(--sh-hover-bg);
    }

    .sh-menu-item svg {
        width: 15px;
        height: 15px;
        stroke: var(--sh-muted);
        fill: none;
        stroke-width: 1.6;
        stroke-linecap: round;
        stroke-linejoin: round;
        flex-shrink: 0;
    }

.sh-menu-item--danger {
    color: var(--sh-danger);
}

    .sh-menu-item--danger:hover {
        background: var(--sh-danger-bg);
    }

    .sh-menu-item--danger svg {
        stroke: var(--sh-danger);
    }

/* ─── Mobil Drawer ─── */
.sh-drawer {
    display: none;
    flex-direction: column;
    background: var(--sh-bg);
    border-bottom: 1px solid var(--sh-border);
    padding: 6px 10px 10px;
    gap: 1px;
}

    .sh-drawer.sh--open {
        display: flex;
    }

.sh-drawer__link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--sh-text);
    text-decoration: none;
    padding: 10px 12px;
    border-radius: var(--sh-radius-sm);
    transition: background var(--sh-transition);
}

    .sh-drawer__link:hover {
        background: var(--sh-hover-bg);
    }

    .sh-drawer__link svg {
        width: 16px;
        height: 16px;
        stroke: var(--sh-muted);
        fill: none;
        stroke-width: 1.6;
        stroke-linecap: round;
        stroke-linejoin: round;
        flex-shrink: 0;
    }

/* ─── Responsive ─── */

@media (max-width: 640px) {
    .sh-nav {
        display: none;
    }

    .sh-hamburger {
        display: flex;
    }

    .sh-username,
    .sh-chevron {
        display: none;
    }

    /* ── Panel mobil düzeltmesi ── */
    .sh-panel {
        /* Paneli viewport'a sabitle, dropdown parent'ından kopar */
        position: fixed;
        top: var(--sh-height); /* navbar yüksekliğinin hemen altı */
        left: 0.75rem;
        right: 0.75rem;
        width: auto; /* left+right ile genişlik otomatik */
        transform-origin: top center;
        transform: translateY(-6px) scale(0.98);
    }

        .sh-panel.sh--open {
            transform: translateY(0) scale(1);
        }

    /* Bildirim listesi mobilde daha uzun olabilir */
    .sh-notif-list {
        max-height: 60vh;
    }
}
