/* ============================================================
   Prenotazione Evento Disabili – Frontend Styles
   ============================================================ */

/* ---------- Reset / base ---------- */
.wpcf7 .ped-field-section {
    margin-bottom: 28px;
}
.wpcf7 .ped-field-section h3 {
    font-size: 1.1em;
    font-weight: 700;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #0073aa;
    color: #0073aa;
}

/* ---------- Testi e label neri ---------- */
.wpcf7 label,
.wpcf7 p,
.wpcf7 span:not(.wpcf7-list-item-label),
.wpcf7 .wpcf7-list-item-label,
.wpcf7 h3 {
    color: #111111;
}

/* ---------- Campi con angoli arrotondati ---------- */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="number"],
.wpcf7 input[type="url"],
.wpcf7 textarea,
.wpcf7 select {
    border-radius: 10px;
    border: 1.5px solid #cccccc;
    padding: 10px 14px;
    font-size: 1em;
    width: 100%;
    box-sizing: border-box;
    color: #111111;
    background-color: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="number"]:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

/* Freccia custom per i select */
.wpcf7 select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

/* ---------- Disponibilità badge (accanto al select) ---------- */
#ped-disp-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 600;
    line-height: 1.4;
    width: 100%;
    box-sizing: border-box;
}
.ped-badge-ok {
    background-color: #e8f5e9;
    border: 1px solid #66bb6a;
    color: #2e7d32;
}
.ped-badge-quasi {
    background-color: #fff8e1;
    border: 1px solid #ffa726;
    color: #e65100;
}
.ped-badge-esaurito {
    background-color: #ffebee;
    border: 1px solid #ef5350;
    color: #c62828;
}
.ped-badge-icon {
    margin-right: 4px;
}

/* ---------- Avviso percentuale ---------- */
#ped-perc-avviso {
    margin-top: 6px;
    padding: 10px 14px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 5px;
    color: #856404;
    font-size: 0.9em;
    font-weight: 600;
}

/* ---------- Campo targa (nascosto di default) ---------- */
.ped-targa-wrap {
    transition: all 0.2s ease;
}

/* ---------- Submit button ---------- */
.wpcf7 input[type="submit"],
.wpcf7 button[type="submit"] {
    background-color: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 28px;
    font-size: 1em;
    font-weight: 700;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}
.wpcf7 input[type="submit"]:hover,
.wpcf7 button[type="submit"]:hover {
    background-color: #005a87;
}
.wpcf7 input[type="submit"].ped-submit-disabled,
.wpcf7 button[type="submit"].ped-submit-disabled {
    background-color: #999;
    cursor: not-allowed;
}
.wpcf7 input[type="submit"].ped-loading,
.wpcf7 button[type="submit"].ped-loading {
    background-color: #005a87;
    opacity: 0.7;
    cursor: wait;
}

/* ============================================================
   SHORTCODE [ped_disponibilita]
   ============================================================ */

.ped-disponibilita-box {
    margin: 24px 0;
}
.ped-disp-titolo {
    font-size: 1.3em;
    font-weight: 700;
    margin-bottom: 16px;
    color: #0073aa;
}

/* Griglia card */
.ped-disp-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.ped-disp-card {
    flex: 1 1 200px;
    min-width: 160px;
    padding: 18px 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 6px rgba(0,0,0,.07);
    text-align: center;
    position: relative;
    transition: transform 0.15s;
}
.ped-disp-card:hover {
    transform: translateY(-2px);
}

/* Stati */
.ped-disp-card.disponibile {
    background: #f1f8f1;
    border-color: #66bb6a;
}
.ped-disp-card.quasi-esaurito {
    background: #fffde7;
    border-color: #ffa726;
}
.ped-disp-card.esaurito {
    background: #fce4e4;
    border-color: #ef5350;
    opacity: 0.9;
}

.ped-disp-data {
    font-size: 0.95em;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}
.ped-disp-numero {
    font-size: 2.6em;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 2px;
}
.disponibile  .ped-disp-numero { color: #2e7d32; }
.quasi-esaurito .ped-disp-numero { color: #e65100; }
.esaurito .ped-disp-numero { color: #c62828; }

.ped-disp-label {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 10px;
}

/* Barra progresso */
.ped-disp-bar-wrap {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin: 8px 0;
}
.ped-disp-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s;
}
.disponibile   .ped-disp-bar { background: #66bb6a; }
.quasi-esaurito .ped-disp-bar { background: #ffa726; }
.esaurito      .ped-disp-bar { background: #ef5350; }

.ped-disp-totale {
    font-size: 0.78em;
    color: #888;
    margin-bottom: 8px;
}

.ped-disp-stato {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.disponibile .ped-disp-stato {
    background: #c8e6c9;
    color: #1b5e20;
}
.quasi-esaurito .ped-disp-stato {
    background: #ffe0b2;
    color: #bf360c;
}
.esaurito .ped-disp-stato {
    background: #ffcdd2;
    color: #b71c1c;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    .ped-disp-grid {
        flex-direction: column;
    }
    .ped-disp-card {
        flex: 1 1 auto;
    }
}
