/* ══════════════════════════════════════════════════════════════
   Piero Booking — Pagina prenotazione cliente (WCM)
   Foglio autonomo: dipende solo dalle classi pwcm-*.
   ══════════════════════════════════════════════════════════════ */

#piero-wcm-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1e2024;
    max-width: 680px;
    margin: 32px auto;
    padding: 0 14px;
    box-sizing: border-box;
}
#piero-wcm-wrap *,
#piero-wcm-wrap *::before,
#piero-wcm-wrap *::after { box-sizing: border-box; }

.pwcm-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

/* ── Testata ─────────────────────────────────────────────────── */
.pwcm-head {
    background: #1e2937;
    padding: 22px 26px;
}
.pwcm-head-site {
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #9ca3af;
}
.pwcm-head-title {
    margin: 6px 0 14px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.pwcm-unit {
    font-size: 12px;
    font-weight: 600;
    color: #d1d5db;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 20px;
    padding: 2px 10px;
    white-space: nowrap;
}
.pwcm-dates {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.pwcm-date-pill {
    display: inline-flex;
    flex-direction: column;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    padding: 6px 14px;
}
.pwcm-date-pill span {
    font-size: 10px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #9ca3af;
}
.pwcm-date-pill strong {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}
.pwcm-date-arrow { color: #6b7280; font-size: 16px; }
.pwcm-nights {
    margin-left: auto;
    font-size: 13px;
    font-weight: 600;
    color: #d1d5db;
    white-space: nowrap;
}

/* ── Corpo ───────────────────────────────────────────────────── */
.pwcm-body { padding: 24px 26px 26px; }

.pwcm-section { margin-bottom: 22px; }
.pwcm-section-title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #6b7280;
}

.pwcm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 14px;
}
.pwcm-grid-3 { grid-template-columns: repeat(3, 1fr); }

.pwcm-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #50575e;
    margin-bottom: 5px;
}
.pwcm-field input[type="text"],
.pwcm-field input[type="email"],
.pwcm-field input[type="tel"],
.pwcm-field input[type="number"] {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    font-size: 14px;
    color: #1e2024;
    background: #fff;
    -moz-appearance: textfield;
}
.pwcm-field input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

/* ── Extra ───────────────────────────────────────────────────── */
.pwcm-extras {
    border: 1px solid #f0f0f1;
    border-radius: 8px;
    overflow: hidden;
}
.pwcm-extra-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    font-size: 14px;
}
.pwcm-extra-row + .pwcm-extra-row { border-top: 1px solid #f0f0f1; }
.pwcm-extra-row input.pwcm-extra-qty {
    width: 74px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}
.pwcm-extra-row input.pwcm-extra-qty:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

/* ── Toggle disabilità ───────────────────────────────────────── */
.pwcm-toggle-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.pwcm-toggle {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex: none;
}
.pwcm-toggle input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}
.pwcm-toggle-slider {
    position: absolute;
    inset: 0;
    background: #e5e7eb;
    border-radius: 20px;
    transition: background .2s;
    pointer-events: none;
}
.pwcm-toggle-slider::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.pwcm-toggle input:checked + .pwcm-toggle-slider { background: #2563eb; }
.pwcm-toggle input:checked + .pwcm-toggle-slider::before { transform: translateX(16px); }
.pwcm-toggle-label {
    font-size: 14px;
    color: #374151;
    user-select: none;
}

/* ── Riepilogo prezzo ────────────────────────────────────────── */
#piero-wcm-price {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 18px;
}
.pwcm-price-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}
.pwcm-price-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}
.pwcm-price-total {
    font-size: 26px;
    font-weight: 800;
    color: #1e2024;
    letter-spacing: -.01em;
}
.pwcm-price-rows { margin-top: 6px; }
.pwcm-price-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: #50575e;
    padding: 3px 0;
}
.pwcm-price-row--disc span:last-child { color: #2e7d32; font-weight: 600; }
.pwcm-price-pay {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #d7dbe0;
    font-size: 13px;
    color: #374151;
}
.pwcm-price-pay strong {
    font-size: 17px;
    font-weight: 800;
    color: #2563eb;
}
.pwcm-price-note {
    margin-top: 6px;
    font-size: 12px;
    color: #8c8f94;
}

/* ── Errore e submit ─────────────────────────────────────────── */
.pwcm-error {
    margin: 0 0 14px;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #b32d2e;
    font-size: 13px;
}
.pwcm-btn-primary {
    display: block;
    width: 100%;
    height: 48px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.pwcm-btn-primary:hover { background: #1d4ed8; }
.pwcm-btn-primary:disabled { background: #93c5fd; cursor: default; }

.pwcm-footer {
    margin-top: 14px;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
}

/* ── Stati (link mancante / scaduto / non disponibile) ───────── */
.pwcm-state {
    padding: 44px 30px;
    text-align: center;
}
.pwcm-state-icon {
    width: 48px;
    height: 48px;
    line-height: 48px;
    margin: 0 auto 16px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 50%;
    font-size: 22px;
    font-weight: 800;
}
.pwcm-state-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 8px;
}
.pwcm-state-text {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    max-width: 420px;
    margin: 0 auto;
}

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 560px) {
    #piero-wcm-wrap { margin: 16px auto; }
    .pwcm-head, .pwcm-body { padding-left: 18px; padding-right: 18px; }
    .pwcm-grid, .pwcm-grid-3 { grid-template-columns: 1fr; }
    .pwcm-nights { margin-left: 0; width: 100%; }
    .pwcm-price-total { font-size: 22px; }
}
