/* --- VARIABILI GLOBALI E RESET --- */
.ep-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ep-text-main, #2d3748);
}

.ep-wrapper * { box-sizing: border-box; }

/* --- TOP BAR: RICERCA SPOTLIGHT --- */
.ep-top-bar { margin-bottom: 40px; display: flex; justify-content: center; }

.ep-search-container {
    position: relative;
    width: 100%;
    max-width: 600px;
}

.ep-search-container input {
    width: 100%;
    padding: 16px 20px 16px 50px; /* Spazio per icona */
    font-size: 16px;
    border: 2px solid transparent;
    background: #f7fafc;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
    outline: none;
    color: #4a5568;
}

.ep-search-container input:focus {
    background: #fff;
    border-color: var(--ep-primary, #3182ce);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.15);
}

.ep-search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #a0aec0;
}

/* Suggerimenti */
.ep-suggestions-list {
    position: absolute;
    top: 110%; left: 15px; right: 15px;
    background: #fff;
    border-radius: 12px;
    padding: 10px 0;
    margin: 0;
    list-style: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 50;
    display: none;
    border: 1px solid #edf2f7;
}

.ep-suggestions-list li {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
    transition: background 0.2s;
}

.ep-suggestions-list li:hover {
    background: #ebf8ff;
    color: var(--ep-primary, #3182ce);
}

/* --- FILTRI --- */
.ep-filter-container { margin-bottom: 40px; }
.ep-filter-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center; /* Default center */
}

/* Stili specifici layout */
.ep-layout-left .ep-filter-inner, .ep-layout-right .ep-filter-inner { flex-direction: column; align-items: flex-start; }
.ep-layout-left .ep-filter-container, .ep-layout-right .ep-filter-container { width: 250px; flex-shrink: 0; }
.ep-layout-wrapper { display: flex; gap: 40px; }
.ep-layout-center { flex-direction: column; }
.ep-layout-right { flex-direction: row-reverse; }

.ep-filter-btn {
    padding: 10px 24px;
    border-radius: 50px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--ep-filter-bg, #edf2f7);
    color: var(--ep-filter-text, #4a5568);
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
}

.ep-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.ep-filter-btn.active {
    background-color: var(--ep-primary, #3182ce);
    color: var(--ep-primary-text, #fff);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

/* --- CARDS (SUPER CARD) --- */
.ep-poster-card {
    background: var(--ep-bg-card, #fff);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.03);
}

.ep-poster-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    border-color: rgba(49, 130, 206, 0.2);
}

/* Immagine e Overlay */
.ep-card-img-wrap {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #e2e8f0;
}

.ep-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.ep-poster-card:hover .ep-card-img-wrap img {
    transform: scale(1.08); /* Micro-Zoom */
}

.ep-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 60%, rgba(0,0,0,0.6) 100%);
    pointer-events: none;
    opacity: 0.6;
    transition: opacity 0.3s;
}

/* Badges */
.ep-badges-top { position: absolute; top: 12px; right: 12px; display: flex; z-index: 2; }
.ep-badge-id {
    background: rgba(255,255,255,0.95);
    color: #2d3748;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: 0.5px;
}

.ep-badges-bottom { position: absolute; bottom: 12px; left: 12px; z-index: 2; }
.ep-badge-topic {
    background: var(--ep-primary, #3182ce);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    text-transform: uppercase;
}

/* Contenuto Card */
.ep-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.ep-card-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 12px 0;
    color: var(--ep-text-main, #2d3748);
    display: block;
}

.ep-card-meta { margin-top: auto; }

.ep-author-row {
    display: flex;
    align-items: center;
    color: #718096;
    font-size: 14px;
    font-weight: 500;
}

.ep-author-icon { width: 16px; height: 16px; margin-right: 6px; color: #a0aec0; }

/* Call to Action */
.ep-card-action {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #edf2f7;
    color: var(--ep-primary, #3182ce);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.ep-card-action svg { width: 16px; height: 16px; transition: transform 0.3s; }
.ep-poster-card:hover .ep-card-action { opacity: 1; }
.ep-poster-card:hover .ep-card-action svg { transform: translateX(4px); }

/* --- NO RESULTS --- */
.ep-no-results {
    text-align: center;
    padding: 60px;
    color: #a0aec0;
    grid-column: 1 / -1;
}
.ep-no-results svg { width: 64px; height: 64px; margin-bottom: 20px; opacity: 0.5; }

/* --- MODAL (POPUP) --- */
.ep-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    inset: 0;
    overflow: hidden;
}

.ep-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ep-modal-container {
    position: absolute;
    inset: 40px;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: epFadeInScale 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.ep-iframe-wrap {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    overflow: hidden;
}

.ep-iframe-wrap iframe { width: 100%; height: 100%; border: none; }

.ep-close-btn {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 44px;
    height: 44px;
    background: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); /* Transizione fluida */
    color: #1a202c;
    z-index: 20;
}

/* EFFETTO MOUSEOVER AGGIORNATO (Zoom Out / Pressione) */
.ep-close-btn:hover {
    transform: scale(0.9); /* Effetto leggera pressione */
}

.ep-close-btn svg { width: 24px; height: 24px; }

@keyframes epFadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Mobile Modal Fix */
@media (max-width: 768px) {
    .ep-modal-container { inset: 0; }
    .ep-iframe-wrap { border-radius: 0; }
    .ep-close-btn { top: 15px; right: 15px; background: rgba(0,0,0,0.5); color: #fff; }
}

/* Tablet e Mobile Layout Fixes */
@media (max-width: 900px) {
    .ep-layout-wrapper { flex-direction: column !important; }
    .ep-filter-container { width: 100% !important; margin-bottom: 20px; }
    .ep-filter-inner { flex-direction: row !important; overflow-x: auto; padding-bottom: 10px; justify-content: flex-start; }
    .ep-filter-btn { flex-shrink: 0; }

    .ep-filter-inner::-webkit-scrollbar { height: 4px; }
    .ep-filter-inner::-webkit-scrollbar-thumb { background: #cbd5e0; border-radius: 4px; }
}
/* ============================================================
   RESET E FIX PER AREA VALUTAZIONE (SMARTNET CONSISTENCY)
   ============================================================ */

/* Forza la rimozione di pallini e padding strani dalle liste del plugin */
.ep-smartnet-theme ul.ep-fs-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

.ep-smartnet-theme ul.ep-fs-list li.ep-eval-row {
    list-style-type: none !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    padding: 15px 25px !important;
    border-bottom: 1px solid #2d314e !important;
    gap: 15px !important;
}

/* Fix per i testi nelle colonne per matchare Stato Avanzamento Poster */
.ep-eval-row .ep-col-id {
    flex: 0 0 60px !important;
    color: #00C6FF !important;
    font-weight: 700 !important;
}

.ep-eval-row .ep-col-author {
    flex: 1 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ep-eval-row .ep-col-title {
    flex: 2 !important;
    line-height: 1.4;
}

/* Stile Select e Button per un look moderno e scuro */
.ep-score-select-new {
    background: #171a2b !important;
    color: #fff !important;
    border: 1px solid #3d4361 !important;
    padding: 4px 8px !important;
    height: 32px !important;
    outline: none;
}

.ep-save-btn-new {
    height: 32px !important;
    line-height: 20px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive: su mobile impila gli elementi come nelle stats */
@media (max-width: 600px) {
    .ep-smartnet-theme li.ep-eval-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    .ep-eval-row .ep-col-score {
        width: 100% !important;
        justify-content: flex-start !important;
        margin-top: 10px;
    }
}
