/* =============================================
   Calendario Disponibilità ACF — Slider CSS
   ============================================= */

.cal-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px;
    background: #ffffff;
    border-radius: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
}

/* --- Navigazione anno --- */
.cal-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}

.cal-anno {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    min-width: 60px;
    text-align: center;
}

.cal-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 22px;
    color: #555;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}

.cal-nav-btn:hover {
    background: rgba(0,0,0,0.08);
    color: #111;
}

/* --- Legenda --- */
.cal-legenda {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #555;
}

.cal-legenda-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cal-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex-shrink: 0;
}

.cal-dot.disponibile     { background: #6b9ab8; }
.cal-dot.non-disponibile { background: #c8d4dc; }

/* =============================================
   SLIDER
   ============================================= */

.cal-slider-outer {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Frecce slider */
.cal-slide-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    font-size: 26px;
    line-height: 1;
    color: #555;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.cal-slide-btn:hover  { background: rgba(0,0,0,0.08); color: #111; }
.cal-slide-btn:active { background: rgba(0,0,0,0.14); }

/* Viewport: nasconde ciò che va fuori */
.cal-slider-viewport {
    flex: 1;
    overflow: hidden;
}

/* Track scorrevole: contiene tutti i 12 mesi in fila */
.cal-slider-track {
    display: flex;
    gap: 32px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Singolo mese: larghezza calcolata via JS, ma base flex */
.cal-mese {
    flex: 0 0 auto;
    box-sizing: border-box;
}

.cal-mese-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    margin: 0 0 12px 0;
    letter-spacing: 0.01em;
}

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

.cal-cell.cal-header {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-align: center;
    padding: 4px 2px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cal-cell.cal-vuota {
    background: transparent;
    border-radius: 6px;
}

.cal-cell.cal-giorno {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: default;
    transition: opacity 0.1s;
    user-select: none;
}

.cal-cell.cal-giorno.non-disponibile {
    background: #c8d4dc;
    color: #8fa8b8;
}

.cal-cell.cal-giorno.disponibile {
    background: #6b9ab8;
    color: #ffffff;
    font-weight: 600;
}

.cal-cell.cal-giorno.cal-oggi {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #6b9ab8;
}

.cal-cell.cal-giorno.cal-oggi.non-disponibile {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #c8d4dc;
}

.cal-cell.cal-giorno:hover { opacity: 0.82; }

/* --- Indicatori pallini (dots) --- */
.cal-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
}

.cal-dot-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ccc;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.cal-dot-indicator.active {
    background: #6b9ab8;
    transform: scale(1.3);
}

/* --- Errore --- */
.cal-error {
    color: #c0392b;
    padding: 12px;
    background: #fdecea;
    border-radius: 8px;
    font-size: 14px;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 480px) {
    .cal-wrapper { padding: 16px 8px; }
    .cal-mese-title { font-size: 15px; }
    .cal-cell.cal-giorno { font-size: 11px; }
    .cal-grid { gap: 2px; }
    .cal-slide-btn { width: 28px; height: 28px; font-size: 20px; }
}
