/* --- HEADER CSS --- */

/* Dashboard Header Base Styles - Compatibility with dashboard.css */
.dashboard-header {
    background-color: var(--card-bg, #fff) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 72px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    z-index: 100;
    position: relative;
}

/* Header Sections Layout */
.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-center {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001 !important;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* Profile Container */
.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-photo {
    width: 32px;
    height: 32px;
    background-color: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    margin-bottom: 4px;
}

.profile-name {
    font-size: 0.7rem;
    font-weight: normal;
    color: #e6edf3;
}

/* Profile Dropdown Styles */
.profile-dropdown {
    position: relative;
    background-color: var(--card-bg);
    border-radius: 55px;
}

.profile-dropdown-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.profile-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 48px;
    min-width: 220px;
    background: var(--header-bg, #fff);
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    z-index: 200;
    padding: 0.5rem 0;
}

.profile-dropdown-menu.show {
    display: block;
}

/* Search Box Styles */
.search-box {
    display: flex;
    align-items: center;
    background: var(--header-bg, #fff);
    border-radius: 8px;
    padding: 4px 12px;
    min-width: 220px;
    max-width: 400px;
    width: 100%;
    transition: box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    margin-left: 8px;
    width: 100%;
    font-size: 1rem;
    color: var(--text-color, #1f2328);
}

.search-toggle-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-color, #1f2328);
    font-size: 1.2rem;
    margin-left: 8px;
}

.search-back-btn {
    color: var(--text-color, #1f2328);
    font-size: 1.2rem;
    margin-right: 8px;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 1002;
    display: none;
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Language Selector */
.language-selector {
    position: relative;
    display: inline-block;
}

.language-toggle {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.language-toggle:hover {
    color: var(--primary-color);
}

.language-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    z-index: 1000;
    overflow: hidden;
}

.language-dropdown.show {
    display: block;
}

.language-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
}

.language-dropdown .dropdown-item:hover {
    background: var(--hover-bg);
}

.language-dropdown .dropdown-item.active {
    background: var(--primary-color);
    color: white;
}

.language-dropdown .dropdown-item .bi-check2 {
    visibility: hidden;
}

.language-dropdown .dropdown-item.active .bi-check2 {
    visibility: visible;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
}

.language-option:hover {
    background: var(--hover-bg);
}

.language-option.active {
    background: var(--primary-color);
    color: white;
}

.language-option .flag-icon {
    font-size: 1.2rem;
}

/* Header Buttons */
.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    border-radius: 8px;
    padding: 0 14px;
    font-size: 0.95rem;
    font-weight: 500;
    background: var(--header-btn-bg, var(--header-bg, #fff));
    color: var(--text-color);
    border: 2px solid var(--text-color);
    box-shadow: none;
    gap: 7px;
    transition: background 0.2s, color 0.2s, border 0.2s;
}

.add-chatbot-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 32px;
    border-radius: 8px;
    padding: 0 12px;
    margin-right: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    background-color: transparent;
    border: 2px solid #00ff4188;
    transition: all 0.2s ease;
    color: #00ff4188;
    text-decoration: none;
    gap: 6px;
}

.add-chatbot-btn:hover {
    background-color: rgba(16, 185, 129, 0.1);
    transform: none;
    color: #00ff4188;
    text-decoration: none;
}

/* Responsive Header Styles */
@media (max-width: 768px) {
    .dashboard-header {
        height: 60px;
        padding: 0.75rem;
    }
    
    .header-left, .header-center, .header-right {
        width: 100%;
        justify-content: center;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .logo-png {
        padding-top: 18px;
    }

    .btn-text {
        display: none;
    }

    .search-box {
        min-width: 0;
        max-width: 100%;
        width: 100%;
        display: none !important;
        position: relative;
        z-index: 1000 !important;
        background: var(--header-bg, #fff) !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    }
    
    .search-toggle-btn {
        display: inline-flex !important;
    }
    
    .dashboard-header {
        padding: 0;
        position: relative;
        z-index: 100;
    }
    
    .header-left {
        margin-left: 18px;
    }
    
    .search-back-btn.active {
        display: inline-flex !important;
    }
    
    .dashboard-header.search-active .header-left,
    .dashboard-header.search-active .header-right,
    .dashboard-header.search-active .search-toggle-btn {
        display: none !important;
    }
    
    .dashboard-header.search-active .header-center {
        width: 100vw !important;
        max-width: 100vw !important;
        position: fixed !important;
        left: 0;
        top: 0;
        height: 72px;
        background: var(--header-bg, #fff) !important;
        z-index: 2000 !important;
        justify-content: flex-start !important;
        padding: 0 60px 0 20px !important;
    }
    
    .dashboard-header.search-active .search-box {
        display: flex !important;
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        width: 100vw !important;
        max-width: 100vw !important;
        border-radius: 0 !important;
        background: var(--header-bg, #fff) !important;
        box-shadow: 0 4px 24px rgba(0,0,0,0.12) !important;
        padding: 8px 12px !important;
        z-index: 3000 !important;
        gap: 0.75rem;
        height: 72px !important;
    }
    
    .dashboard-header.search-active .search-back-btn {
        display: inline-flex !important;
    }
    
    .dashboard-header .search-back-btn {
        display: none !important;
    }
    
    .search-box input {
        z-index: 1003;
        position: relative;
    }
}

@media (max-width: 575.98px) {
    .dashboard-header.search-active .header-left,
    .dashboard-header.search-active .header-right,
    .dashboard-header.search-active .search-toggle-btn {
        display: none !important;
    }
    
    .dashboard-header.search-active .header-center {
        width: 100%;
        justify-content: flex-start !important;
        max-width: 100vw !important;
        position: relative;
        z-index: 2000;
    }
    
    .dashboard-header.search-active .search-box {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100vw;
        max-width: 100vw;
        border-radius: 0;
        background: var(--header-bg, #fff);
        box-shadow: 0 4px 24px rgba(0,0,0,0.12);
        padding: 8px 12px;
        z-index: 3000;
        gap: 0.75rem;
    }
    
    .dashboard-header.search-active .search-back-btn {
        display: inline-block !important;
        font-size: 1.5rem;
        margin-right: 8px;
        color: var(--text-color, #222);
    }
    
    .dashboard-header .search-back-btn {
        display: none !important;
    }
}

/* Hamburger Menu Button */
.hamburger-menu-btn {
    height: 48px;
    width: 48px;
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.5rem;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    transition: background-color 0.2s;
}

.hamburger-menu-btn:hover {
    background-color: var(--button-secondary-hover-bg);
}

/* Sidebar Styles */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show,
.sidebar-overlay.active {
    display: block;
}

.sidebar-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background-color: var(--background);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    z-index: 1002;
    transition: left 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Scrollbar styles for sidebar */
.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.sidebar-menu.show,
.sidebar-menu.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    min-height: 72px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
}

.sidebar-logo-img {
    height: 96px;
    margin-left: -7px;
}

.sidebar-logo-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-left: -20px;
}

.sidebar-close-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.sidebar-close-btn:hover {
    background-color: var(--hover-bg, rgba(0,0,0,0.05));
}

.sidebar-content {
    flex: 1 1 auto;
    padding: 16px 0;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Scrollbar for sidebar content */
.sidebar-content::-webkit-scrollbar,
.chat-history-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track,
.chat-history-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb,
.chat-history-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover,
.chat-history-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.sidebar-user-profile {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 12px;
}

.sidebar-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.channel-user-avatar-letter {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
}

.user-avatar-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-username {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-channel-name {
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#newChatBtn {
    padding: 0;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-color, #e5e7eb);
    margin: 8px 0;
}

/* Bottom nav - sticks to bottom of sidebar */
.bottom-nav {
    margin-top: auto; /* Push to bottom */
    padding: 8px;
    flex-shrink: 0; /* Don't shrink */
}

.sidebar-nav {
    padding: 0 8px;
    background: var(--background);
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    margin: 2px 0;
    transition: background-color 0.2s;
    font-size: 0.95rem;
}

.sidebar-nav-item:hover {
    background-color: var(--hover-bg, rgba(0,0,0,0.05));
    color: var(--text-color);
    text-decoration: none;
}

.sidebar-nav-item i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.sidebar-section {
    padding: 0 8px;
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1; /* Take up remaining space, pushing bottom-nav to the bottom */
    overflow-y: auto;
}

.sidebar-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary, #666);
    margin: 0 0 8px 0;
    flex-shrink: 0;
}

.sidebar-section-title i {
    font-size: 1rem;
}

.sidebar-following-list,
.sidebar-conversation-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    padding: 8px 0;
}

.sidebar-following-list{
    width: 100%;
}
/* Hover effect for clickable sidebar-following-link */
.sidebar-following-link:hover {
    color: var(--primary-color-dark, #059669);
    background: var(--hover-bg, rgba(0,0,0,0.05));
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(16,185,129,0.08);
}

.sidebar-following-item,
.sidebar-conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    margin: 2px 0;
    transition: background-color 0.2s;
    width: 100%;
}

.sidebar-following-item:hover,
.sidebar-conversation-item:hover {
    background-color: var(--hover-bg, rgba(0,0,0,0.05));
    color: var(--text-color);
    text-decoration: none;
}

.sidebar-following-avatar,
.sidebar-conversation-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-following-avatar img,
.sidebar-conversation-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-following-info,
.sidebar-conversation-info {
    flex: 1;
    min-width: 0;
}

.sidebar-following-name,
.sidebar-conversation-name {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-following-channel,
.sidebar-conversation-time {
    font-size: 0.8rem;
    color: var(--text-secondary, #666);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-following-link{
    color: var(--text-color);
    text-decoration: none;
}

.sidebar-loading {
    padding: 16px;
    text-align: center;
    color: var(--text-secondary, #666);
    font-size: 0.9rem;
}

.sidebar-show-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    margin: 4px 8px;
    background: transparent;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 6px;
    color: var(--text-secondary, #666);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    width: calc(100% - 16px);
}

.sidebar-show-more-btn:hover {
    background-color: var(--hover-bg, rgba(0,0,0,0.05));
    border-color: var(--primary-color, #10b981);
    color: var(--primary-color, #10b981);
}

.sidebar-show-more-btn i {
    font-size: 0.8rem;
}

.sidebar-guest {
    padding: 20px;
    text-align: center;
}

.sidebar-guest-message {
    margin-bottom: 20px;
}

.sidebar-guest-message i {
    font-size: 3rem;
    color: var(--text-secondary, #666);
    margin-bottom: 16px;
}

.sidebar-guest-message p {
    color: var(--text-secondary, #666);
    font-size: 0.95rem;
    margin: 0;
}

.sidebar-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--primary-color, #10b981);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.sidebar-login-btn:hover {
    background-color: var(--primary-color-dark, #059669);
    color: white;
    text-decoration: none;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .logo-container {
        display: none !important;
    }

    
    .sidebar-menu.show {
        left: 0;
    }
}

/* Dark theme adjustments */
html[data-theme="dark"] .sidebar-logo-img.logo-light { 
    display: none !important; 
}

html[data-theme="dark"] .sidebar-logo-img.logo-dark { 
    display: inline !important; 
}
.header-left .logo-container {
    display: flex;
    align-items: center;
    height: 100%;
    width: 150px;
    height: 72px;
    overflow: hidden;
}
.logo-png {
    height: 130px;
    margin-right: 25px;
    margin-top: 5px;
}
.logo-dark { display: none; }
html[data-theme="dark"] .logo-light { display: none !important; }
html[data-theme="dark"] .logo-dark { display: inline !important;}
.header-center {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1001 !important;
}
.search-box {
    display: flex;
    align-items: center;
    background: var(--header-bg, #fff);
    border-radius: 8px;
    padding: 4px 12px;
    min-width: 220px;
    max-width: 400px;
    width: 100%;
    transition: box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}
.search-box input {
    border: none;
    background: transparent;
    outline: none;
    margin-left: 8px;
    width: 100%;
    font-size: 1rem;
    color: var(--text-color, #1f2328);
}
.search-toggle-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-color, #1f2328);
    font-size: 1.2rem;
    margin-left: 8px;
}
@media (max-width: 576px) {

    .search-box {
        min-width: 0;
        max-width: 100%;
        width: 100%;
        display: none !important;
        position: relative;
        z-index: 1000 !important;
        background: var(--header-bg, #fff) !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    }
    .search-toggle-btn {
        display: inline-flex !important;
    }
    .dashboard-header {
        padding: 0;
        position: relative;
        z-index: 100;
    }
    .header-left{
        margin-left: 18px;
    }
    .header-center {
        transition: all 0.3s ease;
        z-index: 1001 !important;
    }
    .search-back-btn {
        color: var(--text-color, #1f2328);
        font-size: 1.2rem;
        margin-right: 8px;
        cursor: pointer;
        transition: color 0.2s;
        z-index: 1002;
        display: none;
    }
    .search-back-btn.active {
        display: inline-flex !important;
    }
    .dashboard-header.search-active .header-left,
    .dashboard-header.search-active .header-right,
    .dashboard-header.search-active .search-toggle-btn {
        display: none !important;
    }
    .dashboard-header.search-active .header-center {
        width: 100vw !important;
        max-width: 100vw !important;
        position: fixed !important;
        left: 0;
        top: 0;
        height: 72px;
        background: var(--header-bg, #fff) !important;
        z-index: 2000 !important;
        justify-content: flex-start !important;
        padding: 0 60px 0 20px !important;
    }
    .dashboard-header.search-active .search-box {
        display: flex !important;
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        width: 100vw !important;
        max-width: 100vw !important;
        border-radius: 0 !important;
        background: var(--header-bg, #fff) !important;
        box-shadow: 0 4px 24px rgba(0,0,0,0.12) !important;
        padding: 8px 12px !important;
        z-index: 3000 !important;
        gap: 0.75rem;
        height: 72px !important;
    }
    .dashboard-header.search-active .search-back-btn {
        display: inline-flex !important;
    }
    .dashboard-header .search-back-btn {
        display: none !important;
    }
    .search-box input {
        z-index: 1003;
        position: relative;
    }
    
    /* Mobile hamburger adjustments */
    .hamburger-menu-btn {
        margin-right: 8px;
        font-size: 1.3rem;
    }
    
    .sidebar-menu {
        width: 100vw;
        left: -100vw;
    }
    
    .sidebar-menu.show {
        left: 0;
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.add-chatbot-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 32px;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 0.9rem;
    font-weight: 600;
    background-color: transparent;
    border: 2px solid #26e462;
    color: #26e462;
    text-decoration: none;
    gap: 6px;
    transition: all 0.2s;
}
.add-chatbot-btn:hover {
    background-color: rgba(16, 185, 129, 0.1);
    color: #00ff4188;
    text-decoration: none;
}
.theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    overflow: hidden;
}
.user-avatar-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* ----------------PROFİL DROPDOWN MENÜSÜ STİLLERİ ------------------------------- */
.profile-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 48px;
    min-width: 220px;
    background: var(--header-bg, #fff);
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    z-index: 200;
    padding: 0.5rem 0;
}
.profile-dropdown {
    position: relative;
    background-color: var(--card-bg);
    
    border-radius: 55px;
}
.profile-dropdown-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
}
.profile-dropdown-menu.show {
    display: block;
}
.dropdown-header {
    flex-direction: row !important;
    padding: 8px 16px 8px 16px !important;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    font-weight: 700;
    font-size: 1.2rem;
    gap:18px;
    justify-content: flex-start;
    align-self:center;
}
.dropdown-user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 600;
    overflow: hidden;
}
.header-user-avatar {
    align-self: center;

    border-radius: 50%;
    overflow: hidden;
}
.header-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dropdown-username {
    font-weight: 600;
    font-size: 1rem;
}
.dropdown-email {
    font-size: 0.9rem;
    color: #888;
}
.dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 8px 0;
}
.dropdown-item {
    display: flex;
    text-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--text-color, #1f2328);
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.15s;
}
.dropdown-item:hover {
    background: var(--button-secondary-hover-bg) !important;
    color: #10b981 !important;
}
@media (max-width: 576px) {
  .btn-text {
    display: none;
  }
}

/* notification styles  */

.notification-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.3rem;
    position: relative;
    margin-right: 6px;
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 25px;
}
.notification-badge {
    position: absolute;
    top: 2px;
    right: 0;
    background: #ff3b3b;
    color: #fff;
    border-radius: 50%;
    font-size: 0.7rem;
    padding: 2px 6px;
    min-width: 18px;
    text-align: center;
    font-weight: bold;
}
.notification-dropdown-menu {
    display: none;
    position: absolute;
    right: 50px;
    top: 48px;
    min-width: 300px;
    max-width: 400px;
    background: var(--header-bg, #fff);
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.55);
    z-index: 201;
    padding: 0.5rem 0;
}
.notification-dropdown-menu.show {
    display: block;
}
.notification-list {
    height: 500px;
    overflow-y: auto;
}

/* ------------ bildirim stilleri ------------- */

.bildirim-danger {
    position: absolute;
    top: -8px;
    left: -4px;
    color: #ff1a1a !important;
    font-size: 1.5rem !important;
    font-weight: bold;
    border-radius: 50%;
    padding: 6px;
    text-shadow: 0 2px 8px #ffb3b3;
    z-index: 2;

}

.bildirim-info {
    position: absolute;
    top: -8px;
    left: -4px;
    color: #00b894 !important;
    font-size: 1.5rem !important;
    font-weight: bold;
    border-radius: 50%;
    padding: 6px;
    text-shadow: 0 2px 8px #b3ffe0;
    z-index: 2;
}
.bildirim-text {
    color: var(--text-color, #1f2328);
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
    text-wrap: wrap;
}

.action-required-label {
    color: #ff3b3b;
    font-size: 0.65rem;
    font-weight: 600;
    display: block;
    margin-bottom: -4px;
    letter-spacing: 0.01em;
}

.action-info-label {
    color: #00b894;
    font-size: 0.65rem;
    font-weight: 600;
    display: block;
    margin-bottom: -4px;
    letter-spacing: 0.01em;
}

.unseen-notification {
    background: #62e9be60;
    border-left: 4px solid #00b894;
}
.seen-notification {
    opacity: 0.7;
}

.seen-notification .bi-envelope-open {
    color: #bdbdbd !important;
}

.mark-as-read-btn {
    position: absolute;
    top: 4px;
    right: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f9fafb;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    cursor: pointer;
    z-index: 2;
    padding: 0;
}
.mark-as-read-btn i {
    color: #00b894;
    font-size: 1.3rem;
    transition: color 0.2s;
}
.mark-as-read-btn:hover {
    background: #00b894;
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(0,184,148,0.18);
}
.mark-as-read-btn:hover i {
    color: #fff;
}
.mark-as-read-btn:active {
    background: #009e7a;
}

.sidebar-conversations-link {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.sidebar-conversations-link:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.sidebar-conversations-link i {
    font-size: 16px;
}

/* Chat History in Sidebar Styles */
.sidebar-section .chat-history-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    max-height: 400px;
    min-height: 200px;
}

.chat-history-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    gap: 8px;
    color: var(--text-secondary);
}

.chat-history-loading .spinner-border {
    margin-bottom: 8px;
}

.chat-history-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 8px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: var(--text-color);
    text-decoration: none;
}

.history-item:hover {
    background-color: var(--hover-bg, rgba(0,0,0,0.05));
}

.history-item.active {
    background-color: var(--primary-color-light, rgba(16, 185, 129, 0.1));
    border-left: 3px solid var(--primary-color);
}

.history-item-avatar,
.history-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background-color: var(--hover-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-item-avatar img,
.history-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-avatar .profile-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
}

.history-item-details,
.history-details {
    flex: 1;
    min-width: 0;
}

.history-item-title,
.history-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-preview,
.history-preview {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.history-item-time,
.history-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    margin-top: 2px;
}

/* Loading animation for chat history */
.loading-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
}

.loading-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--hover-bg);
}

.loading-details {
    flex: 1;
}

.loading-line,
.loading-line-small {
    height: 12px;
    background-color: var(--hover-bg);
    border-radius: 4px;
    margin-bottom: 6px;
}

.loading-line {
    width: 100%;
}

.loading-line-small {
    width: 60%;
}

.shimmer {
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Infinite scroll loading */
#loadingMoreHistory {
    padding: 12px;
    text-align: center;
    color: var(--text-secondary);
}

/* Responsive adjustments for chat history in sidebar */
@media (max-width: 768px) {
    .sidebar-menu {
        width: 280px;
    }
    
    .chat-history-content {
        max-height: 350px;
    }
    
    .history-item {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .sidebar-menu {
        width: 90vw;
        max-width: 320px;
    }
    
    .chat-history-content {
        max-height: 300px;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .sidebar-menu::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
    }
    
    .sidebar-menu::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.3);
    }
}


.history-mode-toggle {
    display: flex; /* Hidden when sidebar is collapsed */
    gap: 4px;
    padding: 8px 12px;
    margin-bottom: 8px;
    background-color: var(--background-secondary, #f5f5f5);
    border-radius: 8px;
}

[data-theme="dark"] .history-mode-toggle {
    background-color: rgba(255, 255, 255, 0.05);
}

.youtube-sidebar-page .sidebar-menu.show .history-mode-toggle {
    display: flex; /* Show when sidebar is expanded */
}

.history-mode-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border: none;
    background-color: transparent;
    color: var(--text-muted, #6b7280);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.history-mode-btn i {
    font-size: 1rem;
}

.history-mode-btn:hover {
    background-color: var(--background, rgba(0, 0, 0, 0.05));
    color: var(--text-primary, #000);
}

[data-theme="dark"] .history-mode-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #fff);
}

.history-mode-btn.active {
    background-color: var(--primary-color, #007bff);
    color: white;
}

.history-mode-btn.active:hover {
    background-color: var(--primary-color-dark, #0056b3);
}

[data-theme="dark"] .history-mode-btn.active {
    background-color: var(--primary-color, #007bff);
}

[data-theme="dark"] .history-mode-btn.active:hover {
    background-color: var(--primary-color-dark, #0056b3);
}

/* ========================================
   LIGHT MODE HEADER SUPPORT
   ======================================== */

/* Dashboard Header */
[data-theme="light"] .dashboard-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e5e7eb;
}

/* Search Box */
[data-theme="light"] .search-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

[data-theme="light"] .search-box:focus-within {
    background: #ffffff;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

[data-theme="light"] .search-box input {
    color: #111827;
}

[data-theme="light"] .search-box input::placeholder {
    color: #6b7280;
}

[data-theme="light"] .search-box i {
    color: #6b7280;
}

/* Theme Toggle Button */
[data-theme="light"] .theme-toggle {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #111827;
}

[data-theme="light"] .theme-toggle:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

/* Language Selector */
[data-theme="light"] .language-selector .theme-toggle {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #111827;
}

[data-theme="light"] .language-dropdown {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .language-dropdown .dropdown-item {
    color: #374151;
}

[data-theme="light"] .language-dropdown .dropdown-item:hover {
    background: #f9fafb;
    color: #111827;
}

[data-theme="light"] .language-dropdown .dropdown-item.active {
    background: #ecfdf5;
    color: #059669;
}

/* Add Chatbot Button */
[data-theme="light"] .add-chatbot-btn {
    background: #10b981;
    color: #ffffff;
    border: none;
}

[data-theme="light"] .add-chatbot-btn:hover {
    background: #059669;
}

/* Login Button */
[data-theme="light"] .login-btn {
    background: #10b981;
    color: #ffffff !important;
    border: 1px solid #10b981 !important;
}

[data-theme="light"] .login-btn:hover {
    background: #059669;
    border-color: #059669 !important;
}

/* Notification Button */
[data-theme="light"] .notification-btn {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #111827;
}

[data-theme="light"] .notification-btn:hover {
    background: #f3f4f6;
}

[data-theme="light"] .notification-badge {
    background: #ef4444;
    color: #ffffff;
}

/* Notification Dropdown */
[data-theme="light"] .notification-dropdown-menu {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .notification-dropdown-menu .dropdown-header {
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
}

[data-theme="light"] .notification-dropdown-menu .dropdown-item {
    color: #374151;
}

[data-theme="light"] .notification-dropdown-menu .dropdown-item:hover {
    background: #f9fafb;
}

[data-theme="light"] .no-notification {
    color: #6b7280;
}

/* Profile Dropdown */
[data-theme="light"] .profile-dropdown {
    background-color: transparent;
}

[data-theme="light"] .profile-dropdown-menu {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .profile-dropdown-menu .dropdown-header {
    border-bottom: 1px solid #e5e7eb;
}

[data-theme="light"] .dropdown-username {
    color: #111827;
}

[data-theme="light"] .dropdown-email {
    color: #6b7280;
}

[data-theme="light"] .profile-dropdown-menu .dropdown-item {
    color: #374151;
}

[data-theme="light"] .profile-dropdown-menu .dropdown-item:hover {
    background: #f9fafb;
    color: #111827;
}

[data-theme="light"] .profile-dropdown-menu .dropdown-divider {
    border-top: 1px solid #e5e7eb;
}

/* User Avatar */
[data-theme="light"] .user-avatar {
    background: #10b981;
    color: #ffffff;
}

/* Hamburger Menu Button */
[data-theme="light"] .hamburger-menu-btn {
    color: #111827;
    background: transparent;
}

[data-theme="light"] .hamburger-menu-btn:hover {
    background: #f9fafb;
}

/* Search Toggle Button */
[data-theme="light"] .search-toggle-btn {
    color: #111827;
}

[data-theme="light"] .search-back-btn {
    color: #111827;
}

/* Sidebar */
[data-theme="light"] .sidebar-menu {
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
}

[data-theme="light"] .sidebar-overlay {
    background: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .sidebar-header {
    border-bottom: 1px solid #e5e7eb;
}

[data-theme="light"] .sidebar-close-btn {
    color: #111827;
    background: transparent;
}

[data-theme="light"] .sidebar-close-btn:hover {
    background: #f9fafb;
}

[data-theme="light"] .sidebar-nav-item {
    color: #374151;
}

[data-theme="light"] .sidebar-nav-item:hover {
    background: #f9fafb;
    color: #111827;
}

[data-theme="light"] .sidebar-nav-item i {
    color: #6b7280;
}

[data-theme="light"] .sidebar-section-title {
    color: #6b7280;
}

[data-theme="light"] .sidebar-divider {
    border-top: 1px solid #e5e7eb;
}

/* Chat History */
[data-theme="light"] .chat-history-content {
    background: transparent;
}

[data-theme="light"] .chat-history-list {
    color: #374151;
}

[data-theme="light"] .history-mode-btn {
    color: #6b7280;
}

[data-theme="light"] .history-mode-btn:hover {
    background-color: #f9fafb;
    color: #111827;
}

[data-theme="light"] .history-mode-btn.active {
    background-color: #10b981;
    color: #ffffff;
}

[data-theme="light"] .history-mode-btn.active:hover {
    background-color: #059669;
}

/* Guest Sidebar */
[data-theme="light"] .sidebar-guest-message {
    color: #6b7280;
}

[data-theme="light"] .sidebar-login-btn {
    background: #10b981;
    color: #ffffff;
}

[data-theme="light"] .sidebar-login-btn:hover {
    background: #059669;
}

