/* Legenda */
#sala-calendar-legend { margin:10px 0 15px; display:flex; align-items:center; gap:15px; flex-wrap:wrap; font-size:13px; color:#50575e; }
.sala-legend-label { font-weight:600; color:#1d2327; margin-right:5px; }
.sala-legend-item { display:flex; align-items:center; gap:6px; }
.sala-legend-dot { width:14px; height:14px; border-radius:3px; display:inline-block; }
.sala-busy { background:rgba(255,0,0,0.55); }
.sala-selected { background:rgba(255,165,0,0.45); }

/* Ukryty tekst dla czytników ekranu */
.screen-reader-text { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border-width:0; }

#sala-public-calendar .fc-daygrid-day.fc-day-disabled { background:#f5f5f5; color:#bbb; }
#sala-public-calendar .sala-temp-selection { background:rgba(255,165,0,0.45)!important; }
#sala-public-calendar .fc-bg-event.sala-booked-day { background:rgba(255,0,0,0.55) !important; }
#sala-phone.invalid { border-color:#d63638; box-shadow:0 0 0 1px #d63638; }
#sala-phone.valid { border-color:#46b450; }

/* 
   ROZWIĄZANIE DEFINITYWNE:
   1. Resetujemy tło wiersza (tr), aby nie przebijało przez półprzezroczyste elementy.
   2. Używamy PEŁNYCH (nieprzezroczystych) kolorów dla komórek.
   3. Wymuszamy kolor obramowania.
*/

/* Reset dla wszystkich elementów strukturalnych tabeli - usuwa szare tło motywu przebijające przez obramowania */
#sala-public-calendar table:hover,
#sala-public-calendar tbody:hover,
#sala-public-calendar .fc-scrollgrid-section:hover,
#sala-public-calendar .fc-scrollgrid-section > td:hover,
#sala-public-calendar tr:hover {
    background-color: transparent !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* 1. Domyślne tło komórki - białe */
#sala-public-calendar .fc-daygrid-day {
    background-color: #ffffff !important;
    transition: background-color .12s ease;
    /* Zabezpieczenie obramowania przed zmianą koloru przez motyw */
    border: 1px solid var(--fc-border-color, #ddd) !important;
}

/* 2. Dni niedostępne - szare */
#sala-public-calendar .fc-daygrid-day.sala-disabled-start {
    background-color: #e7e7e7 !important;
    color: #9a9a9a !important;
    cursor: not-allowed !important;
}

/* 3. Dni dzisiejsze - SOLIDNY KOLOR (Hex) zamiast RGBA.
   Zapobiega "brudzeniu" koloru przez tło wiersza pod spodem.
   #e6f7ff to jasny błękit (odróżnia się od pomarańczowego zaznaczenia). */
#sala-public-calendar .fc-daygrid-day.fc-day-today:not(.sala-disabled-start) {
    background-color: #e6f7ff !important;
}

/* 4. Hover tylko dla dostępnych dni */
#sala-public-calendar .fc-daygrid-day.sala-day-allowed:hover {
    background-color: #ececec !important;
}

.sala-day-allowed { cursor:pointer !important; }
#sala-public-calendar .fc-daygrid-day:hover:not(.sala-disabled-start) { background:#ececec !important; }
#sala-public-calendar .sala-temp-selection:hover { background:rgba(255,165,0,0.45)!important; }

/* Focus styles dla dostępności klawiatury */
#sala-email:focus, #sala-phone:focus, #sala-submit-btn:focus, #sala-rodo-checkbox:focus { outline:2px solid #0073aa; outline-offset:2px; }
#sala-public-calendar .fc-daygrid-day:focus { outline:3px solid #0073aa; outline-offset:-3px; z-index:10; position:relative; }
#sala-public-calendar .fc-button:focus { outline:2px solid #0073aa; outline-offset:2px; }

/* Style checkboxa RODO */
#sala-rodo-checkbox { width:18px; height:18px; flex-shrink:0; }
#sala-rodo-checkbox.invalid { outline:2px solid #d63638; outline-offset:2px; }
#sala-rodo-desc a { font-weight:600; }
#sala-rodo-desc a:hover { text-decoration-thickness:2px; }
#sala-rodo-desc a:focus { outline:2px solid #0073aa; outline-offset:2px; }