/* =========================================================
   KuroDev Notifications Center - Dropdown & UI Styles
   Theme: KuroDev Dark
   ========================================================= */

/* Колокольчик и бейдж в навигации */
.notification_bell {
    display: flex;
    position: relative;
    margin: 0 0 0 10px;
    align-items: center;
    cursor: pointer;
}

.notification_bell .notification_icon {
    width: 22px;
    height: 22px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.notification_bell:hover .notification_icon {
    opacity: 0.85;
}

/* Бейдж непрочитанных на колокольчике (аккуратная статичная точка без цифр) */
.kuro-notif-badge {
    position: absolute;
    top: 1px;
    right: 1px;
    background: #e50914;
    width: 8px;
    height: 8px;
    min-width: 8px;
    min-height: 8px;
    max-width: 8px;
    max-height: 8px;
    border-radius: 50%;
    display: none;
    box-sizing: border-box;
    border: 1.5px solid rgb(33, 33, 33);
    pointer-events: none;
    padding: 0;
    margin: 0;
    box-shadow: 0 0 4px rgba(229, 9, 20, 0.5);
}

/* Выпадающее окно уведомлений */
.notification_menu {
    position: absolute;
    top: 47px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 20px);
    background: rgb(33, 33, 33);
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    z-index: 99999;
}

/* Шапка меню */
.kuro-notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgb(33, 33, 33);
    border-radius: 12px 12px 0 0;
}

.kuro-notif-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kuro-notif-header-title {
    font-size: 14px;
    font-weight: 600;
    color: #f1f1f1;
    margin: 0;
}

.kuro-notif-header-count {
    background: rgba(113, 170, 235, 0.18);
    color: #71aaeb;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 10px;
}

.kuro-notif-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.kuro-notif-icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
    text-decoration: none;
}

.kuro-notif-icon-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.kuro-notif-icon-btn.active {
    color: #71aaeb;
    background: rgba(113, 170, 235, 0.15);
}

/* Вкладки фильтрации */
.kuro-notif-tabs {
    display: flex;
    padding: 6px 10px;
    gap: 4px;
    background: rgb(33, 33, 33);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.kuro-notif-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 500;
    padding: 5px 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.kuro-notif-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.kuro-notif-tab.active {
    color: #71aaeb;
    background: rgba(113, 170, 235, 0.14);
}

/* Список уведомлений с фиксированной стабильной высотой */
.kuro-notif-scroll {
    height: 290px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
    position: relative;
    border-radius: 0 0 12px 12px;
}

.kuro-notif-scroll::-webkit-scrollbar {
    width: 4px;
}

.kuro-notif-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
}

.kuro-notif-list {
    display: flex;
    flex-direction: column;
}

/* Элемент уведомления */
.kuro-notif-item {
    display: flex;
    align-items: flex-start;
    padding: 10px 14px;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
    text-decoration: none;
    box-sizing: border-box;
}

.kuro-notif-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.kuro-notif-item.is-unread {
    background: rgba(113, 170, 235, 0.06);
}

.kuro-notif-item.is-unread:hover {
    background: rgba(113, 170, 235, 0.1);
}

/* Аватар / Постер */
.kuro-notif-media-wrap {
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
}

.kuro-notif-avatar {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    aspect-ratio: 1 / 1 !important;
    display: block !important;
    flex-shrink: 0 !important;
    background: #202024;
}

.kuro-notif-item.is-poster .kuro-notif-media-wrap {
    border-radius: 8px !important;
    width: 38px;
    height: 48px;
    min-width: 38px;
    min-height: 48px;
    max-width: 38px;
    max-height: 48px;
}

.kuro-notif-item.is-poster .kuro-notif-avatar {
    border-radius: 8px !important;
    width: 38px !important;
    height: 48px !important;
    min-width: 38px !important;
    min-height: 48px !important;
    max-width: 38px !important;
    max-height: 48px !important;
    aspect-ratio: 38 / 48 !important;
}

.kuro-notif-type-icon {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: rgb(33, 33, 33);
    border: 1.5px solid rgb(33, 33, 33);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    box-sizing: border-box;
}

.kuro-notif-type-icon svg {
    width: 10px;
    height: 10px;
}

.kuro-notif-type-icon.icon-episodes { background: #e50914; color: #fff; }
.kuro-notif-type-icon.icon-comments { background: #71aaeb; color: #fff; }
.kuro-notif-type-icon.icon-pm { background: #3b82f6; color: #fff; }
.kuro-notif-type-icon.icon-social { background: #a855f7; color: #fff; }
.kuro-notif-type-icon.icon-collections { background: #ec4899; color: #fff; }
.kuro-notif-type-icon.icon-system { background: #f59e0b; color: #fff; }

/* Содержимое уведомления */
.kuro-notif-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kuro-notif-title {
    font-size: 13px;
    font-weight: 600;
    color: #f1f1f1;
    line-height: 1.35;
    word-break: break-word;
}

.kuro-notif-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.35;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kuro-notif-time {
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 3px;
}

/* Действия справа (точка непрочитанного / удаление) */
.kuro-notif-side-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 100%;
    margin-top: 2px;
}

.kuro-notif-unread-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #71aaeb;
    box-shadow: 0 0 6px rgba(113, 170, 235, 0.8);
}

.kuro-notif-del-btn {
    display: none;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.15s ease, transform 0.15s ease;
    align-items: center;
    justify-content: center;
}

.kuro-notif-del-btn svg {
    width: 14px;
    height: 14px;
    display: block;
    pointer-events: none;
    stroke: currentColor;
}

.kuro-notif-item:hover .kuro-notif-del-btn {
    display: flex;
}

.kuro-notif-item:hover .kuro-notif-unread-dot {
    display: none;
}

.kuro-notif-del-btn:hover {
    color: #d66060;
    background: transparent;
    transform: scale(1.08);
}

/* Пустое состояние */
.kuro-notif-empty {
    height: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    box-sizing: border-box;
}

.kuro-notif-empty-icon {
    width: 40px;
    height: 40px;
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 4px;
}

.kuro-notif-empty-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #d1d1d6;
}

.kuro-notif-empty-desc {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.4;
    max-width: 250px;
}

/* Плавный лоадер без скачков высоты */
.kuro-notif-loader {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.kuro-notif-spinner {
    width: 26px;
    height: 26px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: #71aaeb;
    border-radius: 50%;
    animation: kuroNotifSpin 0.7s linear infinite;
}

@keyframes kuroNotifSpin {
    to { transform: rotate(360deg); }
}
