/* 📬 Notifications Panel Styles */

.panel-notifications .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.95) 0%,
        rgba(51, 65, 85, 0.98) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 2px 10px rgba(0, 0, 0, 0.3);
    gap: 1rem;
    min-height: 50px;
}

.panel-notifications .panel-title {
    font-size: 1rem;
    color: rgba(212, 175, 55, 0.9);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(147, 197, 253, 0.3);
    flex-shrink: 0;
}

.panel-notifications .panel-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.panel-notifications .view-news-btn {
    background: rgba(33, 150, 243, 0.2);
    border: 1px solid rgba(33, 150, 243, 0.4);
    color: #2196f3;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.panel-notifications .view-news-btn:hover {
    background: rgba(33, 150, 243, 0.3);
    box-shadow: 0 0 15px rgba(33, 150, 243, 0.3);
}

.panel-notifications .mark-all-read-btn {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #4caf50;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.panel-notifications .mark-all-read-btn:hover {
    background: rgba(76, 175, 80, 0.3);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.3);
}

/* 🔍 Notification Filters */
.notification-filters {
    padding: 0.75rem;
    background: linear-gradient(180deg,
        rgba(15, 15, 25, 0.8) 0%,
        rgba(8, 8, 15, 0.9) 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.filter-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    color: rgba(212, 175, 55, 0.8);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'RemiliaMincho', serif;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(212, 175, 55, 0.4);
}

.filter-btn.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(186, 166, 116, 0.2));
    border-color: rgba(212, 175, 55, 0.6);
    color: rgba(212, 175, 55, 1);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.filter-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.filter-badge {
    background: rgba(212, 175, 55, 0.3);
    color: rgba(212, 175, 55, 1);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
}

.filter-badge.unread-badge {
    background: rgba(33, 150, 243, 0.3);
    color: #93C5FD;
}

.type-filters {
    flex: 1;
    justify-content: flex-end;
}

.type-filter-select,
.date-filter-select {
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    color: rgba(212, 175, 55, 0.9);
    font-size: 0.85rem;
    font-family: 'RemiliaMincho', serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.type-filter-select:hover,
.date-filter-select:hover {
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.type-filter-select option,
.date-filter-select option {
    background: rgba(30, 41, 59, 0.98);
    color: rgba(212, 175, 55, 0.9);
}

/* OLD: Scrolling version */
.notifications-body {
    padding: 0 !important;
    overflow-y: auto;
    max-height: calc(80vh - 60px);
}

.notification-list {
    display: flex;
    flex-direction: column;
}

/* NEW V2: Scroll-free version with pagination */
.notifications-body-v2 {
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden; /* NO SCROLLBAR! */
}

.notification-list-fixed {
    flex: 1;
    overflow: hidden; /* NO SCROLLBAR! */
    display: flex;
    flex-direction: column;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    margin: 0 0.5rem 0.5rem 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 6px;
    gap: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 80px; /* Fixed height for pagination calculations */
    max-height: 80px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.notification-item.unread {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.08), rgba(33, 150, 243, 0.05));
    border-left: 3px solid #2196f3;
    box-shadow: 0 2px 6px rgba(33, 150, 243, 0.2);
}

.notification-item.unread:hover {
    box-shadow: 0 4px 10px rgba(33, 150, 243, 0.3);
}

.notification-item.read {
    opacity: 0.65;
}

.notification-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

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

.notification-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #fff;
}

.notification-message {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    word-wrap: break-word;
}

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

.mark-read-btn {
    background: rgba(76, 175, 80, 0.2);
    border: none;
    color: #4caf50;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 0.2s;
}

.mark-read-btn:hover {
    background: rgba(76, 175, 80, 0.3);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(212, 175, 55, 0.7);
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    margin: 0.5rem;
    border-radius: 8px;
    border: 1px dashed rgba(212, 175, 55, 0.2);
}

.empty-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: 0.6;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.3));
}

.empty-state p {
    font-size: 1rem;
    margin-top: 0.5rem;
    color: rgba(212, 175, 55, 0.8);
    font-family: 'RemiliaMincho', serif;
    letter-spacing: 0.5px;
}

/* Pagination controls (Arcane Gold theme) */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    background: linear-gradient(180deg,
        rgba(212, 175, 55, 0.05) 0%,
        rgba(0, 0, 0, 0.3) 100%);
    min-height: 60px;
}

.pagination-info {
    font-size: 0.875rem;
    color: rgba(212, 175, 55, 0.9);
    font-weight: 600;
}

.pagination-info .text-tertiary {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    margin-left: 0.5rem;
}

/* 🔔 Notification Badge on Bell Icon */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: bold;
    display: none;
    align-items: center;
    justify-content: center;
    animation: pulse 1.5s infinite;
    z-index: 1;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 🍞 Toast Notifications (Settings-style: Simple & Clean) */
.notification-toast {
    position: fixed;
    top: 80px;
    right: -400px;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid var(--hc-blue-accent, #00d4ff);
    border-radius: 4px;
    padding: 12px 16px;
    color: #fff;
    font-size: 11px;
    max-width: 300px;
    z-index: 999999; /* Always on top! */
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
    transition: right 0.3s ease-out;
    cursor: pointer;
}

.notification-toast.show {
    right: 20px;
}

.notification-toast.hide {
    right: -400px;
}

/* 🔔 Push Notification Promo (Welcome Screen Style) */
.push-notification-promo {
    margin: 0.75rem;
    background: linear-gradient(135deg,
        rgba(33, 150, 243, 0.15) 0%,
        rgba(21, 101, 192, 0.15) 100%);
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
    animation: promo-pulse-glow 2s ease-in-out infinite;
}

@keyframes promo-pulse-glow {
    0%, 100% {
        box-shadow:
            0 2px 8px rgba(33, 150, 243, 0.2),
            0 0 20px rgba(33, 150, 243, 0.1);
    }
    50% {
        box-shadow:
            0 2px 12px rgba(33, 150, 243, 0.3),
            0 0 30px rgba(33, 150, 243, 0.2);
    }
}

.promo-content {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.promo-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px rgba(33, 150, 243, 0.5));
}

.promo-text {
    flex: 1;
}

.promo-title {
    font-size: 1rem;
    font-weight: 600;
    color: #93C5FD;
    margin-bottom: 4px;
}

.promo-subtitle {
    font-size: 0.85rem;
    color: #60A5FA;
    opacity: 0.9;
}

.enable-push-btn {
    width: 100%;
    padding: 10px 24px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(10, 10, 20, 0.95);
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.9), rgba(21, 101, 192, 0.9));
    border: 1px solid rgba(33, 150, 243, 0.6);
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 0 10px rgba(33, 150, 243, 0.4);
    font-family: 'RemiliaMincho', serif;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.enable-push-btn:hover {
    background: linear-gradient(135deg, rgba(33, 150, 243, 1), rgba(21, 101, 192, 1));
    box-shadow: 0 0 20px rgba(33, 150, 243, 0.6);
    transform: translateY(-2px);
}

.enable-push-btn:active {
    transform: translateY(0);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .notification-toast {
        max-width: calc(100vw - 40px);
    }

    .notification-toast.show {
        right: 10px;
    }
}

    .notifications-body {
        max-height: calc(100vh - 120px);
    }

    .panel-notifications .panel-header {
        flex-wrap: wrap;
        min-height: auto;
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .panel-notifications .panel-title {
        font-size: 0.9rem;
        width: 100%;
    }

    .panel-notifications .panel-actions {
        width: 100%;
        justify-content: stretch;
    }

    .panel-notifications .view-news-btn,
    .panel-notifications .mark-all-read-btn {
        flex: 1;
        justify-content: center;
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    .notification-filters {
        padding: 0.5rem;
    }

    .filter-group {
        flex-wrap: wrap;
    }

    .filter-btn {
        font-size: 0.75rem;
        padding: 5px 10px;
    }

    .type-filters {
        width: 100%;
        gap: 0.5rem;
    }

    .type-filter-select,
    .date-filter-select {
        flex: 1;
        font-size: 0.75rem;
        padding: 5px 8px;
    }

    .push-notification-promo {
        margin: 0.5rem;
        padding: 12px;
    }

    .promo-title {
        font-size: 0.9rem;
    }

    .promo-subtitle {
        font-size: 0.75rem;
    }

    .enable-push-btn {
        font-size: 10px;
        padding: 8px 16px;
    }
}
