/* Variabili di colore (valori di default, sovrascrivibili da inline style) */
:root {
    --lp-primary: #003580;   /* Colore principale (header, hero) */
    --lp-accent:  #ffb700;   /* Colore evidenza (barra ricerca, pulsanti) */
    --lp-bg:      #F8F8F8;   /* Sfondo generico frontend */
}

/* Layout generale */
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--lp-bg);
    color: #111;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
}

.lp-header {
    color: #111;
}

.lp-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.lp-logo-placeholder {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    border: 1px dashed rgba(255,255,255,0.6);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

.lp-main-nav {
    display: flex;
    gap: 1rem;
}

.lp-nav-link {
    color: #111;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
}

.lp-nav-link:hover,
.lp-nav-link.active {
    background-color: rgba(255,255,255,0.15);
    color: #111;
}

.lp-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.lp-hero {
    /* Grigio di sfondo semitrasparente sopra l'immagine */
    background: rgba(248, 248, 248, 0.6);
    color: #111;
    width: fit-content;
    margin: auto;
    margin-top: auto;   /* centra verticalmente il blocco all'interno di lp-main */
    margin-bottom: auto;
    padding: 3rem;
    border-radius: 2rem;
}

.lp-hero-title {
    font-size: 2.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--lp-primary);
}

.lp-hero-title span {
    color: var(--lp-accent);
}

.lp-hero-subtitle {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 0;
}

/* Barra di ricerca stile booking, centrata sotto il testo */
.lp-search-bar-wrapper {
    margin-top: 1.5rem;
}

.lp-search-bar {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 2.1fr) minmax(0, 2.3fr) auto;
    gap: 0;
    background-color: var(--lp-accent);
    border-radius: 12px;
    padding: 0.2rem;
    box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}

.lp-search-field {
    background-color: #fff;
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border-right: 1px solid #ffcf55;
}

.lp-search-field:last-of-type {
    border-right: none;
}

.lp-field-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #555;
    margin-bottom: 0.2rem;
}

.lp-field-help {
    font-size: 0.7rem;
    color: #777;
    margin-top: 0.2rem;
}

.lp-search-field select,
.lp-search-field input[type="date"],
.lp-search-field .lp-date-input-group .form-control {
    font-size: 0.9rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.lp-search-field select:disabled,
.lp-search-field input:disabled {
    background-color: #f3f3f3;
    cursor: not-allowed;
}

/* Dropdown personalizzato per strutture (con immagini) */
.lp-structure-dropdown {
    position: relative;
}

.lp-structure-dropdown-toggle {
    width: 100%;
    min-height: 2.875rem; /* allineato a date e persone */
    border-radius: 4px;
    border: 1px solid #ced4da;
    background-color: #fff;
    padding: 0.3rem 0.55rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.lp-structure-dropdown-toggle:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

.lp-structure-dropdown-thumb-wrapper {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    overflow: hidden;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lp-structure-dropdown-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lp-structure-dropdown-text {
    display: flex;
    flex-direction: column;
    margin-left: 0.5rem;
    margin-right: auto;
}

.lp-structure-dropdown-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6c757d;
}

.lp-structure-dropdown-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.lp-structure-dropdown-caret {
    font-size: 0.7rem;
    color: #555;
    margin-left: 0.5rem;
}

.lp-structure-dropdown-menu {
    position: absolute;
    z-index: 20;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.15rem;
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid #ced4da;
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
    max-height: 260px;
    overflow-y: auto;
}

.lp-structure-option {
    width: 100%;
    border: none;
    background: #fff;
    padding: 0.35rem 0.55rem;
    display: flex;
    align-items: center;
    text-align: left;
    cursor: pointer;
}

.lp-structure-option:hover {
    background-color: #f1f5ff;
}

.lp-structure-option-thumb-wrapper {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    overflow: hidden;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lp-structure-option-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lp-structure-option-thumb-placeholder {
    width: 70%;
    height: 70%;
    border-radius: 4px;
    background: linear-gradient(135deg, #dee2e6, #ced4da);
}

.lp-structure-option-name {
    margin-left: 0.55rem;
    font-size: 0.9rem;
    color: #333;
    font-weight: 500;
}

.lp-structure-option-empty {
    padding: 0.5rem 0.55rem;
    font-size: 0.8rem;
    color: #777;
}

.lp-dates-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.lp-date-input-group {
    flex: 1;
    min-width: 0;
}

.lp-date-input-group .form-control {
    min-height: 3.2rem;
    box-sizing: border-box;
}

.lp-date-input-group .input-group-text {
    cursor: pointer;
    background-color: #fff;
}

/* Calendario bootstrap-datepicker sopra hero / barra ricerca */
.datepicker {
    z-index: 1080 !important;
}

.lp-dates-separator {
    font-size: 0.9rem;
    color: #666;
}

/* Persone */
.lp-guests-summary-btn {
    width: 100%;
    min-height: 2.875rem; /* allineato a struttura e date */
    border-radius: 4px;
    border: 1px solid #ced4da;
    background-color: #fff;
    padding: 0.35rem 0.6rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lp-guests-summary-btn:disabled {
    background-color: #f3f3f3;
    color: #8a8a8a;
    cursor: not-allowed;
}

.lp-guests-summary-main {
    font-size: 0.9rem;
}

.lp-guests-summary-sub {
    font-size: 0.7rem;
    color: #777;
}

/* Pannello ospiti (aperto al click su "Persone") */
.lp-search-guests {
    position: relative;
}

.lp-guests-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.25rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    z-index: 20;
}

.lp-guests-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.lp-guests-row:last-child {
    margin-bottom: 0;
}

.lp-guests-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

.lp-guests-note {
    font-size: 0.75rem;
    color: #777;
    margin-top: 0.1rem;
}

.lp-guests-counter {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.lp-guests-counter .form-control {
    width: 3.5rem;
    text-align: center;
}

.lp-guests-counter .lp-guests-adults-count,
.lp-guests-children-row .lp-guests-children-count {
    min-width: 1.5rem;
    text-align: center;
    font-weight: 600;
}

.lp-guests-animals-row {
    align-items: center;
}

.lp-guests-animals-label-wrap {
    flex: 1;
}

.lp-guests-animals-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lp-search-action {
    display: flex;
    align-items: stretch;
}

.lp-search-btn {
    border-radius: 10px;
    padding: 0 1.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

.lp-search-btn:disabled {
    background-color: #1f5fb8;
    border-color: #1f5fb8;
    opacity: 0.65;
    cursor: not-allowed;
}

/* Responsività */
@media (max-width: 991.98px) {
    .lp-search-bar {
        grid-template-columns: 1fr;
        row-gap: 0.25rem;
    }

    .lp-search-field {
        border-right: none;
    }

    .lp-search-action {
        justify-content: flex-end;
        padding: 0.25rem;
    }

    .lp-search-btn {
        width: 100%;
    }
}

/* Contatti: titolo e sottotitolo dentro lp-hero (stesso box centrato dell'index) */
.lp-contacts-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--lp-primary);
    text-align: center;
}

.lp-contacts-subtitle {
    font-size: 0.98rem;
    max-width: 640px;
    line-height: 1.5;
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Contenuto form + mappa dentro il box contatti (stesso lp-hero dell'index) */
.lp-contacts-content {
    margin-top: 2rem;
}

.lp-contact-card {
    border: none;
}

.lp-contact-map-card .card-body {
    display: flex;
    flex-direction: column;
}

.lp-map-placeholder {
    border-radius: 12px;
    background: #e3f2fd;
    position: relative;
    height: 260px;
    overflow: hidden;
}

.lp-map-iframe {
    width: 100%;
    height: 100%;
}

.lp-map-logo {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 0.25rem 0.6rem;
    background: rgba(0,53,128,0.9);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 4px;
    letter-spacing: 0.06em;
    text-decoration: none;
}

/* Lista aree disponibili (choose_object = N) */
.lp-areas-list {
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.lp-areas-list-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--lp-primary);
    margin: 0 0 0.35rem 0;
}

.lp-areas-list-intro {
    font-size: 0.85rem;
    color: #555;
    margin: 0 0 1rem 0;
}

.lp-areas-list-inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lp-area-card {
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
    background-color: #fafafa;
}

/* Intestazione area: immagine/SVG a sinistra, titolo + descrizione a destra */
.lp-area-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background-color: #fff;
    border-bottom: 1px solid #eee;
}

.lp-area-card-header-text {
    flex: 1;
    min-width: 0;    
    border-left: 1px solid #dee2e6;
    padding-left: 20px;
}

.lp-area-card-image {
    flex-shrink: 0;
    width: 300px;
    height: 210px;
    min-width: 300px;
    min-height: 210px;
    background-color: #e9ecef;
    overflow: hidden;
    border-radius: 4px;
}

.lp-area-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lp-area-card-image .lp-area-map-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.lp-area-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--lp-primary);
    margin: 0;
    letter-spacing: 0.02em;
    border-bottom: 3px solid var(--lp-primary);
    padding-bottom: 10px;
    margin-bottom: 10px;
}

/* Descrizione area (sotto il titolo, dentro l'header) */
.lp-area-card-description {
    margin-top: 0.35rem;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

.lp-area-card-body {
    padding: 0 1.25rem 1rem 1.25rem;
}

/* Tabella tipi oggetto per area: layout fisso per evitare spostamento colonne quando compaiono le età bambini */
.lp-area-object-types {
    margin: 0;
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    table-layout: fixed;
}

.lp-area-object-types .lp-col-type { width: 18%; }
.lp-area-object-types .lp-col-occupancy { width: 12%; }
.lp-area-object-types .lp-col-adults { width: 10%; }
.lp-area-object-types .lp-col-children { width: 24%; }
.lp-area-object-types .lp-col-price-base,
.lp-area-object-types .lp-col-price-reduced { width: 12%; }
.lp-area-object-types .lp-col-price-total { width: 12%; }

.lp-area-object-types thead th {
    font-weight: 600;
    color: #555;
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
}

.lp-area-object-types tbody td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    background-color: #fff;
}

/* Allineamento in alto solo quando la riga ha bambini (età espansa) */
.lp-area-object-types tbody tr:has(.lp-area-row-children-ages) td {
    vertical-align: top;
}

.lp-area-object-types tbody tr:last-child td {
    border-bottom: none;
}

/* Cella Tipologia: td resta cella di tabella così l'altezza segue la riga; flex solo sul contenuto interno */
.lp-area-cell-type {
    background-color: #fff;
}

.lp-area-cell-type-inner {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.lp-area-object-types tbody tr:has(.lp-area-row-children-ages) .lp-area-cell-type-inner {
    align-items: flex-start;
}

.lp-area-object-type-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.lp-area-object-type-svg {
    width: 28px;
    height: 28px;
    display: block;
}

.lp-area-object-type-name {
    font-weight: 600;
    color: #333;
}

.lp-area-cell-occupancy {
    font-size: 0.85rem;
    color: #555;
}

.lp-area-cell-occupancy .lp-area-occupancy-min,
.lp-area-cell-occupancy .lp-area-occupancy-max {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    margin-right: 0.5rem;
}

.lp-area-cell-occupancy i {
    color: var(--lp-primary);
}

.lp-area-occupancy-select {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.lp-area-occupancy-select .btn {
    padding: 0.15rem 0.4rem;
    min-width: 28px;
}

.lp-area-occupancy-select .lp-area-adults-count,
.lp-area-occupancy-select .lp-area-children-count {
    min-width: 1.5rem;
    text-align: center;
    font-weight: 600;
}

/* Età bambini per riga (tipologia oggetto): contenuto in larghezza fissa per evitare spostamenti */
.lp-area-cell-children {
    vertical-align: top;
    width: 24%;
    min-width: 0;
}

.lp-area-cell-children .lp-area-row-children-ages {
    min-width: 0;
}

.lp-area-row-children-ages {
    margin-top: 0.5rem;
    padding-top: 0.4rem;
    border-top: 1px solid #eee;
}

.lp-area-row-child-age {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
}

.lp-area-row-child-age:last-child {
    margin-bottom: 0;
}

.lp-area-row-child-age-label {
    color: #555;
    min-width: 100px;
}

.lp-area-row-child-age .form-select {
    width: auto;
    min-width: 70px;
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
}

.lp-area-cell-price-base,
.lp-area-cell-price-reduced,
.lp-area-cell-price-total {
    white-space: nowrap;
    font-size: 0.9rem;
}

.lp-area-cell-price-total {
    font-weight: 600;
    color: var(--lp-primary);
}

/* Blocco flottante conferma prenotazione (in basso a destra) */
.lp-booking-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    /* Larghezza fissa rispetto al viewport: non si allarga/stringe al variare del testo della nota */
    width: min(18rem, calc(100vw - 2.75rem));
    max-width: min(18rem, calc(100vw - 2.75rem));
    box-sizing: border-box;
}

.lp-booking-float-assign-note {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
    color: #1a1a1a;
    width: 100%;
    margin: 0;
    padding: 0.55rem 0.65rem;
    background-color: #eef4ff;
    border-left: 4px solid var(--lp-primary, #0d6efd);
    border-radius: 6px;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.lp-booking-float-summary {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.lp-booking-float-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}

.lp-booking-float-row-total {
    margin-top: 0.25rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}

.lp-booking-float-label {
    font-size: 0.9rem;
    color: #555;
}

.lp-booking-float-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

.lp-booking-float-total {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--lp-primary);
}

.lp-booking-float-btn {
    width: 100%;
    padding: 0.6rem 1rem;
    font-weight: 600;
}

.lp-booking-float-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

