/* ===================================
   Notification Page
   =================================== */

.kuehn-notifications-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.kuehn-notifications-page__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.kuehn-notifications-page__title {
    font-size: 24px;
    font-weight: 700;
    color: #1c2024;
    margin: 0;
}

.kuehn-notifications-page__mark-all {
    padding: 8px 16px;
    border: 1px solid #e3e3e7;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.kuehn-notifications-page__mark-all:hover {
    background: #f5f6f8;
    border-color: #d1d5db;
}

.kuehn-notifications-page__mark-all:focus {
    outline: 2px solid var(--kuehn-focus-ring, #8b6f5a);
    outline-offset: 2px;
}

/* Filter Chips */
.kuehn-notifications-page__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.kuehn-filter-chip {
    padding: 6px 14px;
    border: 1px solid #e3e3e7;
    border-radius: 999px;
    background: #fff;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.kuehn-filter-chip:hover {
    background: #f5f6f8;
    border-color: #d1d5db;
    color: #374151;
}

.kuehn-filter-chip--active {
    background: #1c2024;
    border-color: #1c2024;
    color: #fff;
}

.kuehn-filter-chip--active:hover {
    background: #374151;
    border-color: #374151;
    color: #fff;
}

.kuehn-filter-chip:focus {
    outline: 2px solid var(--kuehn-focus-ring, #8b6f5a);
    outline-offset: 2px;
}

/* Date Group Header */
.kuehn-notifications-page__date-group {
    margin-bottom: 16px;
}

.kuehn-notifications-page__date-label {
    font-size: 13px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    padding-left: 4px;
}

/* Page Notification Item */
.kuehn-notification-page-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    margin-bottom: 4px;
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    text-decoration: none;
    color: #1c2024;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.kuehn-notification-page-item:hover {
    background: #f9fafb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    text-decoration: none;
}

.kuehn-notification-page-item--unread {
    background: #eff6ff;
    border-color: #dbeafe;
}

.kuehn-notification-page-item--unread:hover {
    background: #dbeafe;
}

/* Type Icon (page version — larger) */
.kuehn-notification-page-item__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kuehn-notification-page-item__icon svg {
    width: 20px;
    height: 20px;
}

/* Reuse icon type colors from bell CSS */
.kuehn-notification-page-item__icon--new_chapter {
    background: #dbeafe;
    color: #3b82f6;
}

.kuehn-notification-page-item__icon--comment_reply {
    background: #ede9fe;
    color: #8b5cf6;
}

.kuehn-notification-page-item__icon--author_update {
    background: #fef3c7;
    color: #f59e0b;
}

.kuehn-notification-page-item__icon--bonus_material {
    background: #d1fae5;
    color: #10b981;
}

.kuehn-notification-page-item__icon--achievement_earned {
    background: #fef3c7;
    color: #f59e0b;
}

.kuehn-notification-page-item__icon--system {
    background: #f3f4f6;
    color: #6b7280;
}

/* Content */
.kuehn-notification-page-item__content {
    flex: 1;
    min-width: 0;
}

.kuehn-notification-page-item__title {
    font-size: 15px;
    font-weight: 500;
    color: #1c2024;
    line-height: 1.4;
    margin-bottom: 4px;
}

.kuehn-notification-page-item--unread .kuehn-notification-page-item__title {
    font-weight: 600;
}

.kuehn-notification-page-item__message {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 4px;
}

.kuehn-notification-page-item__time {
    font-size: 12px;
    color: #9ca3af;
}

/* Dismiss */
.kuehn-notification-page-item__dismiss {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 6px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.kuehn-notification-page-item:hover .kuehn-notification-page-item__dismiss {
    opacity: 1;
}

.kuehn-notification-page-item__dismiss:hover {
    background: #e5e7eb;
    color: #1c2024;
}

.kuehn-notification-page-item__dismiss:focus {
    opacity: 1;
    outline: 2px solid var(--kuehn-focus-ring, #8b6f5a);
    outline-offset: -2px;
}

/* Loading */
.kuehn-notifications-page__loading {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

/* Empty State */
.kuehn-notifications-page__empty {
    text-align: center;
    padding: 60px 20px;
}

.kuehn-notifications-page__empty-title {
    color: #1c2024;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
}

.kuehn-notifications-page__empty-hint {
    color: #9ca3af;
    font-size: 16px;
    margin: 10px auto 0;
    max-width: 56ch;
}

.kuehn-notifications-page__empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
}

.kuehn-notifications-page__empty-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--kuehn-focus-ring, #8b6f5a);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.kuehn-notifications-page__empty-button--secondary {
    background: #fff;
    color: #374151;
    border: 1px solid #e3e3e7;
}

/* Load More */
.kuehn-notifications-page__footer {
    text-align: center;
    padding: 20px 0 40px;
}

.kuehn-notifications-page__load-more {
    padding: 10px 24px;
    border: 1px solid #e3e3e7;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.kuehn-notifications-page__load-more:hover {
    background: #f5f6f8;
}

.kuehn-notifications-page__load-more:focus {
    outline: 2px solid var(--kuehn-focus-ring, #8b6f5a);
    outline-offset: 2px;
}

/* Login Required */
.kuehn-notifications-login-required {
    padding: 8px 0 36px;
}

.kuehn-notifications-login-required__surface {
    border: 1px solid color-mix(in srgb, var(--kuehn-site-border, #e5e7eb) 78%, transparent);
    border-radius: 22px;
    padding: clamp(24px, 4vw, 38px);
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--kuehn-focus-ring, #8b6f5a) 16%, transparent) 0, transparent 32%),
        linear-gradient(160deg, color-mix(in srgb, var(--kuehn-site-surface, #ffffff) 96%, transparent), color-mix(in srgb, var(--kuehn-site-bg, #f8f5f1) 98%, transparent));
    box-shadow: 0 18px 36px color-mix(in srgb, rgba(15, 23, 42, 0.12) 16%, transparent);
}

.kuehn-notifications-login-required__eyebrow {
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--kuehn-focus-ring, #8b6f5a);
}

.kuehn-notifications-login-required__title {
    margin: 0;
    font-size: clamp(1.85rem, 4vw, 2.65rem);
    line-height: 1.1;
    color: var(--kuehn-site-text, #1f2937);
}

.kuehn-notifications-login-required__text {
    max-width: 60ch;
    margin: 16px 0 0;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--kuehn-site-muted, #6b7280);
}

.kuehn-notifications-login-required__list {
    display: grid;
    gap: 10px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.kuehn-notifications-login-required__list li {
    position: relative;
    padding: 14px 16px 14px 42px;
    border: 1px solid color-mix(in srgb, var(--kuehn-site-border, #e5e7eb) 78%, transparent);
    border-radius: 16px;
    background: color-mix(in srgb, var(--kuehn-site-surface, #ffffff) 88%, transparent);
    color: var(--kuehn-site-text, #1f2937);
}

.kuehn-notifications-login-required__list li::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 16px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--kuehn-focus-ring, #8b6f5a), color-mix(in srgb, var(--kuehn-focus-ring, #8b6f5a) 40%, #ffffff));
    transform: translateY(-50%);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--kuehn-focus-ring, #8b6f5a) 16%, transparent);
}

.kuehn-notifications-login-required__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.kuehn-notifications-login-required__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--kuehn-focus-ring, #8b6f5a);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.kuehn-notifications-login-required__button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px color-mix(in srgb, var(--kuehn-focus-ring, #8b6f5a) 24%, transparent);
}

.kuehn-notifications-login-required__button:focus {
    outline: 2px solid var(--kuehn-focus-ring, #8b6f5a);
    outline-offset: 2px;
}

.kuehn-notifications-login-required__button:visited {
    color: #fff;
}

.kuehn-notifications-login-required__button--secondary {
    background: transparent;
    color: var(--kuehn-site-text, #1f2937);
    border: 1px solid color-mix(in srgb, var(--kuehn-site-border, #e5e7eb) 78%, transparent);
}

.kuehn-notifications-login-required__button--secondary:hover {
    box-shadow: none;
    background: color-mix(in srgb, var(--kuehn-site-surface, #ffffff) 88%, transparent);
}

.kuehn-notifications-login-required__button--secondary:visited {
    color: var(--kuehn-site-text, #1f2937);
}

/* Mobile */
@media (max-width: 768px) {
    .kuehn-notifications-page {
        padding: 0 12px;
    }

    .kuehn-notifications-login-required__surface {
        border-radius: 18px;
        padding: 22px 18px;
    }

    .kuehn-notifications-login-required__list li {
        padding: 13px 14px 13px 38px;
    }

    .kuehn-notifications-page__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .kuehn-notifications-page__empty-actions {
        flex-direction: column;
    }

    .kuehn-notifications-page__empty-button {
        width: 100%;
    }

    .kuehn-notification-page-item {
        padding: 12px;
        gap: 10px;
    }

    .kuehn-notification-page-item__dismiss {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kuehn-notification-page-item,
    .kuehn-filter-chip,
    .kuehn-notifications-page__mark-all,
    .kuehn-notifications-page__load-more {
        transition: none;
    }
}
