/* Застосовуємо стилі до обгортки .desktop-header */
.desktop-header {
    background-color: #111; /* Фон, як ви і хотіли */
    padding: 7px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out !important;
}

/* Ваш клас для приховування хедера при скролі */
.desktop-header.h-hidden {
    transform: translateY(-100%);
}

/* Full-width header inner wrapper */
.header-inner {
    max-width: none;
    padding: 0 25px;
}

/* Внутрішні елементи хедера */
.desktop-header .navbar {
    padding: 0.5rem 0;
}

.desktop-header .navbar-brand {
    font-size: 1.5em;
    font-weight: bold;
}

/* Ваш стиль для "ll" у логотипі */
.desktop-header .navbar-brand .ll {
    color: #E8BD2C;
}

.desktop-header .navbar-nav .nav-link {
    padding: 0.5em 0.7em;
    transition: color 0.3s ease;
    color: #fff !important;
    font-size: 0.95em;
}

.desktop-header .navbar-nav .nav-link:hover {
    color: #aaa !important;
}

.desktop-header .navbar-nav .icon-link {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    margin-left: 0.5rem;
    transition: background-color 0.2s ease-in-out;
    background-color: #282828;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #fff;
}

.desktop-header .navbar-nav .icon-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.desktop-header .upload-button {
    background-color: #E8BD2C;
    color: #000;
    padding: 0.5em 1em;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    cursor: pointer;
    font-weight: bold;
    margin-right: 10px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.desktop-header .upload-button:hover {
    background-color: #d1a826;
}

.desktop-header .navbar-nav > li > .icon-link > i.bi {
    font-size: 20px;
}

/* Приховуємо бургер-меню Bootstrap на десктопі */
.desktop-header .navbar-toggler {
    display: none;
}

/* Переконаємося, що блок з посиланнями завжди видимий на десктопі */
.desktop-header .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
}

/* ============================= */
/* ===   MORE NAV DROPDOWN   === */
/* ============================= */

#moreDropdownContainer .dropdown-toggle::after {
    margin-left: 4px;
    vertical-align: middle;
}

#moreDropdownContainer .dropdown-menu {
    min-width: 200px;
}

/* ============================= */
/* ===     DROPDOWN MENU     === */
/* ============================= */

/* 1. БАТЬКІВСЬКИЙ ЕЛЕМЕНТ: Створюємо "контейнер" для позиціонування */
.nav-item-dropdown {
    position: relative;
}

/* Стиль для активної кнопки, коли меню відкрите */
.nav-link.icon-link.dropdown-toggle.active {
    background-color: #333;
}

/* 2. ВИПАДАЮЧЕ МЕНЮ: Позиціонування та вигляд */
.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    z-index: 1010;
    background-color: #1c1c1e;
    min-width: 240px;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    padding: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Клас .show, що додається через JS для відображення меню */
.dropdown-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Заголовок з привітанням */
.dropdown-header-info {
    padding: 12px 20px;
    font-size: 0.9em;
    color: #888;
    background-color: #161618;
    border-bottom: 1px solid #3a3a3a;
}

.dropdown-header-info span {
    font-weight: 500;
}

/* Пункти меню (flex-контейнер для іконки і тексту) */
.dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 20px;
    font-size: 0.95em;
    color: #e0e0e0;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}

.dropdown-item:hover {
    background-color: #E8BD2C;
    color: #000;
}

/* Стилі для іконок всередині меню */
.dropdown-item i.bi {
    font-size: 1.1em;
    margin-right: 15px;
    width: 20px;
    text-align: center;
    transition: transform 0.2s ease;
}

.dropdown-item:hover i.bi {
    transform: scale(1.1);
}

/* Розділювач */
.dropdown-divider {
    height: 1px;
    margin: 0;
    background-color: #3a3a3a;
}

/* Пункт "Logout" */
.dropdown-item-logout {
    color: #ff6b6b;
}

.dropdown-item-logout:hover {
    background-color: #ff6b6b;
    color: #fff;
}

/* ============================= */
/* === NOTIFICATIONS DROPDOWN === */
/* ============================= */

.notifications-dropdown {
    min-width: 380px;
    max-width: 420px;
}

.notifications-dropdown-header {
    padding: 15px 20px;
    background-color: #161618;
    border-bottom: 1px solid #3a3a3a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-dropdown-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.notifications-dropdown-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.notifications-dropdown-item {
    display: flex;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid #2a2a2a;
    transition: background-color 0.2s;
    cursor: pointer;
    text-decoration: none !important;
}

.notifications-dropdown-item:hover {
    background-color: #252525;
}

.notifications-dropdown-item.unread {
    background-color: rgba(232, 189, 44, 0.05);
    border-left: 3px solid #E8BD2C;
}

.notification-dropdown-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.notification-dropdown-icon.icon-like {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.2) 0%, rgba(255, 99, 72, 0.2) 100%);
    color: #ff4757;
}

.notification-dropdown-icon.icon-follow {
    background: linear-gradient(135deg, rgba(232, 189, 44, 0.2) 0%, rgba(212, 169, 30, 0.2) 100%);
    color: #E8BD2C;
}

.notification-dropdown-icon.icon-fork {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.2) 0%, rgba(41, 128, 185, 0.2) 100%);
    color: #3498db;
}

.notification-dropdown-icon.icon-frame {
    background: linear-gradient(135deg, rgba(155, 89, 182, 0.2) 0%, rgba(142, 68, 173, 0.2) 100%);
    color: #9b59b6;
}

.notification-dropdown-icon.icon-request {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.2) 0%, rgba(39, 174, 96, 0.2) 100%);
    color: #2ecc71;
}

.notification-dropdown-content {
    flex: 1;
    min-width: 0;
}

.notification-dropdown-message {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-dropdown-message a {
    color: #E8BD2C;
    text-decoration: none;
    font-weight: 600;
}

.notification-dropdown-time {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.notifications-dropdown-footer {
    padding: 12px 20px;
    text-align: center;
    border-top: 1px solid #3a3a3a;
    background-color: #161618;
}

.notifications-dropdown-footer a {
    color: #E8BD2C;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    display: block;
    transition: color 0.2s;
}

.notifications-dropdown-footer a:hover {
    color: #d1a826;
}

.notifications-empty {
    padding: 40px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.notifications-empty i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.notifications-empty p {
    margin: 0;
    font-size: 0.95rem;
}

/* Badge з кількістю непрочитаних */
.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: linear-gradient(135deg, #E8BD2C 0%, #d4a91e 100%);
    color: #000;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.notification-badge.hidden {
    display: none;
}
.notification-dropdown-icon.icon-request-done {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.2) 0%, rgba(39, 174, 96, 0.2) 100%);
    color: #2ecc71;
}

.notification-dropdown-icon.icon-request-rejected {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2) 0%, rgba(192, 57, 43, 0.2) 100%);
    color: #e74c3c;
}

.notification-dropdown-icon.icon-request-progress {
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.2) 0%, rgba(243, 156, 18, 0.2) 100%);
    color: #f1c40f;
}

/* Project notification icons */
.notification-dropdown-icon.icon-project-approved {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.2) 0%, rgba(39, 174, 96, 0.2) 100%);
    color: #2ecc71;
}

.notification-dropdown-icon.icon-project-rejected {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2) 0%, rgba(192, 57, 43, 0.2) 100%);
    color: #e74c3c;
}

.notification-dropdown-icon.icon-project-changes {
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.2) 0%, rgba(243, 156, 18, 0.2) 100%);
    color: #f1c40f;
}

.notification-dropdown-icon.icon-project-warning {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.35) 0%, rgba(192, 57, 43, 0.35) 100%);
    color: #e74c3c;
}

.notification-dropdown-icon.icon-project-message {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.2) 0%, rgba(41, 128, 185, 0.2) 100%);
    color: #3498db;
}

/* Warning notification in dropdown — red border highlight */
.notifications-dropdown-item.warning-notification {
    background-color: rgba(231, 76, 60, 0.06);
    border-left: 3px solid #e74c3c;
}

/* ============================= */
/* ===  RESPONSIVE STYLES    === */
/* ============================= */

/* Desktop header is hidden below 992px (mobile_nav.css), so only 992px+ matters */

/* Narrower desktop screens */
@media (max-width: 1200px) {
    .header-inner {
        padding: 0 15px;
    }

    .desktop-header .navbar-nav .nav-link {
        padding: 0.5em 0.5em;
        font-size: 0.88em;
    }

    .desktop-header .upload-button {
        padding: 0.4em 0.7em;
        font-size: 0.88em;
        margin-right: 8px;
    }

    .notifications-dropdown {
        min-width: 320px;
        max-width: 360px;
    }
}

/* Tight desktop — hide Submit icon, compact everything */
@media (max-width: 1080px) {
    .desktop-header .navbar-nav .nav-link {
        padding: 0.4em 0.4em;
        font-size: 0.85em;
    }

    .desktop-header .upload-button {
        padding: 0.4em 0.6em;
        font-size: 0.85em;
        margin-right: 6px;
    }

    .desktop-header .upload-button i {
        display: none;
    }

    .desktop-header .navbar-nav .icon-link {
        width: 36px;
        height: 36px;
        margin-left: 0.3rem;
    }

    .desktop-header .navbar-brand {
        font-size: 1.3em;
        margin-right: 0.5rem;
    }
}
