/* ==========================================================================
   Richiesta di preventivo: testata, barra delle date, pulsanti, barra mobile
   ========================================================================== */

/* Colore delle CTA. Il verde del logo (#539C38) con il testo bianco non
   arriva al contrasto AA: qui la tonalità scura già usata per i link delle
   policy. Se DB Form Builder ha un suo colore primario, vince quello dove è
   definito (dentro il modulo). */
:root {
    --lgc-primary: #3d7a28;
    --lgc-primary-hover: #2f5f1f;
    --lgc-wa: #1c7a43;
    --lgc-bg: #fff;
}

/* Testata fissa in alto mentre si scorre. */
.lgc-header {
    z-index: 1020;
}

@media (min-width: 783px) {
    .admin-bar .lgc-header {
        top: 32px;
    }
}

@media (min-width: 601px) and (max-width: 782px) {
    .admin-bar .lgc-header {
        top: 46px;
    }
}

/* Le ancore (#contatti, #territorio, #storia) non finiscono sotto la testata. */
html {
    scroll-padding-top: 110px;
}

/* Pulsante base. */
.lgc-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .5rem 1.25rem;
    border: 0;
    border-radius: 4px;
    background: var(--dbfb-primary, var(--lgc-primary));
    color: #fff;
    font-family: inherit;
    font-size: 12pt;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.lgc-cta:hover,
.lgc-cta:focus-visible {
    background: var(--lgc-primary-hover);
    color: #fff;
}

.lgc-cta:focus-visible,
.lgc-booking-bar input:focus-visible,
.lgc-booking-bar select:focus-visible,
.lgc-bottom-bar a:focus-visible {
    outline: 3px solid #000;
    outline-offset: 2px;
}

.lgc-cta--wa {
    background: var(--lgc-wa);
}

.lgc-cta--wa:hover,
.lgc-cta--wa:focus-visible {
    background: #145c32;
}

/* Testata: da tablet in su, a destra (accanto al pulsante del menu fino a
   992px, dopo le voci del menu oltre). */
.lgc-cta--header {
    margin-left: auto;
    margin-right: .75rem;
    white-space: nowrap;
}

@media (min-width: 992px) {
    .lgc-cta--header {
        margin-left: 1rem;
        margin-right: 0;
    }
}

/* Pulsanti contestuali (camere, ristorante, home). */
.lgc-cta-wrap {
    margin: 1rem 0;
    text-align: center;
}

/* Barra delle date sotto lo slogan. */
.lgc-booking-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: center;
    gap: .75rem 1rem;
    max-width: 960px;
    margin: 30px auto 0;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    background: #f4f8f2;
    font-size: 12pt;
}

.lgc-booking-bar__campo {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    font-weight: 600;
}

.lgc-booking-bar input,
.lgc-booking-bar select {
    box-sizing: border-box;
    height: 44px;
    padding: .375rem .75rem;
    border: 1px solid #767676;
    border-radius: 4px;
    background-color: #fff;
    color: #000;
    font: inherit;
    font-size: 12pt;
    font-weight: 400;
    line-height: 1.2;
}

/* Safari e iOS disegnano la select nativa più piccola e ignorano l'altezza:
   aspetto nativo tolto e freccia disegnata qui, come i campi data. */
.lgc-booking-bar select {
    -webkit-appearance: none;
    appearance: none;
    min-width: 5.5rem;
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23333' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: right .75rem center;
    background-repeat: no-repeat;
    background-size: 12px 8px;
    cursor: pointer;
}

@media (max-width: 767px) {
    .lgc-booking-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .lgc-booking-bar .lgc-cta {
        width: 100%;
    }
}

/* Riquadro «Hai già in mente le date?» sopra i contatti. */
.lgc-cta-block {
    max-width: 700px;
    margin: 80px auto 0;
    padding: 0 20px;
    text-align: center;
}

.lgc-cta-block__titolo {
    font-family: 'Dancing Script', cursive;
    font-size: 30pt;
}

.lgc-cta-block + .footer {
    margin-top: 40px;
}

/* Barra contatti in basso, solo su mobile. */
.lgc-bottom-bar {
    display: none;
}

@media (max-width: 767px) {
    .lgc-bottom-bar:not([hidden]) {
        display: grid;
        grid-auto-columns: 1fr;
        grid-auto-flow: column;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 999;
        padding: 0 0 env(safe-area-inset-bottom);
        background: var(--lgc-bg);
        box-shadow: 0 -2px 8px rgba(0, 0, 0, .12);
    }
    .lgc-bottom-bar a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        min-height: 44px;
        padding: 10px 4px;
        color: #222;
        font-size: 11pt;
        font-weight: 600;
        text-align: center;
        text-decoration: none;
    }
    .lgc-bottom-bar .icona {
        font-size: 1.3em;
    }
    .lgc-bottom-bar .lgc-bottom-bar__preventivo {
        background: var(--dbfb-primary, var(--lgc-primary));
        color: #fff;
    }
    .lgc-bottom-bar .lgc-wa-link .icona {
        color: var(--lgc-wa);
    }
    body.lgc-has-bottom-bar {
        padding-bottom: calc(64px + env(safe-area-inset-bottom));
    }
    /* Pulsante flottante di DB Cookie Manager, se attivo: sopra la barra. */
    body.lgc-has-bottom-bar .dbcm-reopen {
        bottom: calc(74px + env(safe-area-inset-bottom)) !important;
    }
}
