.permission-banner {
    background-color: #ffc107; /* Жовтий фон для привернення уваги */
    color: #333;
    text-align: center;
    padding: 10px;
    font-size: 14px;
    border-bottom: 1px solid #e0a800;
}
.permission-banner button {
    background-color: #28a745; /* Зелена кнопка */
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
}
.permission-banner button:hover {
    background-color: #218838;
}
.permission-banner .permission-instructions {
    font-size: 12px;
    color: #555;
    margin-top: 5px;
}


/* Контейнер для тексту та часу, використовуємо flex для гарного розташування */
.notification-content-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

/* Стиль для самого тексту сповіщення */
.notification-text {
    flex-grow: 1;
    white-space: normal; 
    margin-bottom: 4px; /* Додаємо невеликий відступ знизу */
}

/* Новий стиль для часу сповіщення */
.notification-time {
    font-size: 12px;      /* Робимо шрифт меншим */
    color: #888;         /* Сірий колір, щоб не відволікав */
    text-align: right;    /* Вирівнюємо по правому краю */
}

/* Робимо батьківський елемент позиціонованим */
.notification-link {
    position: relative;
}

.notification-content-wrapper, .notification-time {
    margin-right: 15px!important;
}
/* Стиль для самої кнопки "помітити прочитаним" */
.mark-one-as-read-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    
    /* Вигляд кнопки */
    width: 24px;
    height: 24px;
    background-color: rgba(0, 128, 0, 0.6); /* Напівпрозорий зелений */
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    
    /* Вирівнювання галочки */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;

    /* Початково приховуємо кнопку */
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Показуємо кнопку при наведенні на сповіщення */
.notification-link:hover .mark-one-as-read-btn {
    opacity: 1;
    transform: scale(1);
}

.mark-one-as-read-btn:hover {
    background-color: rgba(0, 128, 0, 0.9); /* Робимо темнішим при наведенні */
}/* Робимо батьківський елемент позиціонованим */
.notification-link {
    position: relative;
    /* Додаємо невеликий відступ справа, щоб кнопка не накладалась на скролбар */
    padding-right: 35px; 
}

/* 🔥 НОВИЙ МІНІМАЛІСТИЧНИЙ СТИЛЬ ДЛЯ КНОПКИ "ПРОЧИТАНО" */
.mark-one-as-read-btn {
    /* Позиціонування */
    position: absolute;
    top: 50%; /* Вирівнюємо по вертикальному центру */
    right: 10px;
    transform: translateY(-50%); /* Точне центрування по вертикалі */
    
    /* Скидаємо вигляд кнопки */
    background: none;
    border: none;
    
    /* Стиль для іконки '×' */
    color: #b0b0b0; /* Світло-сірий, ненав'язливий колір */
    font-size: 22px; /* Робимо хрестик трохи більшим */
    font-weight: bold;
    line-height: 1;
    padding: 2px 5px; /* Невелика зона для кліку */
    
    /* Початковий стан: приховано */
    opacity: 0;
    cursor: pointer;
    
    /* Анімація появи */
    transition: opacity 0.2s ease, color 0.2s ease;
    box-sizing: border-box;
}

/* Показуємо кнопку при наведенні на все сповіщення */
.notification-link:hover .mark-one-as-read-btn {
    opacity: 1;
}

/* Колір галочки при наведенні*/
.mark-one-as-read-btn:hover {
    color: rgba(255, 255, 255, 0.96);
}


/* Стилізуємо посилання в заголовку сповіщень */
.notifications-header h4 a {
    text-decoration: none;  /* Прибираємо підкреслення */
    color: inherit;         /* Успадковує колір від батьківського h4 (зазвичай, чорний) */
    transition: color 0.2s ease;
}

/* Додаємо ефект при наведенні для кращої інтерактивності */
.notifications-header h4 a:hover {
    color: #007bff; /* Робимо текст синім при наведенні */
}

/* Основний стиль кнопки */
#enable-notifications-btn {
    /* Скидаємо стандартні стилі */
    border: none;
    outline: none;
    font-family: 'Roboto', sans-serif; /* Використовуємо ваш шрифт */
    
    /* Розміри та вирівнювання */
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    vertical-align: middle; /* Вирівнюємо по центру з текстом */
    
    /* Кольори та вигляд */
    background: #4a90e2; /* Приємний синій колір */
    background-image: linear-gradient(180deg, #5dade2 0%, #4a90e2 100%);
    color: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-transform: uppercase; /* Великі літери */
    letter-spacing: 0.5px;
    
    /* Інтерактивність */
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

/* Стиль при наведенні курсора */
#enable-notifications-btn:hover {
    background-image: linear-gradient(180deg, #6cb2e8 0%, #5ca0e5 100%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px); /* Легкий ефект "підняття" */
}

/* Стиль при натисканні */
#enable-notifications-btn:active {
    transform: translateY(0px); /* Повертаємо на місце */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.notification-link {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;

}
.notification-link:hover {
    background-color: #f0f0f0;
}
.notification-photo {
    margin-right: 10px;
}
.notification-photo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.notification-text {
    flex-grow: 1;
    white-space: normal; /* Дозволяє переносити довгий текст */
}


/* Підключаємо шрифт Roboto */
body, .header, .auth-status, .logout-button, .login-button, .nav-link{
    font-family: 'Roboto', sans-serif;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px;
    background-color: black;
    border-radius: 10px 10px 0 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 270px;
    position: relative;
    font-size: 18px; /* Збільшуємо розмір тексту для всієї шапки */
}

.logo-container {
    display: flex;
    justify-content: center;
    flex-grow: 1;
    position: relative;
}

.logo {
    max-width: 200px;
}

.auth-status-container {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}

.auth-status {
    font-size: 12px; /* Збільшуємо розмір тексту для статусу авторизації */
    color: white;
    z-index: 999;
}

.logout-button, .login-button {
    margin-left: 10px;
    color: red;
    text-decoration: none;
    font-size: 12px; /* Збільшуємо розмір тексту для кнопок входу/виходу */
}

.logout-button:hover, .login-button:hover {
    text-decoration: underline;
    color: white;
}

/* Стилі для панелі навігації */
.nav-panel {
    width: 100%;
    background-color: #333;
    padding: 10px;
    text-align: center;
    box-sizing: border-box; /* Додано, щоб запобігти виходу за межі */
}

.dropdown-content a {
    text-align: left!important;
}

.nav-link {
    color: white;
    text-decoration: none;
    margin: 0 10px;
}

.nav-link:hover {
    text-decoration: underline;
}

/* Бургер-меню */
.burger-menu {
    display: none;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 4px 0;
    transition: 0.4s;
}





/* === Початок стилів сповіщень (Оновлено) === */

/* Контейнер, що об'єднує іконку та випадаючий список */
.notification-container {
    position: relative;
    z-index: 1100;
}

/* Іконка дзвіночка */
.notification-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    color: white; /* Колір для іконки, якщо це буде шрифт */
}

.bell-image {
    width: 26px; /* Трохи збільшимо для кращої видимості */
    height: 26px;
}

/* Червоний лічильник */
.notification-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: #e74c3c; /* Більш приємний червоний */
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid #333; /* Додаємо рамку, щоб лічильник не зливався з фоном */
    line-height: 1;
}

/* === Основний блок випадаючого списку сповіщень === */
.notifications {
    /* display: none; Початково приховано */
    position: absolute;
    top: 45px;  /* Збільшуємо відступ зверху */
    /* right: 0;   Вирівнюємо по правому краю контейнера */
    left: 0;
    width: 500px;
    max-width: 90vw; /* Щоб не вилазило за екран на мобільних */
    background-color: #ffffff;
    border-radius: 8px; /* Закруглені кути */
    border: 1px solid #e0e0e0; /* Світліша рамка */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15); /* Більш виражена тінь */
    
    /* Flex-контейнер для розділення хедера, списку і футера */
    display: flex;
    flex-direction: column;
    max-height: 75vh; /* Обмеження по висоті */
}

.is-hidden {
    display: none !important;
}

/* Заголовок та футер блоку сповіщень */
.notifications-header,
.notifications-footer {
    padding: 12px 15px;
    background-color: #f8f9fa;
    flex-shrink: 0; /* Забороняємо зменшуватись */
}

.notifications-header {
    border-bottom: 1px solid #e9ecef;
}

.notifications-header h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: 700;
}

.notifications-footer {
    text-align: center;
    border-top: 1px solid #e9ecef;
}

/* Список, що буде прокручуватись */
#notificationList {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto; /* Скрол з'являється тільки при потребі */
    color: gray;
    font-family: 'Montserrat';
    margin: 10px 0;
}

/* Стилізація кастомного скролбару (для Chrome/Safari) */
#notificationList::-webkit-scrollbar {
    width: 6px;
}
#notificationList::-webkit-scrollbar-track {
    background: #f1f1f1;
}
#notificationList::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
#notificationList::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}


/* === Елементи всередині списку === */

/* Кожен окремий елемент сповіщення (посилання) */
.notification-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.notification-link:last-child {
    border-bottom: none; /* Забираємо рамку у останнього елемента */
}

.notification-link:hover {
    background-color: #f5faff; /* Приємний колір при наведенні */
    cursor: pointer;
}

/* Фото автора сповіщення */
.notification-photo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Текст сповіщення */
.notification-text {
    font-size: 14px;
    line-height: 1.4;
}

/* Посилання "Помітити прочитаними" */
.mark-as-read {
    color: #007bff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}

.mark-as-read:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* === Кінець стилів сповіщень === */

/* Випадаюче меню */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Кнопка для випадаючого меню */
.dropbtn {
    background-color: transparent; /* Робимо фон таким же, як у інших пунктів */
    color: white;
    font-family: 'Roboto', sans-serif; /* Такий самий шрифт, як у .nav-link */
    font-size: 18px; /* Такий самий розмір, як у .nav-link */
    text-decoration: none;
    border: none;
    cursor: pointer;
    padding: 10px 15px;
    transition: color 0.3s ease;
}

/* Загальні стилі для навігації */
.nav-item {
    display: inline-block;
    position: relative;
}

/* Стилі для пункту "Видалене" */
.nav-item .nav-link {
    color: white;
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    text-decoration: none;
    /* padding: 10px 15px; */
    cursor: pointer;
    transition: color 0.3s ease;
}

/* Ефект при наведенні */
.nav-item .nav-link:hover {
    color: #ccc;
}
.drop-ico {
    font-size: 10px;
    margin: 0;
    margin-left: 5px;
}

/* Випадаючий список */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    padding-top: 10px;
    background-color: #333;
    /* min-width: 200px; */

    min-width: 100%;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.2);
    border-radius:  0 0 5px 5px;
    overflow: hidden;
    justify-content: start;
    /* margin-top: 10px; */
    z-index: 1000;
}

/* Стилі для посилань у випадаючому меню */
.dropdown-content a {
    display: block;
    color: white;
    /* font-family: 'Roboto', sans-serif; */
    font-size: 16px!important;
    text-decoration: none;
    padding: 10px 5px!important;
    transition: background-color 0.3s ease, color 0.3s ease;
    white-space: preserve nowrap;

}

/* Зміна кольору при наведенні */
.dropdown-content a:hover {
    background-color: #444;
    color: #ccc;
}

/* Відкриваємо випадаюче меню при наведенні */
.nav-item:hover .dropdown-content {
    display: block;
}



.call-time-counter {
    margin-left: 25px;
    font-size: 14px;
    color: #fff!important;
    background-color: transparent;
    display: flex;
    align-items: center;
    height: 100%;
}



.dropbtn {
    background: none;
    font-size: 16px;
    padding: 0;
    margin: 0 10px;
}


/* 1. Налаштовуємо оверлей для центрування */
#update-modal {
    display: flex; /* Вмикаємо Flexbox */
    align-items: center; /* Центруємо по вертикалі */
    justify-content: center; /* Центруємо по горизонталі */
    
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    /* overflow: auto; -- більше не потрібен */
}

/* 2. Налаштовуємо саме вікно */
.modal-content {
    background-color: #fefefe;
    padding: 20px 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s;
    
    /* Додаємо керування висотою */
    display: flex;
    flex-direction: column;
    max-height: 85vh; /* Максимальна висота - 85% висоти екрану */
    /* margin: auto; -- більше не потрібен, Flexbox робить центрування */
}

/* 3. Робимо блок з контентом таким, що прокручується */
#update-modal-content {
    overflow-y: auto; /* Додаємо вертикальну прокрутку ТІЛЬКИ коли контент не влазить */
    padding-right: 15px; /* Невеликий відступ для скролбару */
    margin-right: -15px; /* Компенсуємо відступ, щоб текст був рівним */
}

/* --- Решта стилів залишаються без змін --- */
@keyframes fadeIn { from {opacity: 0; transform: scale(0.95);} to {opacity: 1; transform: scale(1);} }

.modal-content .close {
    color: #aaa;
    /* float: right; -- float більше не потрібен */
    align-self: flex-end; /* Вирівнюємо хрестик по правому краю */
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.modal-content .close:hover { color: black; }

#update-modal-content ul { padding-left: 20px; }
#update-modal-content li { margin-bottom: 8px; }

/* Стиль для головного блоку-попередження */
.cache-notice {
    background-color: #fffbe6; /* Світло-жовтий фон */
    border-left: 5px solid #ffc107; /* Яскрава жовта лінія зліва */
    padding: 15px 20px;
    margin-top: 20px;
    border-radius: 5px;
    font-size: 14px;
    color: #555;
    border-top: none; /* Перебиваємо старий стиль */
}

.cache-notice p {
    margin-top: 0;
    margin-bottom: 10px;
}

.cache-notice ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cache-notice li {
    margin-bottom: 5px;
}

/* Стилізуємо самі "клавіші" */
.cache-notice kbd {
    display: inline-block;
    background-color: #e9ecef; /* Світло-сірий фон */
    border: 1px solid #ccc;
    border-bottom: 2px solid #aaa; /* Створює ефект об'єму */
    border-radius: 4px;
    padding: 2px 6px;
    font-family: monospace; /* Моноширинний шрифт для клавіш */
    font-size: 13px;
    color: #333;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
    margin: 0 2px;
}



/* Стиль для іконки публікації новин */
.publish-news-btn {
    color: white;
    text-decoration: none;
    margin-right: 15px; /* Відступ від імені користувача */
    font-size: 18px;    /* Розмір іконки */
    vertical-align: middle; /* Вирівнює іконку по центру з текстом імені */
    transition: color 0.2s ease;
}

.header-icon-btn {
    color: white;
    text-decoration: none;
    margin-right: 15px; /* Відступ між іконками та іменем */
    font-size: 18px;
    vertical-align: middle;
    transition: color 0.2s ease;
}


/* Медіа-запити для мобільних пристроїв */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 10px 14px; /* Додано для збереження пропорційності */
    }


    .notification-container {
        position: absolute;
        align-items: left;
        top: 10px; /* Фіксує дзвіночок у верхньому куті шапки */
        left: 10px; /* Вирівнювання по центру горизонтально */
        transform: translateX(-50%); /* Центрування дзвіночка */
        
    }

    .logo-container {
        margin-bottom: 10px;
    }

    .auth-status-container {
        position: static;
        margin-top: 10px;
        font-size: 14px; /* Збільшуємо розмір тексту для мобільних пристроїв */
    }

    .logout-button, .login-button {
        font-size: 14px; /* Збільшуємо розмір тексту для кнопок на мобільних пристроях */
    }

    .burger-menu {
        display: block;
    }

    .nav-panel {
        display: none; /* Приховуємо панель навігації */
        flex-direction: column;
        padding: 10px;
        width: 100%;
    }

    .nav-panel.active {
        display: flex; /* Показуємо панель навігації при активному бургер-меню */
    }

    .nav-link, .dropdown {
        margin: 8px 0;
        padding: 8px;
        font-size: 12px;
        background-color: #444;
        border-radius: 5px;
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    .nav-link:hover {
        background-color: #555;
        color: #fff;
    }

    .burger-menu {
        top: 10px;
        right: 10px;
        transform: none;
    }

    .dropbtn {
        font-size: 14px;
        padding: 8px 12px;
    }

    .dropdown-content {
        min-width: 170px;
        width: 100%;
    }

    .dropdown-content a {
        font-size: 12px;
        padding: 8px 12px;
    }


    .dropbtn {
        font-size: 12px;
        margin: 0;
        padding: 0;
    }

    .dropdown-content a {
        box-sizing: border-box;
        width: 100%;
        display: flex;
        margin: auto;
    }

    .mobile-dropdown {
        width: 100%;
        text-align: left;
    }

    .dropbtn-mobile {
        color: white;
        padding: 10px;
        cursor: pointer;
        font-size: 14px;
        background-color: #444;
        border-radius: 5px;
        margin-bottom: 5px;
    }

    .dropdown-content.active {
        display: flex;
        flex-direction: column;
        border-radius: 0;
    }

    .dropdown-content-mobile {
        display: none;
        flex-direction: column;
        padding-left: 15px;
    }

    .dropdown-content-mobile a {
        color: white;
        font-size: 13px;
        padding: 8px 0;
        text-decoration: none;
    }

    .dropdown-content-mobile a:hover {
        color: #ccc;
    }

    .dropdown-content.active {
        display: flex;
      }

}






@media (max-width: 480px) {
    .header {
        padding: 10px;
    }

    .logo {
        max-width: 150px;
    }

    .auth-status-container {
        font-size: 12px; /* Збільшуємо розмір тексту для менших мобільних пристроїв */
    }

    .logout-button, .login-button {
        font-size: 12px; /* Збільшуємо розмір тексту для кнопок на менших мобільних пристроях */
    }

    .burger-menu {
        top: 10px;
        right: 10px;
    }


     
}



