/* M4 Slot/Colloqui: form gestione, tabella slot/gruppi, agenda, bottone Accedi.
   Usa i token --hi-az-* da hi-az-tokens.css; nessun colore hardcoded. */

.hi-az-slot-manage__create {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
    align-items: end;
}
.hi-az-slot-manage__create label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-weight: 600;
}
.hi-az-slot-manage__create input,
.hi-az-slot-manage__create select {
    width: 100%;
}

.hi-az-slot-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 24px;
}
.hi-az-slot-table th,
.hi-az-slot-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--hi-az-border, #e0e0e0);
    text-align: left;
    vertical-align: middle;
}
.hi-az-slot-table thead th {
    color: var(--hi-az-brand);
    border-bottom: 2px solid var(--hi-az-brand);
}
.hi-az-slot-table tbody tr:hover {
    background: var(--hi-az-surface-hover, #fafafa);
}

.hi-az-slot-booking__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.hi-az-slot-booking__list li {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    border-bottom: 1px solid var(--hi-az-border, #e0e0e0);
    padding-bottom: 8px;
}
.hi-az-slot-booking__apply {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.hi-az-slot-manage h3,
.hi-az-slot-booking h3,
.hi-az-slot-booking h4,
.hi-az-slot-agenda h3 {
    color: var(--hi-az-brand);
    margin: 16px 0 8px;
}
.hi-az-notice--ok {
    color: var(--hi-az-success, #2e7d32);
}

/* ---- Gestione slot: input/select visibili (la shell non rende kt-select pieno) ---- */
.hi-az-slot-manage .kt-input,
.hi-az-slot-manage .kt-select,
.hi-az-slot-manage textarea {
  width: 100%;
  min-height: 42px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--input, #dbdfe9);
  border-radius: 8px;
  background-color: var(--background, #fff);
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--mono, #071437);
}
.hi-az-slot-manage .kt-select:focus,
.hi-az-slot-manage .kt-input:focus { outline: none; border-color: var(--primary, #c20e1a); }
.hi-az-slot-manage form .kt-form-label,
.hi-az-slot-manage form label { font-size: 0.8125rem; font-weight: 500; color: var(--mono, #071437); }
.hi-az-slot-create__chevron { transition: transform 0.2s ease; }
.hi-az-slot-create[open] .hi-az-slot-create__chevron { transform: rotate(180deg); }
.hi-az-slot-create summary::-webkit-details-marker { display: none; }

/* ---- Wizard agende: griglia slot a chip selezionabili ---- */
.hi-az-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 0.4rem;
}
.hi-az-slot-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.25rem;
  border: 1px solid var(--primary, #c20e1a);
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--primary, #c20e1a);
  cursor: pointer;
  user-select: none;
}
.hi-az-slot-chip input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.hi-az-slot-chip.is-off {
  border-color: var(--border, #e4e6ef);
  color: var(--muted-foreground, #99a1b7);
  text-decoration: line-through;
}
.hi-az-slot-agenda { background: var(--background, #fff); }

/* ---- Agenda: griglia slot colorata (verde=libero, rosso=occupato, grigio=non attivo) ---- */
.hi-az-slot-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.6rem;
  padding: 1.25rem;
}
.hi-az-slot-cell {
  border: 2px solid;
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8125rem;
}
.hi-az-slot-cell__time { font-weight: 600; }
.hi-az-slot-cell__user { color: inherit; font-weight: 500; text-decoration: underline; }
.hi-az-slot-cell__state { opacity: 0.85; }
.hi-az-slot-cell__actions { display: flex; gap: 0.25rem; margin-top: 0.15rem; }
.hi-az-slot--free   { border-color: #2e7d32; background: rgba(46,125,50,0.10); color: #1b5e20; }
.hi-az-slot--booked { border-color: #c20e1a; background: rgba(194,14,26,0.10); color: #8a0b14; }
.hi-az-slot--off    { border-color: #f0bcbc; background: #fdecec; color: #b06a6a; }
.hi-az-slot-cell .kt-btn-clear { background: transparent; border: 0; color: inherit; opacity: 0.65; padding: 2px; cursor: pointer; }
.hi-az-slot-cell .kt-btn-clear:hover { opacity: 1; }

/* "Attiva/Disattiva tutti" master toggle: allineato e con respiro (checkbox + label).
   Selettore specifico (label.hi-az-slot-all-row) per battere .hi-az-slot-manage label{display:block}. */
.hi-az-slot-manage label.hi-az-slot-all-row { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--mono, #071437); margin: 8px 0 16px; padding: 4px 0; width: fit-content; }
.hi-az-slot-all-row input { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; accent-color: #c20e1a; }
.hi-az-slot-all-label { padding-left: 2px; }
