/* Notifications Page - Exact Service Consistency */

/* Reuse analytics container and header patterns */
#content-notifications .analytics-container {
    animation: fadeInPage 0.5s cubic-bezier(0.2, 0, 0.2, 1);
}

#content-notifications .btn-back {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-dim);
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
}

#content-notifications .btn-back:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(-4px);
}

/* Notification List Container */
.notif-list-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 40px;
}

/* Notification Item - Styled like Journal Entry Wrapper */
.notif-item-wrapper {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.notif-item-wrapper:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.notif-item-wrapper.unread {
    background: rgba(255, 205, 48, 0.03);
    border-color: rgba(255, 205, 48, 0.2);
}

.notif-entry {
    padding: 24px 32px;
    display: grid;
    grid-template-columns: 60px 1fr 120px 40px;
    align-items: center;
    gap: 20px;
}

.notif-icon-box {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: all 0.3s ease;
}

.notif-item-wrapper:hover .notif-icon-box {
    background: rgba(255, 205, 48, 0.15);
    transform: scale(1.05);
}

.notif-main-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.notif-title {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.3px;
}

.notif-desc {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.5;
    padding-right: 40px;
}

.notif-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.notif-timestamp {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.notif-type-tag {
    font-size: 9px;
    font-weight: 900;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Category Specifics */
.notif-item-wrapper.unread .notif-type-tag {
    background: var(--accent);
    color: #000;
}

.arrow-link {
    display: flex;
    justify-content: flex-end;
    color: var(--text-dim);
    opacity: 0.3;
    transition: all 0.3s ease;
}

.notif-item-wrapper:hover .arrow-link {
    opacity: 1;
    color: var(--accent);
    transform: translateX(4px);
}

/* Search Bar Consitency */
#content-notifications .search-input-wrapper {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    width: 300px;
}

#content-notifications .search-input-wrapper:focus-within {
    border-color: rgba(255, 205, 48, 0.4);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 20px rgba(255, 205, 48, 0.05);
}

#content-notifications .search-input-wrapper input {
    background: none;
    border: none;
    padding: 12px 0;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    outline: none;
    width: 100%;
}

/* Custom Calendar Styles - Matches Analytics */
.calendar-popover {
    position: absolute;
    top: 45px;
    right: 0;
    background: #1a1a2e;
    border: 1px solid var(--accent);
    border-radius: 20px;
    padding: 20px;
    z-index: 2000;
    box-shadow: 0 30px 70px rgba(0,0,0,0.9);
    width: 260px;
    backdrop-filter: blur(25px);
    animation: calendarFade 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes calendarFade {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
    .calendar-popover {
        position: fixed !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: calc(100vw - 32px) !important;
        max-width: 300px !important;
        z-index: 99999 !important;
        box-shadow: 0 40px 100px rgba(0,0,0,0.95), 0 0 0 200vmax rgba(10, 10, 20, 0.6) !important;
        animation: calendarFadeFixed 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
}

@keyframes calendarFadeFixed {
    from { opacity: 0; transform: translate(-50%, calc(-50% - 20px)); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

.calendar-header {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--accent);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.calendar-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 4px !important;
    width: 100% !important;
    margin-top: 10px !important;
}

.cal-day-label { 
    font-size: 10px; 
    color: rgba(255,255,255,0.3); 
    text-align: center; 
    font-weight: 900;
    margin-bottom: 10px;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.cal-day:hover { background: rgba(255,205,48,0.2); color: var(--accent); }
.cal-day.today { background: rgba(255,205,48,0.1); color: var(--accent); font-weight: 900; border: 1px solid rgba(255,205,48,0.3); }
.cal-day.selected-start { background: var(--accent); color: #000; font-weight: 900; }

#content-notifications .date-input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font-size: 14px;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    line-height: 0;
    z-index: 2;
}

#content-notifications .date-input-small {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    padding: 8px 12px 8px 44px;
    border-radius: 10px;
    outline: none;
    width: 140px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 700;
    position: relative;
}

#content-notifications .date-input-small:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

/* ─── Responsive: 1024px (Tablets / Small PC) ─── */
@media (max-width: 1024px) {
    .analytics-container {
        padding: 24px;
        gap: 24px;
    }
}

/* ─── Responsive: 768px (Mobile & Tablets) ─── */
@media (max-width: 768px) {
    .analytics-container {
        padding: 16px;
        gap: 20px;
    }

    .analytics-header-row {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        margin-bottom: 0;
    }

    #content-notifications .btn-back {
        width: 100%;
        text-align: center;
        padding: 14px;
        order: 2;
    }

    .analytics-title-group {
        order: 1;
    }

    .analytics-nav-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 16px;
        background: rgba(255, 255, 255, 0.03);
    }

    #content-notifications .search-input-wrapper {
        width: 100%;
    }

    .analytics-filters {
        flex-direction: row; /* Keep chips in a row */
        gap: 8px;
        padding-right: 0;
        align-items: stretch;
    }

    .filter-chip {
        flex: 1;
        text-align: center;
        padding: 10px 4px;
        font-size: 11px;
    }

    .date-input-centered-wrapper {
        flex: 0 0 44px;
        min-width: 44px;
        max-width: 44px;
        height: 44px; /* Ensure square */
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #content-notifications .date-input-small {
        width: 100% !important;
        height: 100% !important;
        padding: 0 !important;
        color: transparent !important;
        cursor: pointer;
        z-index: 5;
    }

    #content-notifications .date-input-small::placeholder {
        color: transparent !important;
    }

    #content-notifications .date-input-centered-wrapper i {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
        padding: 0;
        width: 14px;
        height: 14px;
        z-index: 2;
    }

    /* Notification Item Responsive */
    .notif-entry {
        grid-template-columns: 50px 1fr;
        grid-template-areas: 
            "icon info"
            "icon meta";
        padding: 20px 24px;
        gap: 12px 16px;
    }

    .notif-icon-box {
        grid-area: icon;
        width: 44px;
        height: 44px;
        align-self: flex-start;
    }

    .notif-main-info {
        grid-area: info;
    }

    .notif-title {
        font-size: 14px;
    }

    .notif-desc {
        font-size: 12px;
        padding-right: 0;
    }

    .notif-meta {
        grid-area: meta;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
    }

    .arrow-link {
        display: none;
    }
}

/* ─── Responsive: 480px (Standard Mobile) ─── */
@media (max-width: 480px) {
    .analytics-title {
        font-size: 20px;
    }
    
    .analytics-section-icon {
        width: 28px;
        height: 28px;
    }

    .notif-entry {
        padding: 16px 18px;
    }
    
    .notif-icon-box {
        width: 38px;
        height: 38px;
    }
}
