/* ============================================
   NOTIFICATIONS PAGE STYLES
   ============================================ */

/* ---------- OVERLAY ---------- */
.notifications-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    background: var(--bg-primary);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    overflow: hidden;
    will-change: transform, opacity;
}

.notifications-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* Ambient background */


/* Content wrapper */
.notifications-overlay-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--bg-primary) 30%,
        var(--bg-primary) 100%
    );
}

/* ---------- TOP BAR ---------- */
.notifications-top-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: calc(var(--safe-top) + 8px) 16px 8px 16px;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.notifications-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    position: relative;
    z-index: 3;
    pointer-events: auto;
}

.notifications-back-btn:hover {
    background-color: var(--bg-hover);
}

.notifications-back-btn:active {
    background-color: var(--bg-active);
}

.notifications-back-btn .material-icons-round {
    font-size: 2rem;
    color: var(--text-primary);
    pointer-events: none;
}

.notifications-top-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

.notifications-mark-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    color: var(--text-secondary);
}

.notifications-mark-all-btn:hover {
    background-color: var(--bg-hover);
    color: var(--accent-color);
}

.notifications-mark-all-btn .material-icons-round {
    font-size: 1.875rem;
    pointer-events: none;
}

/* ---------- SCROLLABLE CONTENT ---------- */
.notifications-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px 32px 24px;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

/* ---------- NOTIFICATIONS LIST ---------- */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Notification item */
.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 4px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--divider-color);
    cursor: pointer;
    transition: all var(--transition-fast);
    width: 100%;
    font-family: 'Poppins', sans-serif;
    position: relative;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: var(--bg-surface-light);
}

.notification-item:active {
    background: var(--bg-hover);
}

/* Unread indicator */
.notification-item.unread::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -8px;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent-color);
}

.notification-item.unread {
    background: rgba(244, 67, 54, 0.03);
}

.notification-item.unread:hover {
    background: rgba(244, 67, 54, 0.08);
}

/* Notification icon */
.notification-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    flex-shrink: 0;
}

.notification-item-icon .material-icons-round {
    font-size: 1.875rem;
    color: #ffffff;
    pointer-events: none;
}

/* Notification content */
.notification-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notification-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-item-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    pointer-events: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-item-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    pointer-events: none;
    margin-top: 2px;
}

.notification-item-time .meta-divider {
    width: 3px;
    height: 3px;
    background: var(--text-tertiary);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Delete button */
.notification-item-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: all var(--transition-fast);
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 4px;
    opacity: 0;
}

.notification-item:hover .notification-item-delete {
    opacity: 1;
}

.notification-item-delete:hover {
    background: var(--bg-active);
    color: var(--accent-color);
}

.notification-item-delete .material-icons-round {
    font-size: 1.625rem;
    pointer-events: none;
}

/* ---------- LOADING STATE ---------- */
.notifications-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px;
    color: var(--text-secondary);
}

.notifications-loading .material-icons-round {
    font-size: 3.5rem;
    color: var(--accent-color);
    animation: pulse 1.5s ease infinite;
}

/* ---------- EMPTY STATE ---------- */
.notifications-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 48px;
    color: var(--text-secondary);
    text-align: center;
}

.notifications-empty .material-icons-round {
    font-size: 3.5rem;
    color: var(--text-disabled);
}

.notifications-empty p {
    color: var(--text-secondary);
}

/* ---------- DESKTOP LAYOUT ---------- */
@media (min-width: 711px) {
    .notifications-scroll {
        margin: 0 auto;
        width: 100%;
        padding: 0 48px 32px 48px;
    }
    
    .notification-item {
        padding: 16px 8px;
        border-radius: 8px;
    }
    
    .notification-item-icon {
        width: 48px;
        height: 48px;
        min-width: 48px;
    }
    
    .notification-item-title {
        font-size: 1.1rem;
    }
}

/* ---------- MOBILE RESPONSIVE ---------- */
@media (max-width: 710px) {
    .notifications-scroll {
        padding: 0 .5rem 24px .5rem;
    }
    
    .notification-item {
        padding: 12px 2px;
        gap: 10px;
    }
    
    .notification-item-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        border-radius: 8px;
    }
    
    .notification-item-icon .material-icons-round {
        font-size: 1.8rem;
    }
    
    .notification-item-title {
        font-size: 1.05rem;
    }
    
    .notification-item-message {
        font-size: 0.9rem;
    }
    
    .notification-item-delete {
        opacity: 1;
        width: 28px;
        height: 28px;
        min-width: 28px;
    }
}

/* ============================================
   NOTIFICATION DETAIL OVERLAY (NEW)
   ============================================ */

.notification-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.notification-detail-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.notification-detail-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.notification-detail-content {
    position: relative;
    width: 100%;
    max-width: 560px;
    height: 90%;
    max-height: 720px;
    background: var(--bg-primary);
    border-radius: 20px;
    box-shadow: 0 20px 40px var(--shadow-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification-detail-overlay.active .notification-detail-content {
    transform: scale(1) translateY(0);
}

/* Top bar */
.notification-detail-top-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--divider-color);
    flex-shrink: 0;
}

.notification-detail-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast);
}

.notification-detail-close:hover {
    background: var(--bg-hover);
}

.notification-detail-close .material-icons-round {
    font-size: 22px;
}

.notification-detail-top-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Scrollable body */
.notification-detail-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 28px 24px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.notification-detail-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.notification-detail-icon .material-icons-round {
    font-size: 32px;
}

.notification-detail-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.3;
    word-break: break-word;
}

.notification-detail-time {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-bottom: 24px;
}

.notification-detail-body {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
    text-align: left;
    width: 100%;
}

/* ============================================
   MOCK RESULT PAYLOAD (NEW)
   ============================================ */

.mock-result-section {
    width: 100%;
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

/* GPA card */
.mock-result-gpa-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(76, 175, 80, 0.05));
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 14px;
}

.mock-result-gpa-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4caf50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mock-result-gpa-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

/* Courses list */
.mock-result-courses {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mock-result-courses-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.mock-result-course-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--divider-color);
    border-radius: 10px;
}

.mock-result-course-code {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.mock-result-course-score {
    font-size: 1rem;
    font-weight: 700;
    color: #4caf50;
}

.mock-result-empty {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    text-align: center;
    padding: 16px;
}

/* Download button */
.mock-result-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: var(--accent-color);
    color: white;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color var(--transition-fast);
    margin-top: 4px;
}

.mock-result-download:hover {
    background: var(--accent-hover);
}

.mock-result-download .material-icons-round {
    font-size: 20px;
}

/* ============================================
   MOBILE RESPONSIVE (DETAIL OVERLAY)
   ============================================ */

@media (max-width: 768px) {
    .notification-detail-content {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
        transform: translateY(20px);
    }

    .notification-detail-overlay.active .notification-detail-content {
        transform: translateY(0);
    }

    .notification-detail-scroll {
        padding: 24px 20px 32px;
    }

    .notification-detail-icon {
        width: 56px;
        height: 56px;
    }

    .notification-detail-icon .material-icons-round {
        font-size: 28px;
    }

    .notification-detail-title {
        font-size: 1.2rem;
    }

    .mock-result-gpa-value {
        font-size: 1.75rem;
    }
}