/**
 * Yazgu Header Stilleri
 * Version: 12.2
 */

/* =====================================================
   CSS DEĞİŞKENLERİ - YEŞİL PALET
   ===================================================== */
:root {
    /* Arka Plan Renkleri */
    --yazgu-bg: #ECFDF5;
    --yazgu-hover-bg: #D1FAE5;
    --yazgu-active-bg: #A7F3D0;
    --yazgu-border: #A7F3D0;
    
    /* Metin Renkleri */
    --yazgu-text: #064E3B;
    --yazgu-text-dark: #022C22;
    --yazgu-text-hover: #047857;
    
    /* Ana/Vurgu Renkleri */
    --yazgu-primary: #059669;
    --yazgu-primary-dark: #047857;
    --yazgu-active: #10B981;
    
    /* Bildirim Badge */
    --yazgu-badge-bg: #EF4444;
    --yazgu-badge-text: #FFFFFF;
    
    /* Gölge */
    --yazgu-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --yazgu-shadow-light: 0 2px 15px rgba(0, 0, 0, 0.08);
    
    /* Boyutlar */
    --yazgu-header-height: 70px;
    --yazgu-header-height-mobile: 60px;
}

/* =====================================================
   BUDDYBOSS GİZLE
   ===================================================== */
#masthead,
header#masthead,
.site-header,
.site-header--bb,
.bb-mobile-header-wrapper,
.bb-mobile-panel-wrapper,
.site-header-container,
.default-header,
#colophon,
footer#colophon,
.site-footer,
.bb-footer,
.buddyboss-header,
.buddyboss-footer,
.bb-sticky-header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -99999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* BuddyBoss Search - Aktif Tut (yazgu-search-trigger için) */
.header-search-wrap {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 999999999 !important;
    background: rgba(0, 0, 0, 0.8) !important;
    display: none;
    visibility: visible !important;
    height: auto !important;
    width: 100% !important;
    overflow: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    padding: 20px;
}

.header-search-wrap.open,
body.search-visible .header-search-wrap,
body.header-search-open .header-search-wrap {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.header-search-wrap .container {
    max-width: 600px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-search-wrap .search-form {
    flex: 1;
}

.header-search-wrap input[type="search"],
.header-search-wrap input[type="text"] {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: none;
    border-radius: 10px;
    background: #fff;
    color: #333;
}

.header-search-wrap .close-search {
    color: #fff;
    font-size: 24px;
    padding: 10px;
    cursor: pointer;
}

.header-search-wrap .close-search:hover {
    opacity: 0.8;
}





/* =====================================================
   HEADER ANA YAPI
   ===================================================== */
#yazgu-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: var(--yazgu-header-height) !important;
    background: var(--yazgu-bg) !important;
    box-shadow: var(--yazgu-shadow-light) !important;
    z-index: 9999999 !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
    border-bottom: 1px solid var(--yazgu-border) !important;
}

#yazgu-header.yazgu-hide {
    transform: translateY(-100%) !important;
}

/* Admin Bar */
body.admin-bar #yazgu-header {
    top: 32px !important;
}

@media screen and (max-width: 782px) {
    body.admin-bar #yazgu-header {
        top: 46px !important;
    }
}

/* =====================================================
   HEADER İÇ
   ===================================================== */
.yazgu-header-inner {
    max-width: 80%;
    width: 100%;
    margin: 0 auto;
    padding: 0 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    position: relative;
}

/* =====================================================
   HEADER SECTIONS
   ===================================================== */
.yazgu-header-section {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Varsayılan: social section görünsün (JavaScript çalışmadan önce) */
.yazgu-header-section[data-section="social"] {
    display: flex;
}

/* Active class ile kontrol */
.yazgu-header-section.active {
    display: flex !important;
}

/* Active olmayan tüm sections gizle (JS çalıştıktan sonra) */
#yazgu-header[data-active-section] .yazgu-header-section:not(.active) {
    display: none !important;
}

/* =====================================================
   SOSYAL MEDYA HEADER - LOGO + ASIDE
   ===================================================== */
.yazgu-header-section[data-section="social"] {
    justify-content: space-between;
}

/* Logo */
.yazgu-logo {
    display: flex;
    align-items: center;
}

.yazgu-logo a {
    display: flex;
    align-items: center;
    text-decoration: none !important;
}

.yazgu-logo img.bb-logo {
    max-height: 45px;
    width: auto;
    transition: opacity 0.3s ease;
}

.yazgu-logo img.bb-logo:hover {
    opacity: 0.8;
}

/* Header Aside */
.yazgu-header-aside {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Separator */
.yazgu-separator {
    width: 1px;
    height: 24px;
    background: var(--yazgu-border);
    margin: 0 8px;
}

/* Header Buttons */
.yazgu-header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--yazgu-text) !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
}

.yazgu-header-btn:hover {
    background: var(--yazgu-hover-bg);
    color: var(--yazgu-primary) !important;
}

.yazgu-header-btn:active,
.yazgu-header-btn.active {
    background: var(--yazgu-active-bg);
    color: var(--yazgu-primary) !important;
}

.yazgu-header-btn i {
    font-size: 20px;
}

/* Notification Count */
.yazgu-notif-count {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    background: var(--yazgu-badge-bg);
    color: var(--yazgu-badge-text);
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* =====================================================
   USER BUTTON
   ===================================================== */
.yazgu-user-wrap {
    position: relative;
}

.yazgu-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: 25px;
    background: transparent;
    border: none;
    color: var(--yazgu-text);
    cursor: pointer;
    transition: all 0.3s ease;
}

.yazgu-user-btn:hover {
    background: var(--yazgu-hover-bg);
}

.yazgu-user-btn:active {
    background: var(--yazgu-active-bg);
}

.yazgu-user-btn img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--yazgu-active-bg);
}

.yazgu-user-name-short {
    font-size: 14px;
    font-weight: 500;
    color: var(--yazgu-text-dark);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yazgu-user-btn i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

/* =====================================================
   GİRİŞ YAP / KAYIT OL BUTONLARI
   ===================================================== */
.yazgu-guest-buttons {
    gap: 10px;
}

.yazgu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.yazgu-btn-outline {
    background: transparent;
    border-color: var(--yazgu-primary);
    color: var(--yazgu-primary) !important;
}

.yazgu-btn-outline:hover {
    background: var(--yazgu-hover-bg);
    color: var(--yazgu-primary-dark) !important;
}

.yazgu-btn-outline:active {
    background: var(--yazgu-active-bg);
}

.yazgu-btn-primary {
    background: var(--yazgu-primary);
    border-color: var(--yazgu-primary);
    color: #FFFFFF !important;
}

.yazgu-btn-primary:hover {
    background: var(--yazgu-primary-dark);
    border-color: var(--yazgu-primary-dark);
}

.yazgu-btn-primary:active {
    background: var(--yazgu-active);
}

/* =====================================================
   HEADER MENU BAR (Mesajlar, Gruplar, Forumlar)
   ===================================================== */
.yazgu-header-menu-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
}

.yazgu-header-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 12px;
    text-decoration: none !important;
    color: var(--yazgu-text) !important;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 70px;
}

.yazgu-header-menu-item:hover {
    background: var(--yazgu-hover-bg);
    color: var(--yazgu-primary) !important;
}

.yazgu-header-menu-item:active,
.yazgu-header-menu-item.active {
    background: var(--yazgu-active-bg);
    color: var(--yazgu-primary) !important;
    font-weight: 600;
}

.yazgu-header-menu-item i {
    font-size: 22px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.yazgu-header-menu-item:hover i {
    transform: scale(1.1);
}

.yazgu-header-menu-item.active i {
    color: var(--yazgu-primary);
}

.yazgu-header-menu-item span {
    line-height: 1.2;
    text-align: center;
}

/* =====================================================
   BOŞ HEADER SECTIONS
   ===================================================== */
.yazgu-header-section[data-section="email"],
.yazgu-header-section[data-section="phone"] {
    justify-content: center;
}

/* =====================================================
   FULLSCREEN PROFİL PANELİ
   ===================================================== */
.yazgu-profile-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
    display: none;
    justify-content: flex-end;
}

.yazgu-profile-panel.open {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.yazgu-profile-panel-inner {
    width: 320px;
    max-width: 90%;
    height: 100%;
    background: #FFFFFF;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.yazgu-profile-panel.open .yazgu-profile-panel-inner {
    transform: translateX(0);
}

/* Kapat Butonu */
.yazgu-profile-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--yazgu-bg);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.yazgu-profile-close:hover {
    background: var(--yazgu-hover-bg);
}

.yazgu-profile-close i {
    font-size: 20px;
    color: var(--yazgu-text);
}

/* Profil Header */
.yazgu-profile-header {
    padding: 60px 20px 20px;
    background: var(--yazgu-bg);
    border-bottom: 1px solid var(--yazgu-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.yazgu-profile-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--yazgu-active-bg);
}

.yazgu-profile-info {
    margin-top: 12px;
}

.yazgu-profile-name {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--yazgu-text-dark);
}

.yazgu-profile-mention {
    display: block;
    font-size: 14px;
    color: var(--yazgu-text);
    margin-top: 4px;
}

/* Profil Nav */
.yazgu-profile-nav {
    flex: 1;
    padding: 15px 0;
}

.yazgu-profile-menu {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.yazgu-profile-menu .yazgu-menu-item,
.yazgu-profile-menu li {
    margin: 0;
    padding: 0;
}

.yazgu-profile-menu .yazgu-menu-link,
.yazgu-profile-menu li > a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--yazgu-text) !important;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.yazgu-profile-menu .yazgu-menu-link:hover,
.yazgu-profile-menu li > a:hover {
    background: var(--yazgu-hover-bg);
    color: var(--yazgu-primary) !important;
    border-left-color: var(--yazgu-primary);
}

.yazgu-profile-menu .yazgu-menu-link.active,
.yazgu-profile-menu li > a.active,
.yazgu-profile-menu li.active > a {
    background: var(--yazgu-active-bg);
    color: var(--yazgu-primary) !important;
    border-left-color: var(--yazgu-primary);
    font-weight: 600;
}

.yazgu-profile-menu .yazgu-menu-link i,
.yazgu-profile-menu li > a i {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

/* Submenu Arrow */
.yazgu-submenu-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.yazgu-submenu-arrow.open {
    transform: rotate(180deg);
}

/* Submenu */
.yazgu-submenu {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: var(--yazgu-bg);
}

.yazgu-submenu li a {
    padding-left: 56px !important;
    font-size: 14px !important;
}

/* Menü Divider */
.yazgu-menu-divider {
    height: 1px;
    background: var(--yazgu-border);
    margin: 10px 20px;
}

/* Logout Link */
.yazgu-logout-link {
    color: var(--yazgu-badge-bg) !important;
}

.yazgu-logout-link:hover {
    background: #FEE2E2 !important;
    color: #DC2626 !important;
}

/* =====================================================
   RESPONSİVE - MOBİL
   ===================================================== */
@media (max-width: 768px) {
    #yazgu-header {
        height: var(--yazgu-header-height-mobile) !important;
    }

    .yazgu-header-inner {
        max-width: 100% !important;
        padding: 0 12px;
    }

    /* Logo küçült */
    .yazgu-logo img.bb-logo {
        max-height: 35px;
    }

    /* User name gizle */
    .yazgu-user-name-short {
        display: none;
    }

    .yazgu-user-btn {
        padding: 4px;
    }

    .yazgu-user-btn img {
        width: 32px;
        height: 32px;
    }

    /* Separator gizle */
    .yazgu-separator {
        display: none;
    }

    /* Header buttons küçült */
    .yazgu-header-btn {
        width: 36px;
        height: 36px;
    }

    .yazgu-header-btn i {
        font-size: 18px;
    }

    /* Menu bar */
    .yazgu-header-menu-bar {
        gap: 4px;
    }

    .yazgu-header-menu-item {
        padding: 6px 10px;
        min-width: auto;
        font-size: 10px;
    }

    .yazgu-header-menu-item i {
        font-size: 18px;
        margin-bottom: 2px;
    }

    /* Guest buttons */
    .yazgu-btn {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    /* Profile panel full width on mobile */
    .yazgu-profile-panel-inner {
        width: 100%;
        max-width: 100%;
    }
}

/* =====================================================
   BODY PADDING
   ===================================================== */


body.admin-bar {
    padding-top: calc(var(--yazgu-header-height) + 32px) !important;
}

@media (max-width: 782px) {
    body.admin-bar {
        padding-top: calc(var(--yazgu-header-height-mobile) + 46px) !important;
    }
}
