/* Pagina prenotazioni: vista compatta, griglia settimanale e stati slot. */

.legend-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    vertical-align: -2px;
}

.legend-free { background-color: #2e9e5b; }
.legend-busy { background-color: #d64545; }

/* --- Vista compatta: un blocco per giorno, solo orari liberi --- */

.day-card {
    max-width: 640px;
    margin: 0 auto 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid #e3e6ea;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.day-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--sb-primary);
    margin-bottom: 0.75rem;
    text-transform: capitalize;
}

.day-card-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.slot-pill {
    border: 0;
    border-radius: 50rem;
    padding: 8px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    background-color: #2e9e5b;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.15s;
}

.slot-pill:hover,
.slot-pill:focus-visible {
    background-color: #21804a;
    outline: 2px solid var(--sb-accent);
    outline-offset: 1px;
}

/* --- Vista griglia completa --- */

.booking-grid-wrap {
    overflow-x: auto;
}

.booking-grid {
    display: grid;
    grid-template-columns: 70px repeat(7, minmax(96px, 1fr));
    gap: 4px;
    min-width: 780px;
}

.booking-grid .grid-head {
    text-align: center;
    font-weight: 700;
    color: var(--sb-primary);
    padding: 6px 2px;
    position: sticky;
    top: 0;
}

.booking-grid .grid-hour {
    font-size: 0.8rem;
    color: #666;
    text-align: right;
    padding: 8px 8px 0 0;
    position: sticky;
    left: 0;
    background: #fff;
}

.slot-btn {
    display: block;
    width: 100%;
    border: 0;
    border-radius: 6px;
    padding: 8px 4px;
    font-size: 0.85rem;
    line-height: 1.2;
    text-align: center;
}

.slot-free {
    background-color: #2e9e5b;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s;
}

.slot-free:hover,
.slot-free:focus-visible {
    background-color: #21804a;
    outline: 2px solid var(--sb-accent);
    outline-offset: 1px;
}

/* Slot non prenotabili: oltre al colore, testo barrato (daltonismo) */
.slot-busy,
.slot-unavailable {
    background-color: #d64545;
    color: rgba(255, 255, 255, 0.75);
    cursor: not-allowed;
    text-decoration: line-through;
}

.slot-unavailable {
    opacity: 0.45;
}

/* Honeypot: fuori schermo, invisibile agli utenti ma compilabile dai bot */
.bk-website-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 575.98px) {
    .day-card {
        padding: 0.85rem 1rem;
    }

    .slot-pill {
        padding: 10px 16px; /* target touch più comodo */
    }
}
