/* frontend-user/css/notifications.css */

/* ===== GENERAL ===== */
.notification-app {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem 6rem;
    background: var(--bg-primary);
    min-height: 100vh;
}

/* ===== HEADER ===== */
.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    z-index: 10;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.header-left h1 {
    font-size: 1.5rem;
    margin: 0;
}
.unread-badge {
    background: var(--accent);
    color: white;
    border-radius: 9999px;
    padding: 0.1rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
}
.btn-back {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    padding: 0.25rem 0.5rem;
}
.btn-icon {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25rem;
}
.btn-icon:hover {
    color: var(--accent);
}

/* ===== TOOLBAR ===== */
.notif-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.filter-tabs {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 0.25rem 0.8rem;
    border-radius: 30px;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.filter-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
#sortSelect {
    padding: 0.25rem 0.8rem;
    border-radius: 30px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
}

/* ===== SEARCH ===== */
.search-container {
    position: relative;
    margin: 0.5rem 0 1rem;
}
#searchInput {
    width: 100%;
    padding: 0.6rem 2.5rem 0.6rem 1rem;
    border-radius: 30px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.95rem;
}
.clear-search {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
    display: none;
}
.clear-search.visible {
    display: block;
}

/* ===== FILTER CHIPS ===== */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.5rem 0 1rem;
}
.chip {
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.chip.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* ===== STATISTICS ===== */
.stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem 1.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.stat-item strong {
    color: var(--text-primary);
}

/* ===== NOTIFICATION LIST ===== */
.notification-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ===== CARD ===== */
.notif-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.notif-card.unread {
    border-left: 4px solid var(--accent);
}
.notif-card.pinned {
    border-color: var(--warning);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}
.notif-card.critical {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

/* Card header */
.card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.card-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    font-size: 1.2rem;
    flex-shrink: 0;
}
.card-title-area {
    flex: 1;
    min-width: 0;
}
.card-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}
.card-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.card-actions {
    display: flex;
    gap: 0.3rem;
    flex-shrink: 0;
}
.card-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-muted);
    padding: 0.1rem 0.2rem;
    transition: color 0.2s;
}
.card-actions button:hover {
    color: var(--accent);
}

/* Card body */
.card-body {
    margin-top: 0.4rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
    padding-left: 3rem; /* align under icon */
}
.card-body.expanded {
    max-height: none;
}
.card-body .more {
    color: var(--accent);
    cursor: pointer;
}

/* Card media */
.card-media {
    margin-top: 0.5rem;
    padding-left: 3rem;
}
.card-media img {
    max-width: 100%;
    max-height: 200px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.card-media video {
    max-width: 100%;
    border-radius: var(--radius-sm);
}

/* Progress bar */
.card-progress {
    margin-top: 0.5rem;
    padding-left: 3rem;
}
.card-progress progress {
    width: 100%;
    height: 6px;
    border-radius: 9999px;
    appearance: none;
    background: var(--border);
}
.card-progress progress::-webkit-progress-bar {
    background: var(--border);
    border-radius: 9999px;
}
.card-progress progress::-webkit-progress-value {
    background: var(--accent);
    border-radius: 9999px;
}

/* Card buttons */
.card-buttons {
    margin-top: 0.5rem;
    padding-left: 3rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.card-buttons button {
    padding: 0.25rem 0.8rem;
    border-radius: 30px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-primary);
    transition: all 0.2s;
}
.card-buttons button.primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
.card-buttons button:hover {
    background: var(--border);
}
.card-buttons button.primary:hover {
    background: var(--accent-dark);
}

/* Card footer */
.card-footer {
    margin-top: 0.4rem;
    padding-left: 3rem;
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
}
.card-priority {
    text-transform: uppercase;
    font-weight: 600;
}
.priority-critical { color: var(--danger); }
.priority-high { color: var(--warning); }
.priority-normal { color: var(--text-secondary); }
.priority-low { color: var(--text-muted); }
.priority-silent { color: var(--text-muted); opacity: 0.6; }

/* ===== STATE MESSAGES ===== */
.state-message {
    text-align: center;
    padding: 3rem 1rem;
}
.skeleton-card {
    background: var(--bg-secondary);
    height: 80px;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}
.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.empty h3, .error h3 {
    margin-bottom: 0.5rem;
}
.empty p, .error p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* ===== FLOATING BUTTONS ===== */
.floating-buttons {
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 100;
}
.fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: var(--accent);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fab:hover {
    transform: scale(1.05);
    background: var(--accent-dark);
}
.fab:active {
    transform: scale(0.95);
}

/* ===== HELP OVERLAY ===== */
.help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    padding: 1rem;
}
.help-panel {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}
.help-panel .help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.help-panel .help-header h2 {
    margin: 0;
}
.help-panel .help-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
}
.help-panel .help-search {
    width: 100%;
    padding: 0.6rem 1rem;
    border-radius: 30px;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}
.help-panel .faq-item {
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    cursor: pointer;
}
.help-panel .faq-item .question {
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.help-panel .faq-item .answer {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    display: none;
}
.help-panel .faq-item.open .answer {
    display: block;
}
.help-panel .help-contacts {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.help-panel .help-contacts button {
    flex: 1;
    min-width: 120px;
    padding: 0.5rem;
    border-radius: 30px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    cursor: pointer;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .notif-header h1 {
        font-size: 1.2rem;
    }
    .stats-row {
        gap: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    .card-title {
        font-size: 0.9rem;
    }
    .card-body {
        font-size: 0.85rem;
        padding-left: 0;
    }
    .card-media, .card-progress, .card-buttons, .card-footer {
        padding-left: 0;
    }
    .floating-buttons {
        bottom: 1rem;
        right: 1rem;
    }
    .fab {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
}