/* Стилістика узгоджена з блоком #seasonal-anime: Roboto, біло-блакитно-жовта
   палітра, картки з тінню, заокруглення 8-10px, підйом на hover. */

.notifications-page,
.subscriptions-page,
.floating-notif-panel {
    font-family: "Roboto", sans-serif;
}

/* ===== Кнопка-тригер підписки + модальне вікно вибору (сторінка тайтлу) ===== */
.subscribe-trigger-btn {
display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 18px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(to bottom, #4baee8, #3498db);
    color: #fff;
    transition: all .3s ease;
    text-align: center;
    justify-content: center;
}
.subscribe-trigger-btn:hover {
    background: linear-gradient(to bottom, #3498db, #2980b9);

}
.subscribe-trigger-btn.is-subscribed {
    background: linear-gradient(to bottom, #f7d250, #f1c40f);
    color: #2c3e50;

}
.subscribe-trigger-btn.is-subscribed:hover {
    box-shadow: 0 5px 10px rgba(247, 210, 80, .3);
}

.subscribe-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 10000;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    box-sizing: border-box;
}
.subscribe-modal-overlay.open {
    display: flex;
}

.subscribe-modal {
    font-family: "Roboto", sans-serif;
    background: #fff;
    border-radius: 14px;
    padding: 18px 20px;
    max-width: 400px;
    width: 100%;
    margin: 20px auto;
    position: relative;
    box-sizing: border-box;
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
}

.subscribe-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.subscribe-modal h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.subscribe-modal-close {
    flex-shrink: 0;
    background: linear-gradient(to bottom, #f7d250, #f1c40f);
    color: #2c3e50;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(247, 210, 80, .3);
    transition: all .25s ease;
}
.subscribe-modal-close:hover {
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
    transform: rotate(90deg);
}

/* Швидкий вибір - дві великі кнопки на всю ширину, покривають більшість випадків */
.subscribe-quick {
    display: flex;
    gap: 8px;
}
.subscribe-quick .segmented-control {
    display: flex;
    width: 100%;
    gap: 8px;
}
.subscribe-quick .segment {
    flex: 1;
    padding: 12px 10px;
    font-size: 13px;
    text-align: center;
    white-space: normal;
}

/* Посилання-перемикач, що розгортає деталі (суб/озв/команди) */
.subscribe-advanced-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 12px;
    padding: 8px;
    border: none;
    background: none;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    transition: color .2s ease;
}
.subscribe-advanced-toggle:hover {
    color: #4baee8;
}
.subscribe-advanced-toggle i {
    transition: transform .25s ease;
    font-size: 11px;
}
.subscribe-advanced-toggle.open i {
    transform: rotate(180deg);
}

.subscribe-advanced {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}
.subscribe-advanced.open {
    /* Не фіксований max-height - список команд може бути довшим за будь-яке
       розумне число, а overflow:hidden з фіксованою висотою його просто
       обрізав, незалежно від скролу самої модалки. Анімація розгортання
       через це не плавна (миттєво), зате нічого не ховається. */
    max-height: none;
    overflow: visible;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.subscribe-modal .segmented-control .segment {
    white-space: normal;
}
.subscribe-modal .subscribe-team-row {
    gap: 8px;
}
.subscribe-modal .subscribe-team-name {
    min-width: 0;
    flex: 1 1 100%;
}

@media (max-width: 480px) {
    .subscribe-modal {
        padding: 16px;
    }
    .subscribe-quick {
        flex-direction: column;
    }
}

.subscribe-teams {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.subscribe-teams-title {
    font-size: 13px;
    color: #777;
    margin-bottom: 4px;
}

.subscribe-advanced-note {
    font-size: 11px;
    color: #999;
    margin: 0 0 10px;
    font-style: italic;
}

.subscribe-teams-loading,
.subscribe-teams-empty {
    text-align: center;
    color: #999;
    font-size: 12px;
    font-style: italic;
    padding: 12px 0;
    margin: 0;
}

.subscribe-team-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.subscribe-team-row:last-child {
    border-bottom: none;
}

.subscribe-team-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    min-width: 120px;
}

.subscribe-toggle-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(to bottom, #4baee8, #3498db);
    color: #fff;
    box-shadow: 0 3px 6px rgba(75, 174, 232, .2);
    transition: all .3s ease;
    user-select: none;
}

.subscribe-toggle-item:hover {
    background: linear-gradient(to bottom, #3498db, #2980b9);
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(75, 174, 232, .3);
}

.subscribe-toggle-item.active {
    background: linear-gradient(to bottom, #f7d250, #f1c40f);
    color: #2c3e50;
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(247, 210, 80, .3);
}

.subscribe-toggle-item input[type="checkbox"] {
    display: none;
}

/* Сторінка /subscriptions/ */
.subscriptions-page {
	padding: 25px;
    background: #fff;
    position: relative;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
    .subscriptions-container {
        grid-template-columns: 1fr;
    }
    .subscription-poster,
    .subscription-poster--empty {
        width: 44px;
        height: 60px;
    }
.subscriptions-page h1 {
    margin: 0 0 20px;
    font-size: 24px;
    font-weight: 700;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}
.subscriptions-page h1:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #4baee8, #f7d250);
    border-radius: 2px;
}

.subscriptions-container {
display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.subscription-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,.05);
    transition: all .3s ease;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.subscription-row:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

.subscription-poster-link {
    flex-shrink: 0;
    display: block;
}

.subscription-poster {
    width: 56px;
    height: 76px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid #d7ecff;
    display: block;
    transition: transform .3s ease;
}

.subscription-row:hover .subscription-poster {
    transform: scale(1.05);
}

.subscription-poster--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #ccc;
    font-size: 22px;
}

.subscription-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subscription-title {
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    color: #333;
    transition: color .3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.subscription-title:hover {
    color: #4baee8;
}

.subscription-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.subscription-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    background: linear-gradient(to bottom, #4baee8, #3498db);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(75, 174, 232, .25);
    transition: all .3s ease;
}

.subscription-badge:hover {
    background: linear-gradient(to bottom, #e74c3c, #c0392b);
    box-shadow: 0 3px 8px rgba(231, 76, 60, .3);
}

/* Глобальні налаштування сповіщень */
.notif-settings-block {
    margin-bottom: 20px;
    padding: 16px 18px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,.05);
}
.notif-settings-block h3 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: #333;
}
.notif-settings-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
    padding: 5px 0;
    cursor: pointer;
}
.notif-settings-note {
    margin: 10px 0 0;
    font-size: 11px;
    color: #999;
}

/* Кнопка підписки на категорію */
.category-subscribe-container {
    margin: 10px 0;
}

/* ===== Плаваючий дзвіночок ===== */
.floating-bell-btn {
    position: fixed;
    left: 20px;
    bottom: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(to bottom, #4baee8, #3498db);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(75, 174, 232, .35);
    z-index: 9998;
    transition: all .3s ease;
	opacity: 0.9;
}
.floating-bell-btn:hover {
    transform: translateY(-3px) scale(1.05);
    background: linear-gradient(to bottom, #f7d250, #f1c40f);
    color: #2c3e50;
}
.floating-bell-btn.has-unread {
    animation: floating-bell-pulse 2s infinite;
}
@keyframes floating-bell-pulse {
    0%   { box-shadow: 0 4px 14px rgba(247,210,80,.3); }
    50%  { box-shadow: 0 4px 22px rgba(247,210,80,.7); }
    100% { box-shadow: 0 4px 14px rgba(247,210,80,.3); }
}

.floating-bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(to bottom, #ff6161, #e94f4f);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 0 0 2px #fff;
}

.floating-notif-overlay {
    position: fixed;
    inset: 0;
    background: rgba(44,62,80,.35);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    z-index: 9997;
}
.floating-notif-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.floating-notif-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: #fff;
    color: #333;
    border-radius: 20px 0 0 20px;
    overflow: hidden;
    box-shadow: -12px 0 35px rgba(0,0,0,.18);
    transition: right .35s cubic-bezier(.4,0,.2,1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
}
.floating-notif-panel.open {
    right: 0;
}

.floating-notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #4baee8, #3498db);
    flex-shrink: 0;
}
.floating-notif-header span:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
}
.floating-notif-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.floating-notif-header-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #fff;
    background: rgba(255,255,255,.18);
    transition: all .25s ease;
}
.floating-notif-header-actions a:hover {
    background: rgba(255,255,255,.32);
    transform: translateY(-2px);
	text-decoration: none;
}
.floating-notif-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    color: #2c3e50;
    background: linear-gradient(to bottom, #f7d250, #f1c40f);
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
    transition: all .25s ease;
}
.floating-notif-close:hover {
    transform: rotate(90deg);
    box-shadow: 0 3px 10px rgba(0,0,0,.3);
}

.floating-notif-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    background: #f7f9fb;
}
.floating-notif-body::-webkit-scrollbar {
    width: 6px;
}
.floating-notif-body::-webkit-scrollbar-thumb {
    background: #d7ecff;
    border-radius: 3px;
}
.floating-notif-body::-webkit-scrollbar-track {
    background: transparent;
}

/* Картки сповіщень у самій випадайці (дефолтна розмітка теми .dropdown-item) -
   переоформлюємо в те саме картково-тіньове стилі, щоб не випадали з дизайну. */
.floating-notif-body .dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,.05);
    transition: all .25s ease;
}
.floating-notif-body .dropdown-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,.1);
}
.floating-notif-body .dropdown-item img {
    border-radius: 8px;
        width: 50px;
}
        .delete-icon-container{
cursor: pointer;
}
.floating-notif-body .dropdown-header {
    padding: 4px 4px 10px;
    font-weight: 700;
    color: #333;
}
.floating-notif-body .dropdown-header a {
    color: #4baee8;
}
.floating-notif-body .dropdown-opt {
    display: flex;
    gap: 14px;
    padding: 0 4px 10px;
    font-size: 12px;
}
.floating-notif-body .dropdown-opt a {
    color: #4baee8;
    text-decoration: none;
    cursor: pointer;
}
.floating-notif-body .dropdown-item-bot {
    display: block;
    text-align: center;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #4baee8;
    text-decoration: none;
}

.floating-notif-loading {
    text-align: center;
    color: #999;
    padding: 30px 0;
    font-size: 13px;
    font-style: italic;
}

/* На мобільних - на весь екран замість бічної панелі */
@media (max-width: 480px) {
    .floating-notif-panel {
        width: 100vw;
        right: -100vw;
        border-radius: 0;
    }
    .floating-bell-btn {
        right: 14px;
        bottom: 14px;
        width: 48px;
        height: 48px;
        font-size: 19px;
    }
}

/* ===== Сегментовані перемикачі підписки (весь тайтл / команда) ===== */
.segmented-control {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.segmented-control .segment {
    appearance: none;
    border: none;
    border-radius: 8px;
    background: linear-gradient(to bottom, #4baee8, #3498db);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 3px 6px rgba(75, 174, 232, .2);
    transition: all .3s ease;
}

.segmented-control .segment:hover:not(.active) {
    background: linear-gradient(to bottom, #3498db, #2980b9);
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(75, 174, 232, .3);
}

.segmented-control .segment.active {
    background: linear-gradient(to bottom, #f7d250, #f1c40f);
    color: #2c3e50;
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(247, 210, 80, .3);
}

/* На вузьких екранах перемикач переноситься під назву команди */
@media (max-width: 480px) {
    .subscribe-team-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .segmented-control .segment {
        padding: 7px 10px;
        font-size: 12px;
    }
}

/* ===== Сторінка /notifications/ ===== */
.notifications-page {
    padding: 25px;
    background: #fff;
    position: relative;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.notifications-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.notifications-page-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}
.notifications-page-header h1:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #4baee8, #f7d250);
    border-radius: 2px;
}
.notifications-page-link {
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #4baee8;
    text-decoration: none;
    transition: color .3s ease;
}
.notifications-page-link:hover {
    color: #3498db;
}

.notifications-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
.notifications-filter {
    font-size: 13px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    background: linear-gradient(to bottom, #4baee8, #3498db);
    color: #fff !important;
    text-decoration: none !important;
    box-shadow: 0 3px 6px rgba(75, 174, 232, .2);
    transition: all .3s ease;
}
.notifications-filter:hover {
    background: linear-gradient(to bottom, #3498db, #2980b9);
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(75, 174, 232, .3);
}
.notifications-filter.active {
    background: linear-gradient(to bottom, #f7d250, #f1c40f);
    color: #2c3e50;
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(247, 210, 80, .3);
}

.notification-all {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}
.notification-all .mark-as-read {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    background: #f5f5f5;
    text-decoration: none;
    transition: all .25s ease;
}
.notification-all .mark-as-read:hover {
    color: #fff;
    background: linear-gradient(to bottom, #4baee8, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(75, 174, 232, .3);
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,.05);
    transition: all .3s ease;
}
.notification:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
}
.notification.unread {
    background: #fdf8e9;
    border-left: 3px solid #f7d250;
}

.notification__avatar img {
    width: 44px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid #d7ecff;
}
.notification__avatar .icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, #4baee8, #3498db);
    flex-shrink: 0;
}
.notification__avatar .icon-circle i {
    font-size: 18px !important;
}

.notification__info {
    flex: 1;
    min-width: 0;
	font-size: 14px;
}
.notification__text {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}
.notification__text a {
    color: #4baee8;
    text-decoration: underline;
}
.notification__date {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.notification__controls {
	display: flex;
    height: stretch;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.notification__seen,
.notification__delete {
    cursor: pointer;
    color: #bbb;
    transition: color .2s ease;
    font-size: 14px;
}
.notification__seen:hover {
    color: #4baee8;
}
.notification__delete:hover {
    color: #e74c3c;
}

.no-found-list {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 40px 0;
    font-size: 14px;
    background: #f9f9f9;
    border-radius: 10px;
    margin: 20px 0;
}

@media (max-width: 480px) {
    .notifications-page,
    .subscriptions-page {
        padding: 16px;
        border-radius: 10px;
    }
    .notifications-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .subscription-poster,
    .subscription-poster--empty {
        width: 44px;
        height: 60px;
    }
    .subscription-title {
        white-space: normal;
        font-size: 14px;
    }
}

#simple-toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.simple-toast {
    font-family: "Roboto", sans-serif;
    background: #fff;
    color: #333;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .1);
    opacity: 0;
    transform: translateX(20px);
    transition: opacity .3s ease, transform .3s ease;
    border-left: 4px solid #4baee8;
}

.simple-toast--show {
    opacity: 1;
    transform: translateX(0);
}

.simple-toast--success {
    border-left-color: #4baee8;
}

.simple-toast--error {
    border-left-color: #e74c3c;
}

