/* ============================================================================
   news-summary.css
   ----------------------------------------------------------------------------
   Scoped styles for the AI daily news summary block on /wiadomosci.

   EVERY SELECTOR IN THIS FILE IS PREFIXED WITH `.news-summary` — they
   physically cannot match any element outside the summary section.
   No global selectors. No tag selectors at the top level. No body/html rules.

   Authored 2026-05-07 at the user's explicit request to style this section
   without affecting any other CSS on the site.
   ========================================================================= */

.news-summary {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin: 1.25rem 0 2rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.04);
    color: #111827;
    line-height: 1.4;
}

.news-summary-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin: 0 0 1rem;
    padding: 0 0 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.news-summary-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.news-summary-updated {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 400;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.news-summary-section {
    margin: 0;
    padding: 0;
}

.news-summary-section + .news-summary-section {
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px dashed #e5e7eb;
}

.news-summary-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #475569;
    margin: 0 0 0.55rem;
    padding: 0;
    line-height: 1.2;
}

/* Subtle accent per section type */
.news-summary-section[data-section-type="local"]   .news-summary-section-title { color: #b45309; }
.news-summary-section[data-section-type="country"] .news-summary-section-title { color: #1d4ed8; }
.news-summary-section[data-section-type="poland"]  .news-summary-section-title { color: #b91c1c; }
.news-summary-section[data-section-type="world"]   .news-summary-section-title { color: #047857; }

.news-summary-section-summary {
    font-size: 1rem;
    line-height: 1.6;
    color: #1f2937;
    margin: 0 0 0.85rem;
    font-weight: 400;
}

.news-summary-stories-label {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0.25rem 0 0.4rem;
    font-weight: 600;
}

.news-summary-stories {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #f1f5f9;
}

.news-summary-story {
    margin: 0;
    padding: 0;
}

.news-summary-story + .news-summary-story {
    border-top: 1px solid #f8fafc;
}

.news-summary-story-link {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.5rem 0.25rem;
    color: #1f2937;
    text-decoration: none;
    border-radius: 4px;
    transition: color 120ms ease, background-color 120ms ease;
}

.news-summary-story-link:hover,
.news-summary-story-link:focus {
    color: #1d4ed8;
    background: #f8fafc;
    outline: none;
}

.news-summary-story-headline {
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.35;
    color: #475569;
    flex: 1 1 auto;
    min-width: 0;
}

.news-summary-story-source-name {
    font-size: 0.68rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Mobile */
@media (max-width: 640px) {
    .news-summary { padding: 1rem; margin: 1rem 0 1.5rem; }
    .news-summary-header h2 { font-size: 1.05rem; }
    .news-summary-story-link {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.15rem;
        padding: 0.55rem 0.25rem;
    }
    .news-summary-story-source-name { font-size: 0.65rem; }
    .news-summary-section-summary { font-size: 0.85rem; padding-left: 0.6rem; }
}

/* Optional dark-mode support — only triggers when the site itself opts in */
@media (prefers-color-scheme: dark) {
    .news-summary[data-prefers-dark="auto"] {
        background: #0f172a;
        border-color: #1e293b;
        color: #e2e8f0;
        box-shadow: none;
    }
}
