/* News Brief Panel */

.news-brief-panel {
    padding: 1.5rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    color: #1f2937;
}

/* ── Form ─────────────────────────────────────────────────────────────── */

.nb-params-section {
    position: relative;
    padding: 0.75rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.nb-params-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .nb-params-row {
        grid-template-columns: minmax(180px, 1fr) 2fr;
    }
}

.nb-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
}

.nb-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

/* Toggle buttons (1d / 7d / 1m and International / Local) */
.nb-toggle-group {
    display: flex;
    gap: 0;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    overflow: hidden;
}

.nb-toggle-btn {
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
    border: none;
    background: white;
    color: #4b5563;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    border-right: 1px solid #d1d5db;
}

.nb-toggle-btn:last-child {
    border-right: none;
}

.nb-toggle-btn.active {
    background: #2563eb;
    color: white;
}

.nb-toggle-btn:hover:not(.active) {
    background: #f3f4f6;
}

/* ── Output area ──────────────────────────────────────────────────────── */

#nb-output-container {
    margin-top: 0.75rem;
}

.nb-output-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.nb-content {
    color: #1f2937;
    line-height: 1.7;
    font-size: 0.9rem;
}

.nb-content h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e3a5f;
    margin-top: 1.4rem;
    margin-bottom: 0.3rem;
    padding-bottom: 0.2rem;
    border-bottom: 2px solid #dbeafe;
}

.nb-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
}

.nb-content p {
    margin-bottom: 0.8rem;
}

.nb-content ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.nb-content li {
    margin-bottom: 0.25rem;
}

.nb-content strong {
    color: #111827;
}

.nb-content em {
    color: #6b7280;
    font-style: italic;
}

.nb-content a {
    color: #2563eb;
    text-decoration: underline;
    word-break: break-word;
}

.nb-content a:hover {
    color: #1d4ed8;
}

.nb-sources-section {
    margin-top: 1.5rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 0.8rem;
}

.nb-sources-title {
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
}

.nb-sources-section a {
    color: #2563eb;
    word-break: break-word;
}

/* Loading skeleton */
.nb-skeleton {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1rem 0;
}

.nb-skeleton-line {
    height: 0.9rem;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    border-radius: 0.25rem;
    animation: nb-shimmer 1.4s infinite;
}

@keyframes nb-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Error / empty states */
.nb-error {
    padding: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.375rem;
    color: #991b1b;
    font-size: 0.875rem;
}

/* Chapeau (italic lead sentence per section) */
.nb-chapeau {
    font-style: italic;
    color: #4b5563;
    margin-bottom: 0.6rem;
    font-size: 0.88rem;
}
