/* Popup de Manchetes - Design Premium Histórico */
.manchete-popup {
    position: fixed;
    background: linear-gradient(135deg, #fdfbf7 0%, #f8f6f0 100%);
    border: 2px solid #d4a574;
    border-radius: 8px;
    padding: 0;
    width: 320px;
    max-height: 420px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(106, 79, 0, 0.2), 
                0 2px 8px rgba(106, 79, 0, 0.1);
    z-index: 9999;
    display: none;
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
    transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
}

.manchete-popup.active {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Header premium */
.manchete-popup-header {
    padding: 12px 14px;
    background: linear-gradient(135deg, #6a4f00 0%, #8b6500 100%);
    border-bottom: 1px solid #d4a574;
    display: flex;
    align-items: center;
    gap: 8px;
}

.manchete-popup-header i {
    color: #f4d03f;
    font-size: 14px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

.manchete-popup-title {
    font-size: 12px;
    font-weight: 700;
    color: #fdfbf7;
    margin: 0;
    letter-spacing: 0.3px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Loading premium */
.manchete-popup-loading {
    padding: 32px 20px;
    text-align: center;
    color: #8b6500;
}

.manchete-popup-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(212, 165, 116, 0.2);
    border-top-color: #d4a574;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.manchete-popup-loading div:last-child {
    font-size: 11px;
    color: #a07600;
}

/* Erro premium */
.manchete-popup-error {
    padding: 28px 18px;
    text-align: center;
    color: #c44;
    font-size: 11px;
}

.manchete-popup-error i {
    font-size: 22px;
    margin-bottom: 8px;
    display: block;
    opacity: 0.8;
}

/* Empty state premium */
.manchete-popup-empty {
    padding: 32px 20px;
    text-align: center;
    color: #8b6500;
    font-size: 11px;
    line-height: 1.5;
}

.manchete-popup-empty i {
    font-size: 26px;
    margin-bottom: 10px;
    display: block;
    opacity: 0.4;
    color: #d4a574;
}

/* Lista de manchetes - design premium compacto */
.manchete-popup-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 330px;
    overflow-y: auto;
}

.manchete-popup-item {
    padding: 10px 14px;
    border-bottom: 1px solid #f0ead8;
    transition: all 0.2s ease;
    cursor: default;
    background: transparent;
}

.manchete-popup-item:hover {
    background: linear-gradient(90deg, rgba(212, 165, 116, 0.08) 0%, transparent 100%);
    border-left: 2px solid #d4a574;
    padding-left: 12px;
}

.manchete-popup-item:last-child {
    border-bottom: none;
}

/* Badge premium compacto */
.manchete-popup-badge {
    display: inline-block;
    padding: 2px 8px;
    background: linear-gradient(135deg, #8b6500 0%, #6a4f00 100%);
    color: #f4d03f;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 1px 3px rgba(106, 79, 0, 0.2);
}

/* Texto da manchete compacto */
.manchete-popup-item > div:last-child {
    font-size: 11px;
    line-height: 1.5;
    color: #4a3800;
    font-weight: 400;
}

/* Contador premium */
.manchete-popup-count {
    padding: 8px 14px;
    background: linear-gradient(135deg, #f8f6f0 0%, #fdfbf7 100%);
    border-top: 1px solid #e8dfc8;
    font-size: 10px;
    color: #8b6500;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Scrollbar premium */
.manchete-popup-list::-webkit-scrollbar {
    width: 5px;
}

.manchete-popup-list::-webkit-scrollbar-track {
    background: #f8f6f0;
}

.manchete-popup-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #d4a574 0%, #b8935f 100%);
    border-radius: 10px;
}

.manchete-popup-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #e0b688 0%, #d4a574 100%);
}

/* Hover effect premium nas thumbnails */
.img-thumbnail {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid #e8dfc8;
}

.img-thumbnail:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(106, 79, 0, 0.25),
                0 4px 12px rgba(212, 165, 116, 0.2);
    border-color: #d4a574;
}

/* Responsivo */
@media (max-width: 768px) {
    .manchete-popup {
        width: calc(100vw - 40px);
        max-width: 320px;
        max-height: 60vh;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) translateY(-6px) scale(0.97);
    }
    
    .manchete-popup.active {
        transform: translate(-50%, -50%) translateY(0) scale(1);
    }
}

/* Animação stagger premium */
@media (prefers-reduced-motion: no-preference) {
    .manchete-popup-item {
        animation: fadeInPremium 0.35s ease backwards;
    }
    
    .manchete-popup-item:nth-child(1) { animation-delay: 0.05s; }
    .manchete-popup-item:nth-child(2) { animation-delay: 0.08s; }
    .manchete-popup-item:nth-child(3) { animation-delay: 0.11s; }
    .manchete-popup-item:nth-child(4) { animation-delay: 0.14s; }
    .manchete-popup-item:nth-child(5) { animation-delay: 0.17s; }
    .manchete-popup-item:nth-child(n+6) { animation-delay: 0.2s; }
}

@keyframes fadeInPremium {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
