/* ─── Tango Festival — Public form styles ──────────────────────── */

.tf-form, .tf-program, .tf-pricing {
    max-width: 880px;
    margin: 0 auto;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #1e293b;
    line-height: 1.5;
    box-sizing: border-box;
}
.tf-form *, .tf-form *::before, .tf-form *::after { box-sizing: border-box; }

.tf-public-error,
.tf-public-info {
    padding: 16px;
    border-radius: 8px;
    background: #fee2e2;
    color: #991b1b;
    text-align: center;
    margin: 16px 0;
}
.tf-public-info { background:#eff6ff; color:#1e3a8a; }

/* ── Lang switcher ── */
.tf-lang-switcher {
    text-align: right;
    margin-bottom: 8px;
}
.tf-lang-switcher a {
    display: inline-block;
    padding: 4px 10px;
    margin-left: 4px;
    border-radius: 6px;
    text-decoration: none;
    color: #64748b;
    font-size: 13px;
    border: 1px solid transparent;
}
.tf-lang-switcher a.is-active {
    background: #0f172a;
    color: #fff;
}

/* ── Form layout ── */
.tf-form-title {
    margin: 4px 0 0;
    font-size: 28px;
    font-weight: 700;
}
.tf-form-meta {
    color: #64748b;
    margin: 4px 0 24px;
    font-size: 14px;
}

.tf-form fieldset {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin: 0 0 18px;
    background: #fff;
}
.tf-form legend {
    padding: 0 8px;
    font-weight: 600;
    color: #0f172a;
    font-size: 15px;
}
.tf-hint {
    color: #64748b;
    font-size: 13px;
    margin: 0 0 12px;
}

.tf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 600px) {
    .tf-grid { grid-template-columns: 1fr; }
}
.tf-grid label {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}
.tf-form input[type=text],
.tf-form input[type=email],
.tf-form input[type=tel],
.tf-form select,
.tf-form textarea {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 9px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #1e293b;
    transition: border-color .15s;
    line-height: 1.4;
}
.tf-form input:focus,
.tf-form select:focus,
.tf-form textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}

/* ── Radio group (Singolo/Coppia) ── */
.tf-radio-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.tf-radio {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    line-height: 1.2;
    min-width: 0;
    flex: 0 0 auto;
}
.tf-radio:hover { border-color:#6366f1; }
.tf-radio input[type=radio] {
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    accent-color: #0f172a;
    flex-shrink: 0;
}
.tf-radio:has(input:checked) {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}

.tf-partner {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
}

/* ── Cards (lezioni / milonghe) ── */
.tf-checkbox-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}
@media (max-width: 600px) {
    .tf-checkbox-list { grid-template-columns: 1fr; }
}

/* Header giorno: spanna tutta la riga della grid */
.tf-day-header {
    grid-column: 1 / -1;
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    margin: 12px 0 4px;
    padding: 8px 12px;
    background: #f1f5f9;
    border-radius: 6px;
    text-transform: capitalize;
}
.tf-day-header:first-child { margin-top: 0; }

/* Card: niente check indicator — solo sfondo verde quando selezionata.
   Nascondiamo il checkbox nativo. */
.tf-card {
    position: relative;
    display: block !important;
    padding: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all .15s;
    min-height: 60px;
    font-weight: 400;
    color: #1e293b;
    text-align: left;
}
.tf-card:hover { border-color:#6366f1; }

/* Nascondi il checkbox nativo (evita stili enormi imposti da temi) */
.tf-card input[type=checkbox] {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Stato selezionato: classe applicata via JS (no :has(), compat. Safari < 15.4).
   Fallback :has() per browser moderni se JS non gira ancora. */
.tf-card.is-checked,
.tf-card:has(input:checked) {
    border-color: #16a34a;
    background: #dcfce7;
}

.tf-card-body { width: 100%; }
.tf-card-body strong {
    display: block;
    font-weight: 600;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.3;
}
.tf-card-topic {
    color: #475569;
    font-size: 13px;
    margin-top: 4px;
    line-height: 1.4;
}
.tf-card-desc {
    color: #64748b;
    font-size: 13px;
    margin-top: 6px;
    line-height: 1.5;
    font-weight: 400;
}
.tf-card.is-checked .tf-card-desc,
.tf-card:has(input:checked) .tf-card-desc { color: #166534; }
.tf-card-meta {
    color: #64748b;
    font-size: 12px;
    margin-top: 6px;
    line-height: 1.3;
}
.tf-card.is-checked .tf-card-topic,
.tf-card:has(input:checked) .tf-card-topic { color:#14532d; }
.tf-card.is-checked .tf-card-meta,
.tf-card:has(input:checked) .tf-card-meta  { color:#166534; }

/* ── Summary card (inline, no sticky) ── */
.tf-summary {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin: 0 0 16px;
    overflow: hidden;
}
.tf-summary-head {
    padding: 10px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.tf-summary-rows {
    padding: 12px 16px;
}
.tf-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    color: #475569;
}
.tf-summary-row[hidden] { display: none !important; }

/* Riga coppia: sfondo distintivo + badge × 2 */
.tf-summary-couple {
    background: #fef3c7;
    border-radius: 8px;
    padding: 8px 12px !important;
    margin: 4px -4px;
    color: #92400e;
    font-weight: 600;
}
.tf-couple-mult {
    background: #f59e0b;
    color: #fff !important;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 13px;
    letter-spacing: .02em;
}
.tf-summary-row strong {
    color: #0f172a;
    font-weight: 600;
    font-size: 15px;
}
.tf-summary-row em {
    font-style: normal;
    color: #94a3b8;
    font-size: 12px;
    margin-left: 4px;
}
.tf-summary-promo {
    margin-top: 8px;
    padding: 10px 12px !important;
    background: linear-gradient(90deg, #dbeafe, #ede9fe);
    border-radius: 8px;
    color: #4338ca !important;
    font-weight: 600;
}
.tf-summary-promo .tf-promo-label { color: #4338ca; }
.tf-summary-eb {
    margin-top: 6px;
    padding: 8px 12px !important;
    background: #fef3c7;
    color: #92400e !important;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    justify-content: flex-start !important;
}
.tf-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 16px;
    background: #0f172a;
    color: #fff;
}
.tf-summary-total span {
    font-size: 14px;
    font-weight: 500;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.tf-summary-total strong {
    font-size: 28px;
    color: #fbbf24;
    font-weight: 700;
    line-height: 1;
}

/* ── Terms + submit ── */
.tf-terms {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 14px;
    background: #f1f5f9;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
}
.tf-terms input[type=checkbox] {
    margin: 2px 0 0 !important;
    width: 18px !important;
    height: 18px !important;
    accent-color: #16a34a;
    flex-shrink: 0;
}

.tf-submit-btn {
    width: 100%;
    padding: 14px;
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
}
.tf-submit-btn:hover { background:#1e293b; }
.tf-submit-btn:disabled { background:#94a3b8; cursor:not-allowed; }

.tf-form-result {
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    text-align: center;
    font-weight: 600;
}
.tf-form-result.is-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #16a34a;
}
.tf-form-result.is-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #dc2626;
    text-align: left;
    font-weight: 400;
}
.tf-form-result ul { margin:6px 0 0 18px; padding-left: 0; }

/* ── Program & Pricing ── */
.tf-program h2, .tf-pricing h2 { margin-bottom:8px; }
.tf-program h3, .tf-pricing h3 { margin:24px 0 8px; color:#475569; font-size:16px; }
.tf-program-list, .tf-pricing-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.tf-program-list li, .tf-pricing-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 6px;
}
.tf-program-when, .tf-price {
    color: #64748b;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
}
.tf-price { color:#0f172a; font-weight:600; font-size:15px; }
