/**
 * Stili per l'elenco dei concorsi (shortcode) - VERSIONE MODERNA & OTTIMIZZATA
 * @package ePrize
 */

:root {
    --eprize-primary: #3498db;
    --eprize-primary-dark: #2980b9;
    --eprize-secondary: #95a5a6;
    --eprize-success: #2ecc71;
    --eprize-warning: #f39c12;
    --eprize-purple: #9b59b6;
    --eprize-text-main: #2c3e50;
    --eprize-text-light: #7f8c8d;
    --eprize-bg-light: #f8f9fa;
    --eprize-card-bg: #ffffff;
    --eprize-border: #e9ecef;
    --eprize-radius: 12px;
    --eprize-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --eprize-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.eprize-contests-list-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Banner */
.eprize-advertisement-container {
    background: #f1f3f5;
    padding: 15px;
    border-radius: var(--eprize-radius);
    text-align: center;
    margin-bottom: 2rem;
    border: 1px dashed #ced4da;
}
.eprize-advertisement-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #adb5bd;
    margin: 0 0 5px 0;
    letter-spacing: 1px;
}

/* Sezioni */
.eprize-section {
    margin-bottom: 4rem;
}

.eprize-section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--eprize-text-main);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Griglia Responsive */
.eprize-contests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Card Base */
.eprize-contest-card-new {
    background: var(--eprize-card-bg);
    border: 1px solid var(--eprize-border);
    border-radius: var(--eprize-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--eprize-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.eprize-contest-card-new:hover {
    transform: translateY(-5px);
    box-shadow: var(--eprize-shadow-hover);
}

/* Header Visivo */
.eprize-card-visual {
    height: 100px;
    position: relative;
    background-color: #eee;
    background-size: 100px; /* Dimensione del pattern */
    background-position: center;
    
    /* MODIFICA: Flexbox per centrare l'icona aggiunta */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* * ICONA CENTRALE HEADER
 * Stile per la nuova icona (Trofeo, Orologio, ecc.)
 */
.eprize-visual-icon {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: rgba(255, 255, 255, 0.35); /* Bianco semitrasparente */
    z-index: 1; /* Sopra il pattern */
}

/* * PATTERN DI SFONDO (SVG INLINE) 
 * Usiamo data:image/svg+xml per performance ottimali
 */

/* LIVE: Pattern "Pacchetti Regalo" su sfondo Verde */
.pattern-live {
    background-color: #2ecc71;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 20h-4v-4h4v4zm0 4h4v4h-4v-4zM20 0h4v4h-4V0zm0 24h-4v4h4v-4zM0 20h4v4H0v-4zm0-4h4v-4H0v4zm20-16h-4v4h4V0zM0 0h4v4H0V0zm24 20h4v4h-4v-4zm0-4h4v-4h-4v4zm16 4h-4v4h4v-4zm0-4h-4v-4h4v4zm-16-16h4v4h-4V0zm16 0h-4v4h4V0z' fill='%23ffffff' fill-opacity='0.15'/%3E"),
        linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

/* SCHEDULED: Pattern "Orologi/Attesa" (Cerchi concentrici) su Arancione */
.pattern-scheduled {
    background-color: #f39c12;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.15' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
}

/* AWAITING: Pattern "Stelle" su Viola */
.pattern-awaiting {
    background-color: #9b59b6;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 0l3 9h9l-7 5 3 9-8-6-8 6 3-9-7-5h9z' fill='%23ffffff' fill-opacity='0.1'/%3E%3C/svg%3E"),
        linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    background-size: 40px; /* Stelle un po' più grandi */
}

/* PAST: Pattern "Linee Oblique" su Grigio */
.pattern-past, .pattern-archived {
    background-color: #95a5a6;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,0.05) 10px, rgba(255,255,255,0.05) 20px),
        linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
}

/* Badge Stato */
.eprize-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 2; /* Assicura che stia sopra il pattern */
}
.eprize-card-badge.is-live { color: #27ae60; }
.eprize-card-badge.is-scheduled { color: #d35400; }
.eprize-card-badge.is-awaiting { color: #8e44ad; }
.eprize-card-badge.is-past, .eprize-card-badge.is-archived { color: #7f8c8d; }

/* Corpo Card */
.eprize-card-new-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Tipo Concorso Pillola */
.eprize-card-new-meta-top {
    margin-bottom: 0.75rem;
}
.eprize-type-pill {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    background-color: #f1f3f5;
    color: #495057;
}

/* Colori specifici per tipo */
.eprize-type-pill.type-draw { background-color: #e7f5ff; color: #1971c2; }
.eprize-type-pill.type-instant_win { background-color: #fff4e6; color: #d9480f; }
.eprize-type-pill.type-daily_win { background-color: #e6fcf5; color: #0ca678; }
.eprize-type-pill.type-quiz { background-color: #f3f0ff; color: #6741d9; }

/* * TITOLO 
 * Usiamo specificità maggiore per sovrascrivere il tema 
 */
.eprize-card-title {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    line-height: 1.4;
    font-weight: 700;
}
.eprize-card-title a,
.eprize-card-title a:link,
.eprize-card-title a:visited,
.eprize-card-title a:hover,
.eprize-card-title a:active,
.eprize-card-title a:focus {
    color: var(--eprize-text-main);
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    background-image: none !important;
    transition: color 0.2s;
}

.eprize-card-title a:hover, 
.eprize-card-title a:focus {
    color: var(--eprize-primary);
}

/* Info Row (Date, Montepremi) */
.eprize-card-new-info {
    margin-top: auto; /* Spinge in basso se c'è spazio */
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.eprize-info-row {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: var(--eprize-text-light);
}
.eprize-info-row .dashicons {
    font-size: 18px;
    width: 20px;
    height: 20px;
    margin-right: 6px;
    color: #adb5bd;
}
.eprize-info-row strong {
    color: var(--eprize-text-main);
    font-weight: 600;
    margin-left: 4px;
}
.eprize-info-row.is-prize .dashicons {
    color: #f1c40f; /* Oro per il premio */
}

/* Footer & Bottoni */
.eprize-card-new-footer {
    padding: 1.25rem 1.5rem;
    background-color: var(--eprize-bg-light);
    border-top: 1px solid var(--eprize-border);
}

/* * BOTTONI / CTA 
 * Regole rafforzate per rimuovere sottolineature del tema 
 */
a.eprize-button,
a.eprize-button:link,
a.eprize-button:visited {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none !important; /* Forza assoluta */
    border-bottom: none !important;   /* Rimuove bordi stile link */
    box-shadow: none !important;      /* Rimuove ombre stile link */
    background-image: none !important; /* Rimuove gradienti stile link */
    transition: all 0.2s;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid transparent; /* Mantiene struttura */
}

.eprize-button.full-width {
    width: 100%;
    box-sizing: border-box;
}

/* Stili Bottoni Colori */
a.eprize-button {
    background-color: var(--eprize-primary);
    color: white !important;
}

a.eprize-button:hover,
a.eprize-button:focus,
a.eprize-button:active {
    background-color: var(--eprize-primary-dark);
    color: white !important;
    text-decoration: none !important;
    border-bottom: none !important;
    transform: translateY(-1px);
    box-shadow: none !important;
}

/* Bottone Secondario */
a.eprize-button.is-secondary,
a.eprize-button.is-secondary:link,
a.eprize-button.is-secondary:visited {
    background-color: white;
    border: 1px solid var(--eprize-border);
    color: var(--eprize-text-main) !important;
}

a.eprize-button.is-secondary:hover,
a.eprize-button.is-secondary:focus {
    background-color: #e9ecef;
    color: var(--eprize-text-main) !important;
    text-decoration: none !important;
}

/* Bottone Outline */
a.eprize-button.is-outline {
    background-color: transparent;
    border: 1px solid var(--eprize-purple);
    color: var(--eprize-purple) !important;
}
a.eprize-button.is-outline:hover {
    background-color: var(--eprize-purple);
    color: white !important;
}

/* Bottone Ghost */
a.eprize-button.is-ghost {
    background-color: transparent;
    color: var(--eprize-text-light) !important;
}
a.eprize-button.is-ghost:hover {
    background-color: rgba(0,0,0,0.05);
    color: var(--eprize-text-main) !important;
}

/* Animazione Pulse per CTA principali */
@keyframes eprize-pulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(52, 152, 219, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0); }
}
.eprize-button.animate-pulse {
    animation: eprize-pulse 2s infinite;
}
.eprize-button.animate-pulse:hover {
    animation: none;
}

/* Messaggio "Nessun Concorso" */
.eprize-no-contests {
    text-align: center;
    padding: 4rem 1rem;
    background: #f8f9fa;
    border-radius: var(--eprize-radius);
    color: var(--eprize-text-light);
}
.eprize-no-contests .dashicons {
    font-size: 3rem;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .eprize-contests-grid {
        grid-template-columns: 1fr;
    }
    .eprize-section-title {
        font-size: 1.5rem;
    }
}