/**
 * Estilos para o Resumo da Notícia Expansível - N10 News Portal
 * Design moderno e otimizado para IA com funcionalidade de expansão
 */

.n10-news-summary {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0 32px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.n10-news-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    border-radius: 12px 12px 0 0;
}

.n10-news-summary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Header do resumo */
.n10-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 0;
}

.n10-summary-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
    flex: 1;
}

.n10-summary-title::before {
    content: '📋';
    font-size: 1.1em;
    filter: grayscale(0.2);
}

/* Botão de toggle */
.n10-summary-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-height: 40px;
}

.n10-summary-toggle:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.n10-summary-toggle:active {
    transform: translateY(0);
}

.n10-toggle-text {
    font-size: 0.9rem;
}

.n10-toggle-icon {
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.n10-summary-toggle[aria-expanded="true"] .n10-toggle-icon {
    transform: rotate(180deg);
}

.n10-summary-toggle[aria-expanded="true"] .n10-toggle-text::after {
    content: ' menos';
}

/* Conteúdo expansível */
.n10-summary-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease, margin 0.3s ease;
    padding: 0;
    margin: 0;
}

.n10-summary-content.expanded {
    max-height: 1000px;
    padding-top: 20px;
    margin-top: 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.3);
}

.n10-summary-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    counter-reset: summary-counter;
}

.n10-summary-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border-left: 3px solid #3b82f6;
    transition: all 0.2s ease;
    position: relative;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.4s ease-out forwards;
}

.n10-summary-item:nth-child(1) { animation-delay: 0.1s; }
.n10-summary-item:nth-child(2) { animation-delay: 0.2s; }
.n10-summary-item:nth-child(3) { animation-delay: 0.3s; }
.n10-summary-item:nth-child(4) { animation-delay: 0.4s; }
.n10-summary-item:nth-child(5) { animation-delay: 0.5s; }
.n10-summary-item:nth-child(n+6) { animation-delay: 0.6s; }

.n10-summary-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-left-color: #8b5cf6;
    transform: translateX(4px) translateY(0);
}

.n10-summary-item::before {
    content: counter(summary-counter);
    counter-increment: summary-counter;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 2px;
}

.n10-summary-item span {
    color: #374151;
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 500;
    flex: 1;
}

/* Estado colapsado - preview */
.n10-news-summary:not(.expanded) {
    cursor: pointer;
}

.n10-news-summary:not(.expanded):hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

/* Responsividade */
@media (max-width: 768px) {
    .n10-news-summary {
        margin: 16px 0 24px 0;
        padding: 16px;
        border-radius: 8px;
    }
    
    .n10-summary-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .n10-summary-title {
        font-size: 1.1rem;
        text-align: center;
    }
    
    .n10-summary-toggle {
        justify-content: center;
        padding: 12px 16px;
        font-size: 0.95rem;
    }
    
    .n10-summary-content.expanded {
        padding-top: 16px;
        margin-top: 12px;
    }
    
    .n10-summary-item {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .n10-summary-item::before {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
    
    .n10-summary-item span {
        font-size: 0.9rem;
    }
}

/* Modo escuro */
@media (prefers-color-scheme: dark) {
    .n10-news-summary {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        border-color: #475569;
        color: #e2e8f0;
    }
    
    .n10-summary-title {
        color: #f1f5f9;
    }
    
    .n10-summary-toggle {
        background: linear-gradient(135deg, #1e40af, #7c2d12);
    }
    
    .n10-summary-toggle:hover {
        background: linear-gradient(135deg, #1d4ed8, #92400e);
    }
    
    .n10-summary-content.expanded {
        border-top-color: rgba(148, 163, 184, 0.2);
    }
    
    .n10-summary-item {
        background: rgba(30, 41, 59, 0.8);
        border-left-color: #60a5fa;
    }
    
    .n10-summary-item:hover {
        background: rgba(30, 41, 59, 0.95);
        border-left-color: #a78bfa;
    }
    
    .n10-summary-item span {
        color: #cbd5e1;
    }
    
    .n10-news-summary:not(.expanded):hover {
        background: linear-gradient(135deg, #334155 0%, #475569 100%);
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.n10-news-summary {
    animation: fadeInUp 0.6s ease-out;
}

/* Otimizações para IA e acessibilidade */
.n10-news-summary {
    role: region;
    aria-label: "Resumo da notícia";
}

.n10-summary-title {
    role: heading;
    aria-level: 3;
}

.n10-summary-list {
    role: list;
}

.n10-summary-item {
    role: listitem;
}

.n10-summary-item::before {
    aria-hidden: true;
}

/* Print styles */
@media print {
    .n10-news-summary {
        background: white !important;
        border: 2px solid #000 !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
    
    .n10-summary-toggle {
        display: none !important;
    }
    
    .n10-summary-content {
        max-height: none !important;
        padding-top: 16px !important;
        margin-top: 12px !important;
        border-top: 1px solid #000 !important;
    }
    
    .n10-summary-item {
        background: white !important;
        border-left: 2px solid #000 !important;
    }
    
    .n10-summary-item::before {
        background: #000 !important;
        color: white !important;
    }
}

/* Estados de foco para acessibilidade */
.n10-summary-toggle:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Micro-interações */
.n10-summary-item:active {
    transform: translateX(2px) scale(0.98);
}

/* Indicador de carregamento */
.n10-news-summary.loading {
    opacity: 0.7;
    pointer-events: none;
}

.n10-news-summary.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #3b82f6;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

