/* daily_summaries.css — Daily summaries archive specific styles */
.summaries-page-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: 70vh;
}

.summaries-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.summaries-header-left h2 {
    font-size: 2.2rem;
    color: var(--text-primary);
    font-weight: 700;
    margin: 0;
    text-shadow: 0 0 15px rgba(0, 210, 255, 0.1);
}

.summaries-header-left p {
    color: var(--text-secondary);
    margin: 5px 0 0 0;
    font-size: 1rem;
}

.btn-back-news {
    background-color: rgba(21, 26, 36, 0.8);
    border: 1px solid var(--surface-border);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back-news:hover {
    border-color: var(--accent-color);
    color: var(--text-primary);
    background: rgba(0, 210, 255, 0.05);
    transform: translateX(-3px);
}

.summaries-layout {
    display: flex;
    gap: 30px;
    background: rgba(10, 14, 23, 0.4);
    backdrop-filter: blur(15px);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    overflow: hidden;
    min-height: 600px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.summaries-sidebar {
    width: 300px;
    border-right: 1px solid var(--surface-border);
    background: rgba(10, 14, 23, 0.6);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
}

.summaries-sidebar h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin: 0 0 20px 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.summaries-dates-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex-grow: 1;
    max-height: 500px;
    padding-right: 5px;
}

.summary-date-item {
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.summary-date-item:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.3);
    color: var(--text-primary);
}

.summary-date-item.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(0, 210, 255, 0.1) 100%);
    border-color: rgba(139, 92, 246, 0.5);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.summaries-content-area {
    flex-grow: 1;
    padding: 40px;
    position: relative;
    overflow-y: auto;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
    color: var(--text-primary);
    font-weight: 700;
    margin-top: 25px;
    margin-bottom: 12px;
}

.markdown-body h1 {
    font-size: 1.8rem;
    border-bottom: 1px solid var(--surface-border);
    padding-bottom: 12px;
    margin-top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.markdown-body h2 {
    font-size: 1.35rem;
    color: #00d2ff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.markdown-body h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: #8b5cf6;
    border-radius: 2px;
}

.markdown-body ul {
    padding-left: 22px;
    margin-bottom: 20px;
}

.markdown-body li {
    margin-bottom: 10px;
    color: var(--text-primary);
    line-height: 1.7;
}

.markdown-body p {
    margin-bottom: 20px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.markdown-body strong {
    color: #fff;
    font-weight: 600;
}

.btn-regen-summary {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #fff;
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    margin-bottom: 20px;
}

.btn-regen-summary:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
}

.btn-regen-summary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Custom scrollbar */
.summaries-dates-list::-webkit-scrollbar,
.summaries-content-area::-webkit-scrollbar {
    width: 6px;
}

.summaries-dates-list::-webkit-scrollbar-track,
.summaries-content-area::-webkit-scrollbar-track {
    background: transparent;
}

.summaries-dates-list::-webkit-scrollbar-thumb,
.summaries-content-area::-webkit-scrollbar-thumb {
    background: rgba(0, 210, 255, 0.15);
    border-radius: 3px;
}

.summaries-dates-list::-webkit-scrollbar-thumb:hover,
.summaries-content-area::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 210, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 900px) {
    .summaries-layout {
        flex-direction: column;
        min-height: auto;
    }

    .summaries-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--surface-border);
        padding: 20px;
    }

    .summaries-dates-list {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        height: 55px;
        padding-bottom: 5px;
    }

    .summary-date-item {
        white-space: nowrap;
    }

    .summaries-content-area {
        padding: 25px;
    }
}

/* Share Button styling */
.btn-share-summary {
    background: transparent;
    border: 1px solid #00d2ff;
    color: #00d2ff;
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-weight: 600;
    margin-bottom: 20px;
}

.btn-share-summary:hover {
    background: #00d2ff;
    color: #0a0e17;
    border-color: #00d2ff;
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.4);
}

/* Soft gray metadata inside summaries */
.summary-source-meta {
    color: #7b8a9c !important;
    font-size: 0.9em;
    font-style: italic;
    font-weight: 550;
    text-shadow: none !important;
}

/* Extra Mobile Readability Improvements */
@media (max-width: 600px) {
    .summaries-page-container {
        margin: 20px auto;
        padding: 0 10px;
    }

    .summaries-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .summaries-header-left h2 {
        font-size: 1.6rem;
    }

    .btn-back-news {
        width: 100%;
        justify-content: center;
    }

    .summaries-sidebar {
        padding: 15px 10px;
    }

    .summaries-content-area {
        padding: 20px 12px;
    }

    .markdown-body h1 {
        font-size: 1.45rem !important;
        line-height: 1.4;
    }

    .markdown-body h2 {
        font-size: 1.15rem !important;
        line-height: 1.4;
    }

    .markdown-body p,
    .markdown-body li {
        font-size: 0.92em;
        line-height: 1.7;
        color: rgba(255, 255, 255, 0.85);
    }

    .summary-actions-bar {
        display: flex;
        flex-direction: column;
        align-items: stretch !important;
        width: 100%;
        gap: 10px;
        margin-bottom: 15px;
    }

    .btn-regen-summary,
    .btn-share-summary {
        width: 100%;
        justify-content: center;
        margin-bottom: 0 !important;
        padding: 10px !important;
    }
}

/* === Light Mode for Daily Summaries === */
.summaries-content-area.light-mode {
    background-color: #f8fafc !important;
    color: #1e293b !important;
    border-left: 1px solid #cbd5e1;
}

.summaries-content-area.light-mode .markdown-body h1,
.summaries-content-area.light-mode .markdown-body h2,
.summaries-content-area.light-mode .markdown-body h3,
.summaries-content-area.light-mode .markdown-body strong {
    color: #0f172a !important;
}

.summaries-content-area.light-mode .markdown-body p,
.summaries-content-area.light-mode .markdown-body li {
    color: #334155 !important;
}

.summaries-content-area.light-mode .summary-actions-bar {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.summaries-content-area.light-mode #ai-model-badge {
    background: rgba(0, 210, 255, 0.05) !important;
    border-color: rgba(0, 210, 255, 0.3) !important;
    color: #0077aa !important;
}

.summaries-content-area.light-mode .news-count-badge {
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #475569 !important;
}

.summaries-content-area.light-mode .markdown-body h1 {
    border-bottom: 1px solid #e2e8f0 !important;
}

.summaries-content-area.light-mode .summary-source-meta {
    color: #64748b !important;
}
