/* ============================================================
   BOOKING PER TUTTI — Frontend CSS
   Usa CSS variables definite da PHP (colori struttura)
   ============================================================ */

:root {
    --bpt-primary:       #27ae60;
    --bpt-secondary:     #219a52;
    --bpt-primary-light: #27ae6022;
    --bpt-text:          #2c3e50;
    --bpt-text-light:    #7f8c8d;
    --bpt-border:        #e8ecef;
    --bpt-bg:            #f8fafb;
    --bpt-white:         #ffffff;
    --bpt-radius:        10px;
    --bpt-radius-sm:     6px;
    --bpt-shadow:        0 2px 12px rgba(0,0,0,.08);
    --bpt-shadow-hover:  0 6px 24px rgba(0,0,0,.14);
    --bpt-font:          -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Blocco emoji / Twemoji dentro tutti i container BPT ───
   Alcuni temi e plugin (Twemoji, WP Emoji) convertono le emoji
   in tag <img>. Forziamo dimensioni fisse su tutta l'area plugin.
   ─────────────────────────────────────────────────────────── */
.bpt-cerca-wrap img,
.bpt-risultati-wrap img,
.bpt-alloggio-detail img,
.bpt-booking-form-wrap img,
.bpt-conferma-wrap img {
    /* Reset globale per le <img> emoji iniettate dal tema */
}

/* Emoji inline (testo) */
.bpt-meta-icon,
.bpt-dot-icona,
.dot-icona {
    font-size: 15px !important;
    line-height: 1 !important;
    display: inline-block !important;
    vertical-align: middle !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
}

/* <img> generate da Twemoji / wp-emoji dentro i nostri span ─ */
.bpt-meta-icon img,
.bpt-dot-icona img,
.dot-icona img,
.bpt-dotazione-v2 img,
.bpt-dotazione img,
.bpt-card-dotazioni img,
.bpt-book-contatti img,
.bpt-btn-invia img,
.bpt-gallery-counter-btn img,
.bpt-contact-btn img,
.bpt-alloggio-tipo-v2 img,
.bpt-alloggio-tipo img {
    display: inline !important;
    width: 1em !important;
    height: 1em !important;
    max-width: 1em !important;
    max-height: 1em !important;
    min-width: 0 !important;
    min-height: 0 !important;
    vertical-align: -0.15em !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    object-fit: contain;
}

/* <img> emoji negli elementi della booking card ─────────── */
.bpt-booking-card-v2 img,
.bpt-booking-card img {
    /* Solo le img emoji (Twemoji ha sempre class="emoji") */
}
.bpt-booking-card-v2 img.emoji,
.bpt-booking-card img.emoji,
.bpt-book-prezzo-header img.emoji,
.bpt-preventivo img.emoji,
.bpt-note-pre-pagamento img.emoji,
.bpt-servizi-extra img.emoji,
.bpt-pagamento-opzioni img.emoji {
    display: inline !important;
    width: 1em !important;
    height: 1em !important;
    max-width: 1em !important;
    vertical-align: -0.15em !important;
    margin: 0 2px !important;
}

/* Blocco universale: qualsiasi img.emoji dentro .bpt-* ───── */
[class*="bpt-"] img.emoji,
[class*="bpt-"] img[src*="twemoji"],
[class*="bpt-"] img[src*="wp-includes/images/core/emoji"] {
    display: inline !important;
    width: 1em !important;
    height: 1em !important;
    max-width: 1em !important;
    max-height: 1em !important;
    vertical-align: -0.15em !important;
    margin: 0 1px !important;
    border: none !important;
    box-shadow: none !important;
}

*, *::before, *::after { box-sizing: border-box; }

.bpt-cerca-wrap,
.bpt-risultati-wrap,
.bpt-alloggio-detail,
.bpt-booking-form-wrap,
.bpt-conferma-wrap {
    font-family: var(--bpt-font);
    color: var(--bpt-text);
}

/* ============================================================
   BARRA RICERCA
   ============================================================ */

.bpt-cerca-wrap {
    margin: 0 0 32px;
}

.bpt-cerca-form {
    background: var(--bpt-white);
    border: 1px solid var(--bpt-border);
    border-radius: var(--bpt-radius);
    padding: 20px 24px;
    box-shadow: var(--bpt-shadow);
}

.bpt-cerca-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr auto;
    gap: 14px;
    align-items: flex-end;
}

/* Elementor/WoodMart inietta <p> e <br> dentro lo shortcode — li neutralizziamo */
.bpt-cerca-form p,
.bpt-cerca-form br,
.bpt-cerca-grid > p,
.bpt-cerca-grid > br,
.bpt-cerca-field > br,
.bpt-cerca-field > p {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    line-height: 0 !important;
}

@media (max-width: 900px) {
    .bpt-cerca-grid {
        grid-template-columns: 1fr 1fr;
    }
    .bpt-cerca-grid .bpt-cerca-field--ospiti,
    .bpt-cerca-grid .bpt-cerca-submit {
        grid-column: span 1;
    }
}

@media (max-width: 600px) {
    .bpt-cerca-grid {
        grid-template-columns: 1fr;
    }
}

.bpt-cerca-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 130px;
}

.bpt-cerca-field label {
    font-size: 12px;
    font-weight: 700;
    color: var(--bpt-text-light);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.bpt-cerca-field input,
.bpt-cerca-field select {
    border: 1.5px solid var(--bpt-border);
    border-radius: var(--bpt-radius-sm);
    padding: 10px 12px;
    font-size: 14px;
    color: var(--bpt-text);
    background: var(--bpt-white);
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
    appearance: none;
}

.bpt-cerca-field input:focus,
.bpt-cerca-field select:focus {
    border-color: var(--bpt-primary);
    box-shadow: 0 0 0 3px var(--bpt-primary-light);
    outline: none;
}

.bpt-btn-cerca {
    background: var(--bpt-primary);
    color: #fff;
    border: none;
    border-radius: var(--bpt-radius-sm);
    padding: 11px 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .1s;
    white-space: nowrap;
    width: 100%;
}

.bpt-btn-cerca:hover  { background: var(--bpt-secondary); }
.bpt-btn-cerca:active { transform: scale(.98); }

/* ============================================================
   LOADING
   ============================================================ */

.bpt-loading {
    text-align: center;
    padding: 40px;
    color: var(--bpt-text-light);
}

.bpt-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--bpt-border);
    border-top-color: var(--bpt-primary);
    border-radius: 50%;
    animation: bpt-spin .7s linear infinite;
    margin: 0 auto 12px;
}

@keyframes bpt-spin { to { transform: rotate(360deg); } }

/* ============================================================
   GRIGLIA RISULTATI
   ============================================================ */

.bpt-risultati-wrap {
    margin-top: 24px;
}

.bpt-risultati-header {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bpt-count {
    font-size: 14px;
    color: var(--bpt-text-light);
    font-weight: 600;
}

.bpt-alloggi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.bpt-no-results {
    grid-column: 1/-1;
    text-align: center;
    padding: 48px;
    color: var(--bpt-text-light);
    font-size: 15px;
}

/* Card nessun risultato con invito a contattare */
.bpt-no-results-card {
    grid-column: 1/-1;
    text-align: center;
    padding: 48px 32px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    max-width: 560px;
    margin: 32px auto;
    width: 100%;
    box-sizing: border-box;
}
.bpt-no-results-icon {
    font-size: 48px;
    margin-bottom: 16px;
}
.bpt-no-results-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px;
}
.bpt-no-results-text {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.7;
    margin: 0 0 24px;
}
.bpt-no-results-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.bpt-no-results-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: opacity .15s;
}
.bpt-no-results-btn:hover { opacity: .85; }
.bpt-no-results-btn--tel {
    background: var(--bpt-primary, #27ae60);
    color: #fff;
}
.bpt-no-results-btn--wa {
    background: #25d366;
    color: #fff;
}
.bpt-no-results-btn--contact {
    background: #fff;
    color: #374151;
    border: 2px solid #d1d5db;
}
.bpt-no-results-btn--contact:hover {
    background: #f9fafb;
    opacity: 1;
}


/* ============================================================
   CARD ALLOGGIO
   ============================================================ */

.bpt-card-alloggio {
    background: var(--bpt-white);
    border: 1px solid var(--bpt-border);
    border-radius: var(--bpt-radius);
    overflow: hidden;
    box-shadow: var(--bpt-shadow);
    transition: box-shadow .25s, transform .25s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.bpt-card-alloggio:hover {
    box-shadow: var(--bpt-shadow-hover);
    transform: translateY(-3px);
}

.bpt-badge-evidenza {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #f39c12;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    z-index: 2;
}

.bpt-card-img-wrap {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--bpt-bg);
}

.bpt-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.bpt-card-alloggio:hover .bpt-card-img-wrap img {
    transform: scale(1.04);
}

.bpt-card-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #ccc;
}

.bpt-card-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.bpt-card-tipo {
    font-size: 11px;
    font-weight: 700;
    color: var(--bpt-primary);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.bpt-card-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.bpt-card-title a {
    color: var(--bpt-text);
    text-decoration: none;
}

.bpt-card-title a:hover { color: var(--bpt-primary); }

.bpt-card-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--bpt-text-light);
}

.bpt-card-dotazioni {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.bpt-dot-icona {
    font-size: 14px;
    line-height: 1;
}

.bpt-card-prezzo {
    margin-top: auto;
    font-size: 14px;
    color: var(--bpt-text-light);
}

.bpt-card-totale {
    font-size: 20px;
    font-weight: 800;
    color: var(--bpt-primary);
}

.bpt-card-notti {
    font-size: 13px;
    color: var(--bpt-text-light);
}

.bpt-btn-prenota {
    display: block;
    text-align: center;
    background: var(--bpt-primary);
    color: #fff !important;
    border-radius: var(--bpt-radius-sm);
    padding: 11px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none !important;
    transition: background .2s;
    margin-top: 4px;
}

.bpt-btn-prenota:hover { background: var(--bpt-secondary); }

.bpt-card-non-prenotabile {
    background: #fff8ed;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #92400e;
    line-height: 1.4;
}

/* ============================================================
   SCHEDA SINGOLO ALLOGGIO
   ============================================================ */

.bpt-alloggio-detail {
    max-width: 1100px;
    margin: 0 auto;
}

.bpt-alloggio-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

/* Galleria */
.bpt-galleria {
    border-radius: var(--bpt-radius);
    overflow: hidden;
}

.bpt-galleria-main {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bpt-bg);
    cursor: zoom-in;
}

.bpt-galleria-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.bpt-galleria-main img:hover { transform: scale(1.02); }

.bpt-galleria-thumbs {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.bpt-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .2s;
}

.bpt-thumb.active,
.bpt-thumb:hover { border-color: var(--bpt-primary); }

.bpt-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info alloggio */
.bpt-alloggio-info { margin-top: 24px; }

.bpt-alloggio-tipo {
    font-size: 12px;
    font-weight: 700;
    color: var(--bpt-primary);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
}

.bpt-alloggio-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 12px;
    color: var(--bpt-text);
}

.bpt-alloggio-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--bpt-text-light);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.bpt-alloggio-meta span { display: flex; align-items: center; gap: 5px; }

/* Icone meta — dimensione fissa piccola */
.bpt-meta-icon {
    font-size: 14px;
    line-height: 1;
    flex-shrink: 0;
}

/* Badge metodo pagamento — testo invece di emoji grandi */
.bpt-pay-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bpt-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    border-radius: 4px;
    padding: 2px 5px;
    line-height: 1.2;
    letter-spacing: .3px;
    flex-shrink: 0;
}

.bpt-alloggio-desc {
    font-size: 15px;
    line-height: 1.7;
    color: var(--bpt-text);
    margin-bottom: 20px;
}

/* Dotazioni */
.bpt-dotazioni-section h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
}

.bpt-dotazioni-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.bpt-dotazione {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--bpt-text);
    background: var(--bpt-bg);
    padding: 8px 12px;
    border-radius: var(--bpt-radius-sm);
}

.bpt-dotazione .dot-icona {
    font-size: 15px;
    line-height: 1;
    flex-shrink: 0;
}

/* Calendario disponibilità */
.bpt-calendario-wrap {
    margin-top: 28px;
}

/* Contenitore due calendari affiancati */
.bpt-cal-doppio-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 600px) {
    .bpt-cal-doppio-wrap {
        grid-template-columns: 1fr;
    }
}

.bpt-calendario-wrap h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }

.bpt-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.bpt-cal-nav button {
    background: none;
    border: 1px solid var(--bpt-border);
    border-radius: 6px;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 16px;
    color: var(--bpt-text);
    transition: all .15s;
}

.bpt-cal-nav button:hover {
    background: var(--bpt-primary);
    color: #fff;
    border-color: var(--bpt-primary);
}

.bpt-cal-mese { font-size: 15px; font-weight: 700; color: var(--bpt-text); }

.bpt-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.bpt-cal-dow {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--bpt-text-light);
    padding: 4px 0;
    text-transform: uppercase;
}

.bpt-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    transition: all .15s;
    position: relative;
    font-weight: 500;
}

.bpt-cal-day.vuoto         { background: none; cursor: default; }
.bpt-cal-day.passato       { color: #ccc; cursor: default; background: none; }
.bpt-cal-day.libero        { background: #eafaf1; color: #27ae60; }
.bpt-cal-day.libero:hover  { background: var(--bpt-primary); color: #fff; }
.bpt-cal-readonly .bpt-cal-day.libero { cursor: default; }
.bpt-cal-readonly .bpt-cal-day.libero:hover { background: #eafaf1; color: #27ae60; }
.bpt-cal-day.parziale      { background: #fef9e7; color: #f39c12; }
.bpt-cal-day.occupato      { background: #fdedec; color: #e74c3c; cursor: not-allowed; }
.bpt-cal-day.selezionato   { background: var(--bpt-primary) !important; color: #fff !important; font-weight: 700; }
.bpt-cal-day.nel-range     { background: var(--bpt-primary-light); color: var(--bpt-primary); }

.bpt-cal-legenda {
    display: flex;
    gap: 14px;
    margin-top: 10px;
    font-size: 12px;
    flex-wrap: wrap;
}

.bpt-cal-leg-item { display: flex; align-items: center; gap: 5px; color: var(--bpt-text-light); }
.bpt-cal-leg-dot  { width: 12px; height: 12px; border-radius: 3px; }

/* ============================================================
   FORM PRENOTAZIONE (sidebar scheda alloggio)
   ============================================================ */

.bpt-booking-sidebar {
    position: sticky;
    top: 24px;
    min-height: 0;
}

/* Nasconde eventuali placeholder SVG iniettati dal tema */
.bpt-booking-sidebar > *:not(.bpt-booking-card) {
    display: none !important;
}

.bpt-booking-card {
    background: var(--bpt-white);
    border: 1px solid var(--bpt-border);
    border-radius: var(--bpt-radius);
    padding: 22px;
    box-shadow: var(--bpt-shadow);
}

.bpt-booking-card h3 {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 700;
    color: var(--bpt-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.bpt-form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
}

.bpt-form-field label {
    font-size: 12px;
    font-weight: 700;
    color: var(--bpt-text-light);
    text-transform: uppercase;
    letter-spacing: .3px;
}

.bpt-form-field input[type=text],
.bpt-form-field input[type=email],
.bpt-form-field input[type=tel],
.bpt-form-field input[type=date],
.bpt-form-field input[type=number],
.bpt-form-field select,
.bpt-form-field textarea {
    border: 1.5px solid var(--bpt-border);
    border-radius: var(--bpt-radius-sm);
    padding: 9px 12px;
    font-size: 14px;
    color: var(--bpt-text);
    background: var(--bpt-white);
    width: 100%;
    transition: border-color .2s, box-shadow .2s;
    font-family: var(--bpt-font);
}

.bpt-form-field input:focus,
.bpt-form-field select:focus,
.bpt-form-field textarea:focus {
    border-color: var(--bpt-primary);
    box-shadow: 0 0 0 3px var(--bpt-primary-light);
    outline: none;
}

.bpt-form-field textarea { min-height: 70px; resize: vertical; }

.bpt-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Preventivo */
.bpt-preventivo {
    background: var(--bpt-bg);
    border: 1px solid var(--bpt-border);
    border-radius: var(--bpt-radius-sm);
    padding: 14px;
    margin: 14px 0;
    font-size: 13px;
}

.bpt-prev-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    color: var(--bpt-text-light);
}

.bpt-prev-row.totale {
    border-top: 1px solid var(--bpt-border);
    margin-top: 8px;
    padding-top: 8px;
    font-weight: 700;
    font-size: 15px;
    color: var(--bpt-text);
}

.bpt-prev-row.acconto { color: var(--bpt-primary); font-weight: 700; }

/* Metodi pagamento */
.bpt-pagamento-opzioni {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 14px 0;
}

.bpt-pagamento-opzione {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1.5px solid var(--bpt-border);
    border-radius: var(--bpt-radius-sm);
    cursor: pointer;
    transition: all .15s;
    font-size: 14px;
}

.bpt-pagamento-opzione:has(input:checked) {
    border-color: var(--bpt-primary);
    background: var(--bpt-primary-light);
}

.bpt-pagamento-opzione input { margin: 0; }

/* Servizi extra */
.bpt-servizi-extra { margin: 14px 0; }
.bpt-servizi-extra h4 { font-size: 14px; font-weight: 700; margin: 0 0 10px; }

.bpt-servizio-check {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--bpt-border);
    font-size: 13px;
    cursor: pointer;
}

.bpt-servizio-check:last-child { border-bottom: none; }

.bpt-servizio-check label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 1;
}

.bpt-servizio-prezzo { color: var(--bpt-primary); font-weight: 700; }

/* Check legali */
.bpt-check-legale {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: var(--bpt-text-light);
    margin: 6px 0;
    cursor: pointer;
}

.bpt-check-legale input { margin-top: 2px; flex-shrink: 0; }
.bpt-check-legale a { color: var(--bpt-primary); }

/* Bottone prenota */
.bpt-btn-invia {
    width: 100%;
    background: var(--bpt-primary);
    color: #fff;
    border: none;
    border-radius: var(--bpt-radius-sm);
    padding: 14px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: background .2s, transform .1s;
    margin-top: 12px;
}

.bpt-btn-invia:hover   { background: var(--bpt-secondary); }
.bpt-btn-invia:active  { transform: scale(.98); }
.bpt-btn-invia:disabled { background: #ccc; cursor: not-allowed; }

.bpt-form-error {
    background: #fdedec;
    border: 1px solid #f5c6cb;
    border-radius: var(--bpt-radius-sm);
    color: #c0392b;
    padding: 10px 14px;
    font-size: 13px;
    margin: 10px 0;
    display: none;
}

/* ============================================================
   PAGINA CONFERMA
   ============================================================ */

.bpt-conferma-wrap {
    max-width: 640px;
    margin: 40px auto;
    text-align: center;
}

.bpt-conferma-icona { font-size: 64px; margin-bottom: 16px; }

.bpt-conferma-titolo {
    font-size: 28px;
    font-weight: 800;
    color: var(--bpt-primary);
    margin-bottom: 8px;
}

.bpt-conferma-sottotitolo {
    font-size: 16px;
    color: var(--bpt-text-light);
    margin-bottom: 28px;
}

.bpt-conferma-card {
    background: var(--bpt-white);
    border: 1px solid var(--bpt-border);
    border-radius: var(--bpt-radius);
    padding: 24px;
    text-align: left;
    box-shadow: var(--bpt-shadow);
    margin-bottom: 20px;
}

.bpt-conferma-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 14px;
    color: var(--bpt-text);
    border-bottom: 1px solid var(--bpt-border);
    padding-bottom: 10px;
}

.bpt-conf-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--bpt-bg);
}

.bpt-conf-row:last-child { border-bottom: none; }
.bpt-conf-row .label { color: var(--bpt-text-light); }
.bpt-conf-row .value { font-weight: 600; color: var(--bpt-text); }
.bpt-conf-row.highlight .value { color: var(--bpt-primary); font-size: 18px; font-weight: 800; }

.bpt-iban-box {
    background: var(--bpt-bg);
    border: 1px dashed var(--bpt-primary);
    border-radius: var(--bpt-radius-sm);
    padding: 14px 18px;
    font-size: 14px;
    margin-top: 10px;
}

.bpt-iban-box .iban-num {
    font-family: monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--bpt-primary);
    letter-spacing: 1px;
    display: block;
    margin: 6px 0;
}

/* ============================================================
   WIDGET OSPITI — selettore stile Booking.com
   ============================================================ */

.bpt-ospiti-widget {
    position: relative;
}

.bpt-ospiti-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    text-align: left;
    transition: border-color .2s;
}

.bpt-ospiti-trigger:hover,
.bpt-ospiti-trigger:focus {
    border-color: var(--bpt-primary);
    outline: none;
}

.bpt-ospiti-arrow {
    width: 10px;
    height: 10px;
    border-right: 2px solid #888;
    border-bottom: 2px solid #888;
    transform: rotate(45deg);
    flex-shrink: 0;
    margin-top: -4px;
    display: inline-block;
}

.bpt-ospiti-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 300px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    padding: 16px;
    z-index: 9999;
}

.bpt-ospiti-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.bpt-ospiti-row:last-of-type {
    border-bottom: none;
}

.bpt-ospiti-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bpt-ospiti-nome {
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

.bpt-ospiti-desc {
    font-size: 12px;
    color: #888;
}

.bpt-ospiti-counter {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bpt-cnt-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--bpt-primary);
    background: #fff;
    color: var(--bpt-primary);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
    padding: 0;
}

.bpt-cnt-btn:hover:not(:disabled) {
    background: var(--bpt-primary);
    color: #fff;
}

.bpt-cnt-btn:disabled {
    border-color: #ccc;
    color: #ccc;
    cursor: not-allowed;
}

.bpt-cnt-val {
    font-size: 16px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    color: #222;
}

/* Età bambini */
.bpt-eta-bambini {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.bpt-eta-label {
    font-size: 13px;
    color: #555;
    margin: 0 0 10px;
}

.bpt-eta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.bpt-eta-item label {
    font-size: 13px;
    color: #444;
    min-width: 80px;
    margin: 0;
}

.bpt-eta-select {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
}

.bpt-ospiti-chiudi {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 10px;
    background: var(--bpt-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}

.bpt-ospiti-chiudi:hover {
    background: var(--bpt-secondary);
}

/* Campo ospiti nella barra cerca — larghezza maggiore */
.bpt-cerca-field--ospiti {
    flex: 2;
    min-width: 220px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
    .bpt-alloggio-layout {
        grid-template-columns: 1fr;
    }
    .bpt-booking-sidebar { position: static; }
}

@media (max-width: 600px) {
    .bpt-cerca-grid { flex-direction: column; }
    .bpt-cerca-field { min-width: 100%; }
    .bpt-cerca-field--ospiti { min-width: 100%; }
    .bpt-alloggi-grid { grid-template-columns: 1fr; }
    .bpt-form-row-2 { grid-template-columns: 1fr; }
    .bpt-dotazioni-list { grid-template-columns: 1fr 1fr; }
    .bpt-ospiti-dropdown { min-width: 100%; left: 0; right: 0; }
}

/* ============================================================
   LAYOUT V2 — SCHEDA SINGOLO ALLOGGIO (Sessione 4)
   ============================================================ */

/* ── Breadcrumb ──────────────────────────────────────────── */
.bpt-breadcrumb {
    font-size: 13px;
    color: #999;
    margin-bottom: 18px;
}
.bpt-breadcrumb a {
    color: inherit;
    text-decoration: none;
    transition: color .15s;
}
.bpt-breadcrumb a:hover { color: var(--bpt-primary); }

/* ── Grid 2 colonne ──────────────────────────────────────── */
.bpt-alloggio-layout-v2 {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 36px;
    align-items: start;
}

/* ── Colonna sinistra ────────────────────────────────────── */
.bpt-alloggio-left-v2 {
    min-width: 0; /* prevent overflow */
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ── Sezioni sinistra ────────────────────────────────────── */
.bpt-section-v2 { }

.bpt-section-title-v2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--bpt-text);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bpt-border);
}

/* ── Gallery v2 ──────────────────────────────────────────── */
.bpt-galleria-v2 {
    border-radius: var(--bpt-radius);
    overflow: hidden;
}

.bpt-galleria-main-v2 {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bpt-bg);
    border-radius: var(--bpt-radius);
}

.bpt-galleria-main-v2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
    cursor: zoom-in;
}
.bpt-galleria-main-v2 img:hover { transform: scale(1.02); }

/* Badge "N foto" */
.bpt-gallery-counter-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,.55);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background .15s;
}
.bpt-gallery-counter-btn:hover { background: rgba(0,0,0,.75); }

/* Thumbnails — griglia su desktop, scroll su mobile */
.bpt-galleria-thumbs-v2 {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    /* Nascondi scrollbar visivamente ma mantieni funzionalità */
    scrollbar-width: thin;
    scrollbar-color: var(--bpt-border) transparent;
}
.bpt-galleria-thumbs-v2::-webkit-scrollbar { height: 3px; }
.bpt-galleria-thumbs-v2::-webkit-scrollbar-thumb { background: var(--bpt-border); border-radius: 3px; }

.bpt-thumb-v2 {
    flex-shrink: 0;
    width: 82px;
    height: 62px;
    border-radius: 7px;
    overflow: hidden;
    cursor: pointer;
    border: 2.5px solid transparent;
    transition: border-color .18s, transform .18s;
    scroll-snap-align: start;
}
.bpt-thumb-v2:hover  { border-color: var(--bpt-primary); transform: translateY(-1px); }
.bpt-thumb-v2.active { border-color: var(--bpt-primary); }

.bpt-thumb-v2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* ── Titolo + meta ───────────────────────────────────────── */
.bpt-alloggio-header-v2 { }

.bpt-alloggio-tipo-v2 {
    font-size: 11px;
    font-weight: 700;
    color: var(--bpt-primary);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 6px;
}
.bpt-alloggio-tipo-v2 a { color: inherit; text-decoration: none; }
.bpt-alloggio-tipo-v2 a:hover { text-decoration: underline; }

.bpt-alloggio-title-v2 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 14px;
    color: var(--bpt-text);
    line-height: 1.2;
}

.bpt-alloggio-meta-v2 {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    font-size: 14px;
    color: var(--bpt-text-light);
}
.bpt-alloggio-meta-v2 span { display: flex; align-items: center; gap: 5px; }

.bpt-culla-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 500;
    margin-top: 4px;
}

/* ── Descrizione ─────────────────────────────────────────── */
.bpt-alloggio-desc-v2 {
    font-size: 15px;
    line-height: 1.75;
    color: var(--bpt-text);
}

/* ── Dotazioni v2 ────────────────────────────────────────── */
.bpt-dotazioni-list-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 8px;
}
.bpt-dotazione-v2 {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: var(--bpt-text);
    background: var(--bpt-bg);
    padding: 9px 13px;
    border-radius: var(--bpt-radius-sm);
    border: 1px solid var(--bpt-border);
}

/* ── Servizi informativi ─────────────────────────────────── */
.bpt-srv-nota-v2 {
    font-size: 13px;
    color: var(--bpt-text-light);
    margin: 0 0 12px;
    font-style: italic;
}
.bpt-servizi-info-v2 {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--bpt-border);
    border-radius: var(--bpt-radius-sm);
    overflow: hidden;
}
.bpt-srv-info-item-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--bpt-border);
    background: var(--bpt-white);
    transition: background .12s;
}
.bpt-srv-info-item-v2:last-child { border-bottom: none; }
.bpt-srv-info-item-v2:hover { background: var(--bpt-bg); }

.bpt-srv-info-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.bpt-srv-nome { font-weight: 600; color: var(--bpt-text); }
.bpt-srv-desc { font-size: 12px; color: var(--bpt-text-light); }
.bpt-srv-prezzo-tag {
    font-weight: 700;
    color: var(--bpt-primary);
    white-space: nowrap;
    font-size: 13px;
}

/* ── Calendario doppio ───────────────────────────────────── */
.bpt-cal-doppio-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
/* Secondo mese: solo su desktop */
.bpt-cal-mese2 { }

/* ── Colonna destra — pannello prenotazione ──────────────── */
.bpt-booking-sidebar-v2 {
    position: sticky;
    top: 124px;
    min-height: 0;
}
/* Nasconde contenuti fantasma iniettati da alcuni temi */
.bpt-booking-sidebar-v2 > *:not(.bpt-booking-card-v2) { display: none !important; }

.bpt-booking-card-v2 {
    background: var(--bpt-white);
    border: 1px solid var(--bpt-border);
    border-radius: var(--bpt-radius);
    padding: 22px;
    box-shadow: 0 4px 20px rgba(0,0,0,.09);
}

/* Prezzo header nella card */
.bpt-book-prezzo-header {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bpt-border);
}
.bpt-book-prezzo-main {
    display: flex;
    align-items: baseline;
    gap: 5px;
}
.bpt-book-da   { font-size: 13px; color: var(--bpt-text-light); }
.bpt-book-prezzo {
    font-size: 26px;
    font-weight: 800;
    color: var(--bpt-primary);
    line-height: 1;
}
.bpt-book-tipo { font-size: 13px; color: var(--bpt-text-light); }
.bpt-book-supplemento {
    font-size: 12px;
    color: var(--bpt-text-light);
    margin-top: 4px;
}

/* Date row */
.bpt-book-date-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 12px;
}
.bpt-book-date-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.bpt-book-date-field label {
    font-size: 11px;
    font-weight: 700;
    color: var(--bpt-text-light);
    text-transform: uppercase;
    letter-spacing: .3px;
}
.bpt-book-date-field input[type=date] {
    border: 1.5px solid var(--bpt-border);
    border-radius: var(--bpt-radius-sm);
    padding: 9px 10px;
    font-size: 14px;
    color: var(--bpt-text);
    background: var(--bpt-white);
    width: 100%;
    transition: border-color .2s, box-shadow .2s;
    font-family: var(--bpt-font);
    -webkit-appearance: none;
}
.bpt-book-date-field input[type=date]:focus {
    border-color: var(--bpt-primary);
    box-shadow: 0 0 0 3px var(--bpt-primary-light);
    outline: none;
}
.bpt-book-date-sep {
    font-size: 18px;
    color: var(--bpt-text-light);
    padding-bottom: 9px;
    flex-shrink: 0;
}

/* Separatore orizzontale */
.bpt-book-sep {
    border: none;
    border-top: 1px solid var(--bpt-border);
    margin: 16px 0;
}

/* Label sm */
.bpt-book-label-sm {
    font-size: 12px;
    font-weight: 700;
    color: var(--bpt-text-light);
    text-transform: uppercase;
    letter-spacing: .3px;
    margin: 0 0 10px;
}

/* Contatti rapidi */
.bpt-book-contatti {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--bpt-border);
    text-align: center;
}
.bpt-book-contatti-label {
    font-size: 12px;
    color: var(--bpt-text-light);
    margin: 0 0 10px;
}
.bpt-book-contatti-links {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.bpt-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all .18s;
}
.bpt-contact-tel {
    background: #f0f9f4;
    color: var(--bpt-primary);
    border: 1px solid #c3e8d4;
}
.bpt-contact-tel:hover { background: var(--bpt-primary); color: #fff; border-color: var(--bpt-primary); }

.bpt-contact-wa {
    background: #e8f8f0;
    color: #25d366;
    border: 1px solid #b2dfcc;
}
.bpt-contact-wa:hover { background: #25d366; color: #fff; border-color: #25d366; }

/* Orari check-in/out */
.bpt-book-orari {
    text-align: center;
    font-size: 12px;
    color: var(--bpt-text-light);
    margin: 10px 0 0;
}

/* Note pre-pagamento */
.bpt-note-pre-pagamento {
    background: #f8f9fa;
    border-left: 3px solid var(--bpt-primary);
    padding: 10px 14px;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: #444;
    margin-bottom: 14px;
    line-height: 1.6;
}

/* ============================================================
   RESPONSIVE v2
   ============================================================ */

@media (max-width: 900px) {
    .bpt-alloggio-layout-v2 {
        grid-template-columns: 1fr;
    }
    .bpt-booking-sidebar-v2 {
        position: static;
    }
    /* Secondo mese calendario nascosto su mobile/tablet */
    .bpt-cal-mese2 {
        display: none;
    }
    .bpt-cal-doppio-wrap {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .bpt-alloggio-title-v2 { font-size: 22px; }
    .bpt-dotazioni-list-v2 { grid-template-columns: 1fr 1fr; }
    .bpt-book-date-row { flex-direction: column; gap: 6px; }
    .bpt-book-date-sep { display: none; }
    .bpt-book-date-field { width: 100%; }
    .bpt-gallery-counter-btn { font-size: 11px; padding: 4px 10px; }
    /* Thumbs: già scroll orizzontale, ok */
}

@media (min-width: 961px) {
    /* Su desktop le thumbs possono wrappare in griglia */
    .bpt-galleria-thumbs-v2 {
        flex-wrap: wrap;
        overflow-x: visible;
    }
}

/* ── Fix campi date barra ricerca su mobile ──────────────── */

/* I campi date nativi su mobile devono essere ben visibili */
.bpt-cerca-field input[type="date"] {
    min-height: 44px;           /* tocco facile su mobile */
    cursor: pointer;
}

/* Su mobile la barra ricerca va in colonna con campi a piena larghezza */
@media (max-width: 700px) {
    .bpt-cerca-grid {
        flex-direction: column;
        gap: 10px;
    }
    .bpt-cerca-field,
    .bpt-cerca-field--ospiti {
        min-width: 100%;
        flex: none;
    }
    .bpt-cerca-submit {
        min-width: 100%;
    }
    .bpt-cerca-field input[type="date"],
    .bpt-cerca-field select,
    .bpt-cerca-field input[type="text"] {
        font-size: 16px;  /* evita zoom automatico su iOS */
        padding: 12px 14px;
        min-height: 48px;
    }
    .bpt-btn-cerca {
        padding: 14px;
        font-size: 16px;
        min-height: 48px;
    }
    .bpt-ospiti-trigger {
        padding: 12px 14px;
        font-size: 16px;
        min-height: 48px;
    }
}

/* ============================================================
   DATE PICKER CUSTOM — calendario a numeri (Sessione 4)
   ============================================================ */

/* Nasconde i type="date" originali, mantiene nel DOM per il submit */
.bpt-dp-hidden {
    display: none !important;
}

/* Campo display (testo leggibile) */
.bpt-dp-display {
    border: 1.5px solid var(--bpt-border);
    border-radius: var(--bpt-radius-sm);
    padding: 10px 12px;
    font-size: 15px;
    color: var(--bpt-text);
    background: var(--bpt-white);
    width: 100%;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    font-family: var(--bpt-font);
    caret-color: transparent; /* nasconde cursore testo */
    -webkit-appearance: none;
    appearance: none;
}
.bpt-dp-display:focus {
    border-color: var(--bpt-primary);
    box-shadow: 0 0 0 3px var(--bpt-primary-light);
    outline: none;
}
.bpt-dp-display::placeholder { color: #bbb; }

/* ── Overlay ─────────────────────────────────────────────── */
.bpt-dp-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 99990;
    align-items: flex-end;   /* bottom sheet su mobile */
    justify-content: center;
}
.bpt-dp-overlay.active {
    display: flex;
}

/* ── Pannello ────────────────────────────────────────────── */
.bpt-dp-panel {
    background: var(--bpt-white);
    width: 100%;
    max-width: 420px;
    border-radius: 20px 20px 0 0;
    padding: 0 0 env(safe-area-inset-bottom, 0);
    box-shadow: 0 -4px 32px rgba(0,0,0,.18);
    animation: bptDpSlideUp .22s ease;
    overflow: hidden;
}

@keyframes bptDpSlideUp {
    from { transform: translateY(60px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Su schermi larghi: dropdown centrato invece di bottom sheet */
@media (min-width: 700px) {
    .bpt-dp-overlay {
        align-items: center;
    }
    .bpt-dp-panel {
        border-radius: var(--bpt-radius);
        max-width: 380px;
        box-shadow: 0 8px 40px rgba(0,0,0,.18);
        animation: bptDpFadeIn .18s ease;
    }
    @keyframes bptDpFadeIn {
        from { opacity: 0; transform: translateY(-8px); }
        to   { opacity: 1; transform: translateY(0); }
    }
}

/* ── Header ──────────────────────────────────────────────── */
.bpt-dp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--bpt-border);
    position: relative;
}

.bpt-dp-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
    transition: color .15s;
    flex-shrink: 0;
}
.bpt-dp-close:hover { color: var(--bpt-text); }

/* Step labels check-in → check-out */
.bpt-dp-step-labels {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: center;
}
.bpt-dp-step-sep {
    color: #ccc;
    font-size: 16px;
}
.bpt-dp-step-label {
    font-size: 13px;
    font-weight: 600;
    color: #bbb;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1.5px solid transparent;
    transition: all .15s;
    white-space: nowrap;
}
.bpt-dp-step-label.active {
    color: var(--bpt-primary);
    border-color: var(--bpt-primary);
    background: var(--bpt-primary-light);
}
.bpt-dp-step-label.filled {
    color: var(--bpt-text);
}
.bpt-dp-step-label.active.filled {
    color: var(--bpt-primary);
}

/* ── Nav mese ────────────────────────────────────────────── */
.bpt-dp-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px 8px;
}
.bpt-dp-prev,
.bpt-dp-next {
    background: none;
    border: 1px solid var(--bpt-border);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 20px;
    color: var(--bpt-text);
    cursor: pointer;
    line-height: 1;
    transition: all .15s;
}
.bpt-dp-prev:hover,
.bpt-dp-next:hover {
    background: var(--bpt-primary);
    color: #fff;
    border-color: var(--bpt-primary);
}
.bpt-dp-mese-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--bpt-text);
}

/* ── Griglia giorni ──────────────────────────────────────── */
.bpt-dp-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    padding: 0 14px 8px;
}
.bpt-dp-dow {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--bpt-text-light);
    padding: 6px 0 4px;
    text-transform: uppercase;
}
.bpt-dp-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all .12s;
    position: relative;
    user-select: none;
}
.bpt-dp-cell.empty  { }
.bpt-dp-cell.past   { color: #ccc; pointer-events: none; }
.bpt-dp-cell.available {
    cursor: pointer;
    color: var(--bpt-text);
}
.bpt-dp-cell.available:hover {
    background: var(--bpt-primary-light);
    color: var(--bpt-primary);
}
.bpt-dp-cell.today {
    font-weight: 800;
    color: var(--bpt-primary);
}
.bpt-dp-cell.today::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--bpt-primary);
    border-radius: 50%;
}
.bpt-dp-cell.sel-ci,
.bpt-dp-cell.sel-co {
    background: var(--bpt-primary) !important;
    color: #fff !important;
    font-weight: 700;
}
.bpt-dp-cell.sel-ci { border-radius: 8px 0 0 8px; }
.bpt-dp-cell.sel-co { border-radius: 0 8px 8px 0; }
.bpt-dp-cell.sel-ci.sel-co { border-radius: 8px; } /* stessa data */
.bpt-dp-cell.in-range {
    background: var(--bpt-primary-light);
    color: var(--bpt-primary);
    border-radius: 0;
}

/* ── Footer ──────────────────────────────────────────────── */
.bpt-dp-footer {
    display: flex;
    gap: 10px;
    padding: 12px 18px 20px;
    border-top: 1px solid var(--bpt-border);
}
.bpt-dp-reset {
    flex: 1;
    padding: 11px;
    background: none;
    border: 1.5px solid var(--bpt-border);
    border-radius: var(--bpt-radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--bpt-text-light);
    cursor: pointer;
    transition: all .15s;
}
.bpt-dp-reset:hover { border-color: #e74c3c; color: #e74c3c; }
.bpt-dp-confirm {
    flex: 2;
    padding: 11px;
    background: var(--bpt-primary);
    border: none;
    border-radius: var(--bpt-radius-sm);
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: background .15s;
}
.bpt-dp-confirm:hover { background: var(--bpt-secondary); }

/* ── Fatturazione toggle ─────────────────────────────────── */
.bpt-fatturazione-toggle {
    margin: 4px 0 12px;
}
.bpt-fatturazione-btn {
    background: none;
    border: 1.5px dashed var(--bpt-border);
    border-radius: var(--bpt-radius-sm);
    padding: 8px 14px;
    font-size: 13px;
    color: var(--bpt-text-light);
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: all .15s;
}
.bpt-fatturazione-btn:hover {
    border-color: var(--bpt-primary);
    color: var(--bpt-primary);
}
.bpt-fatturazione-btn.open {
    border-style: solid;
    border-color: var(--bpt-primary);
    color: var(--bpt-primary);
}
#bptFatturazioneWrap {
    margin-bottom: 8px;
}

/* ============================================================
   CALENDARIO INLINE RICERCA — [bpt_cerca stile="auto/calendario"]
   ============================================================ */

/* ── Visibilità per stile ────────────────────────────────── */

/* auto: barra su desktop, calendario su mobile */
.bpt-cerca--auto .bpt-cerca-barra { display: block; }
.bpt-cerca--auto .bpt-cerca-cal   { display: none; }

/* barra: sempre barra (default) */
.bpt-cerca--barra .bpt-cerca-barra { display: block; }
.bpt-cerca--barra .bpt-cerca-cal   { display: none; }

/* calendario: sempre calendario */
.bpt-cerca--calendario .bpt-cerca-barra { display: none; }
.bpt-cerca--calendario .bpt-cerca-cal   { display: block; }

/* auto: sotto 700px mostra calendario, nascondi barra */
/* MOBILE: usa SEMPRE la stessa barra del desktop, non il calendario inline */
@media (max-width: 700px) {
    .bpt-cerca--auto .bpt-cerca-barra { display: block; }
    .bpt-cerca--auto .bpt-cerca-cal   { display: none; }
}

/* ── Calendario inline ───────────────────────────────────── */
.bpt-cerca-cal {
    background: var(--bpt-white);
    border: 1px solid var(--bpt-border);
    border-radius: var(--bpt-radius);
    padding: 18px 16px 20px;
    box-shadow: var(--bpt-shadow);
    max-width: 480px;
    margin: 0 auto;
}

/* Step CI/CO */
.bpt-cal-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    background: var(--bpt-bg);
    border-radius: var(--bpt-radius-sm);
    padding: 10px 12px;
}
.bpt-cal-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-radius: var(--bpt-radius-sm);
    padding: 6px 10px;
    cursor: default;
    transition: background .15s;
    border: 1.5px solid transparent;
}
.bpt-cal-step.active {
    background: var(--bpt-white);
    border-color: var(--bpt-primary);
}
.bpt-cal-step-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--bpt-text-light);
    text-transform: uppercase;
    letter-spacing: .4px;
}
.bpt-cal-step-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--bpt-text);
}
.bpt-cal-step.active .bpt-cal-step-val { color: var(--bpt-primary); }
.bpt-cal-step-sep {
    color: #ccc;
    font-size: 18px;
    flex-shrink: 0;
}

/* Nav mese */
.bpt-cal-inline-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.bpt-cal-inline-prev,
.bpt-cal-inline-next {
    background: none;
    border: 1px solid var(--bpt-border);
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 20px;
    color: var(--bpt-text);
    cursor: pointer;
    line-height: 1;
    transition: all .15s;
}
.bpt-cal-inline-prev:hover,
.bpt-cal-inline-next:hover {
    background: var(--bpt-primary);
    color: #fff;
    border-color: var(--bpt-primary);
}
.bpt-cal-inline-mese {
    font-size: 16px;
    font-weight: 700;
    color: var(--bpt-text);
}

/* Griglia giorni inline */
.bpt-cal-inline-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin-bottom: 16px;
}
.bpt-cal-inline-dow {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--bpt-text-light);
    padding: 5px 0;
    text-transform: uppercase;
}
.bpt-cal-inline-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all .12s;
    user-select: none;
}
.bpt-cal-inline-day.empty  { }
.bpt-cal-inline-day.past   { color: #ccc; }
.bpt-cal-inline-day.avail  {
    cursor: pointer;
    color: var(--bpt-text);
}
.bpt-cal-inline-day.avail:hover {
    background: var(--bpt-primary-light);
    color: var(--bpt-primary);
}
.bpt-cal-inline-day.today {
    font-weight: 800;
    color: var(--bpt-primary);
}
.bpt-cal-inline-day.today::after {
    content: '';
    position: absolute;
    bottom: 3px; left: 50%;
    transform: translateX(-50%);
    width: 4px; height: 4px;
    background: var(--bpt-primary);
    border-radius: 50%;
}
.bpt-cal-inline-day { position: relative; }
.bpt-cal-inline-day.sel-ci,
.bpt-cal-inline-day.sel-co {
    background: var(--bpt-primary) !important;
    color: #fff !important;
    font-weight: 700;
}
.bpt-cal-inline-day.sel-ci  { border-radius: 8px 0 0 8px; }
.bpt-cal-inline-day.sel-co  { border-radius: 0 8px 8px 0; }
.bpt-cal-inline-day.sel-ci.sel-co { border-radius: 8px; }
.bpt-cal-inline-day.in-range {
    background: var(--bpt-primary-light);
    color: var(--bpt-primary);
    border-radius: 0;
}

/* Ospiti inline */
.bpt-cal-inline-ospiti {
    margin-bottom: 14px;
}
.bpt-ospiti-widget--inline .bpt-ospiti-trigger {
    background: var(--bpt-bg);
    border-color: var(--bpt-border);
}

/* Bottone cerca calendario */
.bpt-btn-cerca--cal {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}
.bpt-btn-cerca--cal:disabled {
    background: #ccc;
    cursor: not-allowed;
}
.bpt-btn-cerca--cal.is-disabled {

    background: #ccc;
    cursor: not-allowed;
}

/* Swipe hint su mobile */
@media (max-width: 700px) {
    .bpt-cal-inline-grid {
        touch-action: pan-x pan-y;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ============================================================
   PAGINA OPERATORE — [bpt_operatore]
   Design: pannello gestionale pulito e professionale
   ============================================================ */

.bpto-wrap {
    --bpto-primary:  var(--bpt-primary, #27ae60);
    --bpto-border:   #e2e8f0;
    --bpto-bg:       #f8fafc;
    --bpto-text:     #1e293b;
    --bpto-muted:    #64748b;
    --bpto-white:    #ffffff;
    --bpto-radius:   10px;
    --bpto-shadow:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --bpto-shadow-md:0 4px 12px rgba(0,0,0,.1);

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--bpto-text);
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px 60px;
}

/* Login / no perm */
.bpto-not-found,
.bpt-op-login {
    padding: 40px;
    text-align: center;
    color: var(--bpto-muted);
    font-size: 15px;
}

/* ── Bottoni ─────────────────────────────────────────────── */
.bpto-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all .15s;
    line-height: 1;
    white-space: nowrap;
}
.bpto-btn-sm   { padding: 6px 12px; font-size: 12px; }
.bpto-btn-primary { background: var(--bpto-primary); color: #fff !important; }
.bpto-btn-primary:hover { opacity: .88; color: #fff !important; background: var(--bpto-primary); }
.bpto-btn-ghost   { background: var(--bpto-white); border: 1.5px solid var(--bpto-border); color: var(--bpto-muted); }
.bpto-btn-ghost:hover { border-color: var(--bpto-primary); color: var(--bpto-primary); }
.bpto-btn-wa      { background: #25d366; color: #fff; }
.bpto-btn-wa:hover { background: #1da851; color: #fff; }
.bpto-btn-email   { background: #3b82f6; color: #fff; }
.bpto-btn-email:hover { background: #2563eb; color: #fff; }
.bpto-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Badge stato */
.bpto-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2px;
    white-space: nowrap;
}

/* ── LISTA ────────────────────────────────────────────────── */

.bpto-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-top: 8px;
}
.bpto-page-title {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 4px;
    color: var(--bpto-text);
}
.bpto-page-sub {
    font-size: 13px;
    color: var(--bpto-muted);
    margin: 0;
}

/* Statistiche */
.bpto-stats-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.bpto-stat-card {
    background: var(--bpto-white);
    border: 1px solid var(--bpto-border);
    border-radius: var(--bpto-radius);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: var(--bpto-shadow);
}
.bpto-stat-n {
    font-size: 28px;
    font-weight: 800;
    color: var(--bpto-text);
    line-height: 1;
}
.bpto-stat-l {
    font-size: 12px;
    color: var(--bpto-muted);
    font-weight: 500;
}
.bpto-stat-warn .bpto-stat-n { color: #d97706; }
.bpto-stat-ok   .bpto-stat-n { color: var(--bpto-primary); }
.bpto-stat-info .bpto-stat-n { color: #3b82f6; }

/* Filtri */
.bpto-filters {
    margin-bottom: 16px;
}
.bpto-filters-inner {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    background: var(--bpto-white);
    border: 1px solid var(--bpto-border);
    border-radius: var(--bpto-radius);
    padding: 12px 14px;
    box-shadow: var(--bpto-shadow);
}
.bpto-filter-input {
    border: 1.5px solid var(--bpto-border);
    border-radius: 7px;
    padding: 8px 12px;
    font-size: 13px;
    font-family: inherit;
    color: var(--bpto-text);
    background: var(--bpto-bg);
    transition: border-color .15s;
    -webkit-appearance: none;
}
.bpto-filter-input:focus { border-color: var(--bpto-primary); outline: none; }
.bpto-filter-search { flex: 1; min-width: 180px; }

/* Lista prenotazioni */
.bpto-list-wrap {
    background: var(--bpto-white);
    border: 1px solid var(--bpto-border);
    border-radius: var(--bpto-radius);
    box-shadow: var(--bpto-shadow);
    overflow: hidden;
}
.bpto-list-header {
    padding: 12px 18px;
    border-bottom: 1px solid var(--bpto-border);
    background: var(--bpto-bg);
}
.bpto-list-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--bpto-muted);
    text-transform: uppercase;
    letter-spacing: .4px;
}

/* Riga singola */
.bpto-list-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--bpto-border);
    transition: background .12s;
}
.bpto-list-row:last-child { border-bottom: none; }
.bpto-list-row:hover { background: #f8fafc; }

.bpto-row-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bpto-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    opacity: .85;
}

.bpto-row-main {
    flex: 1;
    min-width: 0;
}
.bpto-row-nome {
    font-size: 14px;
    font-weight: 600;
    color: var(--bpto-text);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bpto-row-nome-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.bpto-row-nome-link:hover {
    color: var(--bpto-primary, #2563eb);
    text-decoration: underline;
}
.bpto-row-meta {
    font-size: 12px;
    color: var(--bpto-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.bpto-sep { opacity: .4; }
.bpto-rif-tag {
    font-family: monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--bpto-primary);
    background: #f0fdf4;
    padding: 1px 6px;
    border-radius: 4px;
}

.bpto-row-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.bpto-row-totale {
    font-size: 14px;
    font-weight: 700;
    color: var(--bpto-text);
    min-width: 70px;
    text-align: right;
}
.bpto-row-btns {
    display: flex;
    gap: 6px;
}

/* Empty state */
.bpto-empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--bpto-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.bpto-empty p { font-size: 14px; margin: 0; }

/* Paginazione */
.bpto-pagination {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 16px;
    justify-content: center;
}
.bpto-page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1.5px solid var(--bpto-border);
    background: var(--bpto-white);
    color: var(--bpto-muted);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s;
}
.bpto-page-btn:hover,
.bpto-page-btn.is-active {
    background: var(--bpto-primary);
    border-color: var(--bpto-primary);
    color: #fff;
}

/* ── DETTAGLIO ────────────────────────────────────────────── */

.bpto-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-top: 8px;
}
.bpto-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--bpto-muted);
    text-decoration: none;
    transition: color .15s;
}
.bpto-back-btn:hover { color: var(--bpto-primary); }
.bpto-detail-rif {
    display: flex;
    align-items: center;
    gap: 10px;
}
.bpto-rif-code {
    font-family: monospace;
    font-size: 16px;
    font-weight: 800;
    color: var(--bpto-primary);
}

/* Grid dettaglio */
.bpto-detail-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
}
.bpto-detail-side { position: sticky; top: 24px; }

/* Card */
.bpto-card {
    background: var(--bpto-white);
    border: 1px solid var(--bpto-border);
    border-radius: var(--bpto-radius);
    box-shadow: var(--bpto-shadow);
    margin-bottom: 16px;
    overflow: hidden;
}
.bpto-card:last-child { margin-bottom: 0; }
.bpto-card-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--bpto-border);
    background: var(--bpto-bg);
}
.bpto-card-head h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--bpto-muted);
    text-transform: uppercase;
    letter-spacing: .4px;
}
.bpto-card-head .bpto-card-sub {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}
.bpto-card-foot {
    padding: 12px 18px;
    border-top: 1px solid var(--bpto-border);
    background: var(--bpto-bg);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Info grid */
.bpto-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 4px 0;
}
.bpto-info-item {
    padding: 12px 18px;
    border-right: 1px solid var(--bpto-border);
    border-bottom: 1px solid var(--bpto-border);
}
.bpto-info-item:nth-child(3n) { border-right: none; }
.bpto-info-item:nth-last-child(-n+3) { border-bottom: none; }
.bpto-info-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--bpto-muted);
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 4px;
}
.bpto-info-value {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--bpto-text);
}
.bpto-info-sub {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}

/* Note ospite */
.bpto-note-ospite {
    padding: 12px 18px;
    border-top: 1px solid var(--bpto-border);
    background: #fffbeb;
}
.bpto-note-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #d97706;
    letter-spacing: .3px;
    display: block;
    margin-bottom: 4px;
}
.bpto-note-ospite p {
    margin: 0;
    font-size: 13px;
    color: #92400e;
    line-height: 1.5;
}

/* Guest card */
.bpto-guest-main {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
}
.bpto-guest-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bpto-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}
.bpto-guest-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.bpto-guest-info strong { font-size: 15px; font-weight: 700; }
.bpto-guest-info a,
.bpto-guest-info span { font-size: 13px; color: var(--bpto-muted); text-decoration: none; }
.bpto-guest-info a:hover { color: var(--bpto-primary); }
.bpto-guest-extra {
    padding: 12px 18px;
    border-top: 1px solid var(--bpto-border);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bpto-guest-extra div {
    font-size: 13px;
    color: var(--bpto-text);
}
.bpto-guest-extra span {
    font-size: 11px;
    font-weight: 600;
    color: var(--bpto-muted);
    text-transform: uppercase;
    margin-right: 6px;
}

/* Importi */
.bpto-importi { padding: 4px 0; }
.bpto-importo-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    border-bottom: 1px solid var(--bpto-border);
    font-size: 14px;
    color: var(--bpto-muted);
}
.bpto-importo-row:last-child { border-bottom: none; }
.bpto-importo-totale {
    font-weight: 700;
    font-size: 16px;
    color: var(--bpto-text);
    background: var(--bpto-bg);
}
.bpto-importo-acconto {
    font-weight: 700;
    color: var(--bpto-primary);
}
.bpto-importo-saldo {
    font-weight: 700;
    font-size: 15px;
    color: #92400e;
    background: #fffbeb;
    border-top: 1px dashed #fde68a;
}

/* Servizi */
.bpto-servizi-list { padding: 4px 0; }
.bpto-servizio-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--bpto-border);
    font-size: 13px;
}
.bpto-servizio-row:last-child { border-bottom: none; }
.bpto-srv-nome { flex: 1; font-weight: 600; color: var(--bpto-text); }
.bpto-srv-det  { color: var(--bpto-muted); font-size: 12px; }
.bpto-srv-tot  { font-weight: 700; color: var(--bpto-primary); min-width: 60px; text-align: right; }

/* Stati cambio */
.bpto-stati { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.bpto-stato-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1.5px solid var(--bpto-border);
    background: var(--bpto-bg);
    color: var(--bpto-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: all .15s;
}
.bpto-stato-btn:hover {
    border-color: var(--sc);
    color: var(--sc);
    background: var(--sb);
}
.bpto-stato-btn.is-active {
    border-color: var(--sc);
    background: var(--sb);
    color: var(--sc);
}
.bpto-stato-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Azioni */
.bpto-azioni {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bpto-azioni .bpto-btn { justify-content: center; }

/* Form email / note */
.bpto-field { padding: 12px 18px 0; }
.bpto-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--bpto-muted);
    text-transform: uppercase;
    letter-spacing: .3px;
    margin-bottom: 6px;
}
.bpto-field input {
    width: 100%;
    border: 1.5px solid var(--bpto-border);
    border-radius: 7px;
    padding: 9px 12px;
    font-size: 13px;
    font-family: inherit;
    color: var(--bpto-text);
    background: var(--bpto-bg);
    box-sizing: border-box;
}
.bpto-field input:focus { border-color: var(--bpto-primary); outline: none; }
.bpto-textarea {
    width: 100%;
    border: 1.5px solid var(--bpto-border);
    border-radius: 7px;
    padding: 9px 12px;
    font-size: 13px;
    font-family: inherit;
    color: var(--bpto-text);
    background: var(--bpto-bg);
    resize: vertical;
    box-sizing: border-box;
    display: block;
}
.bpto-textarea:focus { border-color: var(--bpto-primary); outline: none; }
/* textarea dentro card senza field wrapper */
.bpto-card > .bpto-textarea {
    margin: 12px 18px 0;
    width: calc(100% - 36px);
}

/* Feedback */
.bpto-feedback { font-size: 12px; }
.bpto-ok  { color: var(--bpto-primary); }
.bpto-err { color: #dc2626; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 860px) {
    .bpto-detail-grid { grid-template-columns: 1fr; }
    .bpto-detail-side { position: static; }
    .bpto-stats-row   { grid-template-columns: repeat(2,1fr); }
    .bpto-info-grid   { grid-template-columns: repeat(2,1fr); }
    .bpto-info-item:nth-child(2n) { border-right: none; }
    .bpto-info-item:nth-child(3n) { border-right: 1px solid var(--bpto-border); }
    .bpto-row-totale  { display: none; }
}
@media (max-width: 580px) {
    .bpto-stats-row   { grid-template-columns: repeat(2,1fr); }
    .bpto-info-grid   { grid-template-columns: 1fr; }
    .bpto-info-item   { border-right: none !important; }
    .bpto-list-row    { flex-wrap: wrap; }
    .bpto-row-right   { width: 100%; justify-content: flex-end; }
    .bpto-filters-inner { flex-direction: column; }
    .bpto-filter-input  { width: 100%; }
}

/* ── Stampa ──────────────────────────────────────────────── */
@media print {
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

    .bpto-no-print,
    .bpto-back-btn,
    .bpto-filters,
    .bpto-stats-row,
    .bpto-tabs { display: none !important; }
    /* Nascondi pulsante Disponibilità su mobile */
    .bpto-disponibilita-btn, [class*="disponibilita"] { display: none !important; }

    /* Layout stampa: due colonne affiancate */
    .bpto-detail-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    .bpto-detail-main { order: 1; }
    .bpto-detail-side { order: 2; position: static !important; }

    /* Font e spaziatura ridotti per stare in una pagina */
    .bpto-wrap { padding: 0 !important; font-size: 11px !important; }
    .bpto-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        margin-bottom: 6px !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .bpto-card-head { padding: 6px 10px !important; }
    .bpto-card-head h3 { font-size: 10px !important; }
    .bpto-info-grid { grid-template-columns: repeat(3,1fr) !important; }
    .bpto-info-item { padding: 5px 8px !important; }
    .bpto-info-label { font-size: 9px !important; }
    .bpto-info-value { font-size: 11px !important; }
    .bpto-info-sub   { font-size: 9px !important; }
    .bpto-importo-row { padding: 5px 10px !important; font-size: 11px !important; }
    .bpto-guest-main { padding: 8px 10px !important; }
    .bpto-guest-avatar { width: 32px !important; height: 32px !important; font-size: 11px !important; }
    .bpto-guest-info strong { font-size: 12px !important; }
    .bpto-guest-info a,
    .bpto-guest-info span { font-size: 11px !important; }
    .bpto-guest-extra { padding: 6px 10px !important; font-size: 10px !important; }
    .bpto-note-ospite { padding: 6px 10px !important; font-size: 10px !important; }
    .bpto-detail-header { margin-bottom: 8px !important; }
    .bpto-rif-code { font-size: 13px !important; }

    /* Header di stampa */
    .bpto-detail-header::after {
        content: 'Stampato il <?php echo date("d/m/Y"); ?>';
        font-size: 10px;
        color: #999;
    }
}

/* QR inline nella testata card ────────────────────────── */
.bpto-card-head-with-qr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.bpto-qr-inline {
    border-radius: 6px;
    border: 1px solid var(--bpto-border);
    background: #fff;
    flex-shrink: 0;
    display: block;
}

@media print {
    .bpto-qr-inline {
        width: 56px !important;
        height: 56px !important;
    }
}

/* ============================================================
   CALENDARIO OPERATORE
   ============================================================ */

/* Tab navigation */
.bpto-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--bpto-border);
    padding-bottom: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
}
.bpto-tabs::-webkit-scrollbar { display: none; }
.bpto-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--bpto-muted);
    text-decoration: none;
    border-radius: 8px 8px 0 0;
    border: 1px solid transparent;
    border-bottom: none;
    transition: all .15s;
    margin-bottom: -2px;
}
.bpto-tab:hover { color: var(--bpto-primary); background: var(--bpto-bg); }
.bpto-tab.active {
    color: var(--bpto-primary);
    background: var(--bpto-white);
    border-color: var(--bpto-border);
    border-bottom-color: var(--bpto-white);
}

/* Wrapper calendario */
.bpto-cal-wrap { }

.bpto-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}
.bpto-cal-nav-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}
.bpto-cal-periodo {
    font-size: 17px;
    font-weight: 700;
    color: var(--bpto-text);
    min-width: 260px;
    width: 260px;
    text-align: center;
    display: inline-block;
}
.bpto-cal-vista-btns {
    display: flex;
    gap: 2px;
    background: var(--bpto-bg);
    border: 1px solid var(--bpto-border);
    border-radius: 8px;
    padding: 3px;
}
.bpto-cal-vista-btn {
    padding: 6px 16px;
    border-radius: 6px;
    border: none;
    background: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--bpto-muted);
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
.bpto-cal-vista-btn.active {
    background: var(--bpto-white);
    color: var(--bpto-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

/* Loading */
.bpto-cal-loading {
    text-align: center;
    padding: 48px;
    color: var(--bpto-muted);
    font-size: 14px;
}

/* Tabella calendario */
.bpto-cal-table-wrap {
    overflow-x: auto;
    border-radius: var(--bpto-radius);
    border: 1px solid var(--bpto-border);
    box-shadow: var(--bpto-shadow);
    background: var(--bpto-white);
    width: 100%;
    cursor: grab;
}
.bpto-cal-table-wrap.bpto-cal-panning {
    cursor: grabbing !important;
    user-select: none;
}
.bpto-cal-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 600px;
    table-layout: fixed;
}
.bpto-cal-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}
.bpto-cal-table tfoot {
    position: sticky;
    bottom: 0;
    z-index: 10;
}
.bpto-cal-table tfoot th {
    border-top: 2px solid var(--bpto-border);
}
.bpto-cal-th-room {
    width: 110px;
    min-width: 90px;
    background: var(--bpto-bg);
    border-right: 2px solid var(--bpto-border);
    border-bottom: 2px solid var(--bpto-border);
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--bpto-muted);
    text-align: left;
    position: sticky;
    left: 0;
    z-index: 20;
}
.bpto-cal-th-day {
    background: var(--bpto-bg);
    border-bottom: 2px solid var(--bpto-border);
    border-right: 1px solid var(--bpto-border);
    padding: 4px 2px;
    text-align: center;
    min-width: 32px;
    width: 32px;
}
.bpto-cal-th-day.bpto-cal-weekend { background: #f8f4ff; }
.bpto-cal-th-day.bpto-cal-oggi { background: #ecfdf5; }
.bpto-cal-th-day.bpto-cal-mese-inizio { border-left: 3px solid var(--bpto-primary, #27ae60); }
.bpto-cal-dow {
    display: block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--bpto-muted);
    letter-spacing: .3px;
}
.bpto-cal-daynum {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--bpto-text);
    line-height: 1.2;
}
.bpto-cal-oggi .bpto-cal-daynum { color: var(--bpto-primary); }

/* Celle corpo */
.bpto-cal-td-room {
    background: var(--bpto-bg);
    border-right: 2px solid var(--bpto-border);
    border-bottom: 1px solid var(--bpto-border);
    padding: 6px 10px;
    position: sticky;
    left: 0;
    z-index: 5;
}
.bpto-cal-room-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--bpto-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 105px;
}
.bpto-cal-td-free {
    border-right: 1px solid var(--bpto-border);
    border-bottom: 1px solid var(--bpto-border);
    height: 28px;
    cursor: pointer;
    transition: background .1s;
    position: relative;
}
.bpto-cal-td-free:hover { background: #ecfdf5 !important; }
.bpto-cal-td-free.bpto-cal-weekend { background: #fdf8ff; }
.bpto-cal-td-free.bpto-cal-oggi { background: #f0fdf4; }

.bpto-cal-goto-highlight {
    box-shadow: inset 0 0 0 3px #f59e0b, 0 0 8px rgba(245,158,11,.7);
    z-index: 2;
    animation: bptoGotoPulse 1.2s ease-in-out 2;
}
@keyframes bptoGotoPulse {
    0%, 100% { box-shadow: inset 0 0 0 3px #f59e0b, 0 0 8px rgba(245,158,11,.7); }
    50%      { box-shadow: inset 0 0 0 3px #fbbf24, 0 0 14px rgba(245,158,11,.95); }
}

.bpto-cal-td-occ {
    border-right: 1px solid rgba(0,0,0,.06);
    border-bottom: 1px solid var(--bpto-border);
    height: 28px;
    cursor: pointer;
    position: relative;
    border-left: 3px solid transparent;
    transition: filter .1s;
    overflow: hidden;
}
.bpto-cal-td-occ:hover { filter: brightness(.94); }
.bpto-cal-ci { border-left-width: 3px; border-radius: 4px 0 0 4px; }
.bpto-cal-co { border-radius: 0 4px 4px 0; }
.bpto-cal-ciCO { border-radius: 4px; }

.bpto-cal-occ-label {
    display: none;
}

/* Vista settimanale — celle più alte */
.bpto-cal-sett .bpto-cal-td-free,
.bpto-cal-sett .bpto-cal-td-occ { height: 52px; }
.bpto-cal-table-sett .bpto-cal-th-day { min-width: 80px; }

/* Righe separatore sezioni nel calendario — non devono alterare table-layout:fixed */
.bpto-cal-section-header {
    height: 24px;
    line-height: 24px;
}
.bpto-cal-section-header td {
    padding: 3px 8px !important;
    height: 24px !important;
    line-height: 24px !important;
    font-size: 11px;
    overflow: hidden;
    white-space: nowrap;
    /* Evita che il colspan ricalcoli le larghezze */
    max-height: 24px;
}
.bpto-cal-sett .bpto-cal-occ-label { line-height: 48px; font-size: 12px; }

/* Legenda */
.bpto-cal-legenda {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
    font-size: 12px;
    color: var(--bpto-muted);
}
.bpto-cal-leg-item { display: flex; align-items: center; gap: 5px; }
.bpto-cal-leg-dot  {
    width: 32px; height: 32px;
    border-radius: 6px;
    border-left: 7px solid transparent;
    display: inline-block;
    flex-shrink: 0;
}

/* ── Tooltip ──────────────────────────────────────────── */
.bpto-tooltip {
    position: absolute;
    z-index: 99999;
    background: #1e293b;
    color: #fff;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12px;
    line-height: 1.6;
    max-width: 220px;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.bpto-tt-nome { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.bpto-tt-row  { color: #94a3b8; }
.bpto-tt-stato { font-weight: 700; margin-top: 4px; }

/* ── Modal ────────────────────────────────────────────── */
.bpto-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.5);
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.bpto-modal {
    background: var(--bpto-white);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: bptoModalIn .18s ease;
}
@keyframes bptoModalIn {
    from { opacity:0; transform:scale(.96) translateY(-8px); }
    to   { opacity:1; transform:scale(1)   translateY(0); }
}
.bpto-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--bpto-border);
    position: sticky;
    top: 0;
    background: var(--bpto-white);
    z-index: 1;
}
.bpto-modal-header h3 { margin: 0; font-size: 16px; font-weight: 700; }
.bpto-modal-close {
    background: none; border: none;
    font-size: 20px; color: var(--bpto-muted);
    cursor: pointer; line-height: 1; padding: 4px;
    transition: color .15s;
}
.bpto-modal-close:hover { color: var(--bpto-text); }
.bpto-modal-body { padding: 20px 22px; }
.bpto-modal-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--bpto-border);
}

/* Campi nel modal */
.bpto-mfield {
    margin-bottom: 14px;
}
.bpto-mfield label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: var(--bpto-muted);
    margin-bottom: 5px;
}
.bpto-mfield input,
.bpto-mfield select,
.bpto-mfield textarea {
    width: 100%;
    border: 1.5px solid var(--bpto-border);
    border-radius: 7px;
    padding: 9px 12px;
    font-size: 13px;
    font-family: inherit;
    color: var(--bpto-text);
    background: var(--bpto-bg);
    box-sizing: border-box;
    transition: border-color .15s;
}
.bpto-mfield input:focus,
.bpto-mfield select:focus,
.bpto-mfield textarea:focus {
    border-color: var(--bpto-primary);
    outline: none;
}
.bpto-mfield textarea { resize: vertical; min-height: 60px; }
.bpto-mfield-hint {
    font-size: 12px;
    color: var(--bpto-muted);
    font-style: italic;
    padding: 6px 0;
    margin-bottom: 0;
}
.bpto-mrow2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Responsive */
@media (max-width: 600px) {
    .bpto-cal-header { flex-direction: column; align-items: stretch; }
    .bpto-cal-nav-btns { justify-content: center; }
    .bpto-cal-periodo { min-width: unset; }
    .bpto-mrow2 { grid-template-columns: 1fr; }
    .bpto-modal { max-width: 100%; border-radius: 12px 12px 0 0; }
    .bpto-modal-overlay { align-items: flex-end; padding: 0; }
    .bpto-modal-foot { padding-bottom: 68px !important; }
}

@media print {
    .bpto-cal-wrap { display: none; }
}
/* ── Controlli destra header calendario ─────────────────── */
.bpto-cal-right-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Vista annuale: tabella full-width ───────────────────── */
.bpto-cal-anno-block {
    background: var(--bpto-white);
    border: 1px solid var(--bpto-border);
    border-radius: var(--bpto-radius);
    box-shadow: var(--bpto-shadow);
    overflow: hidden;
}
.bpto-cal-anno-block-title {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    color: var(--bpto-white);
    background: #1e293b;
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.bpto-cal-anno-block-tipo {
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: .3px;
}
.bpto-cal-anno-block-anno {
    margin-left: auto;
    font-size: 12px;
    color: #64748b;
    font-weight: 400;
}
.bpto-cal-anno-table-wrap {
    overflow-x: auto;
    width: 100%;
}
.bpto-cal-anno-table {
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed;
}
.bpto-cal-anno-th-mese {
    width: 52px;
    min-width: 52px;
    background: var(--bpto-bg);
    border-bottom: 2px solid var(--bpto-border);
    border-right: 2px solid var(--bpto-border);
}
.bpto-cal-anno-th-day {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--bpto-muted);
    padding: 8px 2px;
    background: var(--bpto-bg);
    border-bottom: 2px solid var(--bpto-border);
    border-right: 1px solid var(--bpto-border);
}
.bpto-cal-anno-td-mese {
    font-size: 12px;
    font-weight: 700;
    color: var(--bpto-muted);
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 0 10px;
    text-align: right;
    background: var(--bpto-bg);
    border-right: 2px solid var(--bpto-border);
    border-bottom: 1px solid var(--bpto-border);
    white-space: nowrap;
    vertical-align: middle;
    min-width: 52px;
}
.bpto-cal-anno-td {
    height: 36px;
    border-right: 1px solid rgba(0,0,0,.07);
    border-bottom: 1px solid var(--bpto-border);
    cursor: pointer;
    transition: filter .1s, background .1s;
    position: relative;
    padding: 0 2px;
    vertical-align: middle;
    overflow: hidden;
}
.bpto-cal-anno-td.bpto-cal-td-free:hover  { background: #ecfdf5 !important; }
.bpto-cal-anno-td.bpto-cal-td-occ:hover   { filter: brightness(.88); }
.bpto-cal-anno-td.bpto-cal-anno-we.bpto-cal-td-free { background: #fdf8ff; }
.bpto-cal-anno-td-vuoto {
    background: #f1f5f9;
    border-right: 1px solid rgba(0,0,0,.05);
    border-bottom: 1px solid var(--bpto-border);
}
.bpto-cal-anno-td.bpto-cal-oggi-a {
    outline: 2px solid var(--bpto-primary);
    outline-offset: -2px;
    z-index: 2;
}
.bpto-cal-anno-td.bpto-cal-ci-a {
    border-left: 3px solid var(--bc, #27ae60) !important;
    border-radius: 3px 0 0 3px;
}
.bpto-cal-anno-td.bpto-cal-co-a {
    border-right: 3px solid var(--bc, #27ae60) !important;
    border-radius: 0 3px 3px 0;
}
.bpto-cal-nome-ci {
    display: block;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 3px;
    line-height: 36px;
    color: inherit;
    opacity: .8;
}
.bpto-cal-anno-block tbody tr:last-child .bpto-cal-anno-td,
.bpto-cal-anno-block tbody tr:last-child .bpto-cal-anno-td-mese,
.bpto-cal-anno-block tbody tr:last-child .bpto-cal-anno-td-vuoto { border-bottom: none; }

/* ============================================================
   WIDGET DISPONIBILITÀ RAPIDA
   ============================================================ */

/* Bottone trigger fisso */
.bpto-disp-trigger {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9990;
    background: var(--bpto-primary);
    color: #fff;
    border: none;
    border-radius: 10px 0 0 10px;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: -2px 0 12px rgba(0,0,0,.15);
    transition: background .15s, padding .15s;
    font-family: inherit;
}
.bpto-disp-trigger:hover { background: var(--bpto-secondary); padding-right: 16px; }
.bpto-disp-trigger span {
    font-size: 10px;
    font-weight: 700;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: .5px;
}

/* Overlay */
.bpto-disp-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.3);
    z-index: 9991;
}
.bpto-disp-overlay.open { display: block; }

/* Pannello laterale */
.bpto-disp-panel {
    position: fixed;
    right: -400px;
    top: 0;
    width: 360px;
    height: 100vh;
    background: var(--bpto-white);
    z-index: 9992;
    box-shadow: -4px 0 24px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
    transition: right .25s cubic-bezier(.4,0,.2,1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.bpto-disp-panel.open { right: 0; }

/* Header pannello */
.bpto-disp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--bpto-border);
    background: #1e293b;
    color: #fff;
    flex-shrink: 0;
}
.bpto-disp-header strong { font-size: 14px; font-weight: 700; }
.bpto-disp-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
    transition: color .15s;
}
.bpto-disp-close:hover { color: #fff; }

/* Body scrollabile */
.bpto-disp-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* Form */
.bpto-disp-form { margin-bottom: 16px; }
.bpto-disp-row2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}
.bpto-disp-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: var(--bpto-muted);
    margin-bottom: 4px;
}
.bpto-disp-field input {
    width: 100%;
    border: 1.5px solid var(--bpto-border);
    border-radius: 7px;
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
    color: var(--bpto-text);
    background: var(--bpto-bg);
    box-sizing: border-box;
    transition: border-color .15s;
}
.bpto-disp-field input:focus { border-color: var(--bpto-primary); outline: none; }

/* Risultati */
.bpto-disp-loading,
.bpto-disp-empty {
    text-align: center;
    padding: 24px 0;
    font-size: 13px;
    color: var(--bpto-muted);
}
.bpto-disp-err {
    font-size: 13px;
    color: #dc2626;
    padding: 8px 0;
}
.bpto-disp-sommario {
    font-size: 12px;
    color: var(--bpto-muted);
    padding: 8px 0 12px;
    border-bottom: 1px solid var(--bpto-border);
    margin-bottom: 12px;
}
.bpto-disp-sommario strong { color: var(--bpto-primary); font-size: 14px; }

.bpto-disp-sezione-occ {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--bpto-muted);
    padding: 12px 0 8px;
    border-top: 1px solid var(--bpto-border);
    margin-top: 8px;
}

/* Card alloggio */
.bpto-disp-card {
    border: 1px solid var(--bpto-border);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
}
.bpto-disp-card--free {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.bpto-disp-card--occ {
    background: var(--bpto-bg);
    opacity: .7;
}
.bpto-disp-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.bpto-disp-card-nome {
    font-size: 14px;
    font-weight: 700;
    color: var(--bpto-text);
}
.bpto-disp-card-tipo {
    font-size: 11px;
    color: var(--bpto-muted);
    margin-top: 2px;
}
.bpto-disp-card-ospite {
    font-size: 11px;
    color: #dc2626;
    margin-top: 4px;
}
.bpto-disp-card-prezzo {
    text-align: right;
    flex-shrink: 0;
}
.bpto-disp-prezzo-tot {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: var(--bpto-primary);
}
.bpto-disp-prezzo-notte {
    display: block;
    font-size: 10px;
    color: var(--bpto-muted);
    margin-top: 1px;
}

@media (max-width: 480px) {
    .bpto-disp-panel { width: 100%; right: -100%; }
}
@media print {
    .bpto-disp-trigger,
    .bpto-disp-panel,
    .bpto-disp-overlay { display: none !important; }
}

/* Link "Aggiungi servizi" → pagina servizi */
.bpt-servizi-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed var(--bpt-primary);
    transition: color .15s;
}
.bpt-servizi-link:hover { color: var(--bpt-primary); }
/* ── Widget ospiti per camera ────────────────────────────── */

/* Blocco singola camera — separato da linea sottile */
.bpt-camera-block {
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px dashed var(--bpt-border);
}
.bpt-camera-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Titolo camera (es. "Alloggio 1") */
.bpt-camera-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--bpt-primary);
    padding: 4px 0 8px;
}
.bpt-remove-camera {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 13px;
    padding: 0;
    line-height: 1;
    transition: color .15s;
}
.bpt-remove-camera:hover { color: #dc2626; }

/* Pulsante aggiungi camera */
.bpt-add-camera-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 8px 12px;
    background: none;
    border: 1.5px dashed var(--bpt-border);
    border-radius: 7px;
    color: var(--bpt-primary);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all .15s;
    text-align: center;
}
.bpt-add-camera-btn:hover {
    border-color: var(--bpt-primary);
    background: var(--bpt-primary-light);
}

/* ════════════════════════════════════════════════════════════
   MOBILE — Barra di ricerca responsive (stesso flusso desktop)
   ════════════════════════════════════════════════════════════ */
@media (max-width: 700px) {
    .bpt-cerca-barra {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }
    .bpt-cerca-barra .bpt-cerca-field {
        width: 100%;
        flex: none;
    }
    .bpt-cerca-barra .bpt-btn-cerca {
        width: 100%;
        padding: 14px;
        font-size: 15px;
    }
}
@media (max-width: 700px) {
    .bpt-archive-wrap {
        padding-top: 20px !important;
    }
}
/* Date picker nel modal operatore — assicura visibilità */
/* Campi date nella pagina singola alloggio */
#bpt_ci, #bpt_co {
    display: block !important;
    opacity: 1 !important;
    position: static !important;
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1.5px solid var(--bpt-border, #e5e7eb) !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    background: #fff !important;
    cursor: pointer !important;
    color: #1f2937 !important;
    box-sizing: border-box !important;
    -webkit-appearance: auto !important;
    appearance: auto !important;
}
#bpt_ci:focus, #bpt_co:focus {
    border-color: var(--bpt-primary, #27ae60) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px var(--bpt-primary-light, #27ae6022) !important;
}

.bpto-modal input[type="date"] {
    display: block !important;
    opacity: 1 !important;
    position: static !important;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}
