/* Ad Horeca | Course Sync 1.7.3 — il calendario pubblico non modifica il tema né il backend */
.ahcs-calendar{--ahcs-red:#ad0016;--ahcs-border:#d8dee7;--ahcs-muted:#5f6b7d;max-width:1200px;margin:30px auto;color:#19212b;font-family:inherit}
.ahcs-calendar *{box-sizing:border-box}
.ahcs-cal-top{display:flex;align-items:end;justify-content:space-between;gap:18px;flex-wrap:wrap;margin-bottom:12px}
.ahcs-cal-top h2{font-size:clamp(23px,3vw,34px);font-weight:750;line-height:1.15;margin:6px 0}
.ahcs-eyebrow{color:var(--ahcs-red);letter-spacing:.12em;font-size:12px;font-weight:800}
.ahcs-cal-modes{display:flex;gap:4px;background:#edf0f5;border-radius:9px;padding:4px}
.ahcs-calendar button,.ahcs-calendar select{font:inherit}
.ahcs-cal-modes button,.ahcs-cal-navigation button{background:transparent;border:0;border-radius:7px;padding:9px 13px;color:#334155;cursor:pointer}
.ahcs-cal-modes button.is-active{background:var(--ahcs-red);color:#fff}
.ahcs-cal-modes button:focus-visible,.ahcs-cal-navigation button:focus-visible,.ahcs-cal-daynum:focus-visible,.ahcs-cal-event:focus-visible{outline:3px solid #2563eb;outline-offset:2px}
.ahcs-cal-controls{display:flex;flex-wrap:wrap;align-items:end;gap:16px;margin:0 0 14px}
.ahcs-cal-controls label{display:flex;flex-direction:column;gap:6px;color:var(--ahcs-muted);font-size:12px;font-weight:700}
.ahcs-cal-controls select{max-width:260px;min-width:175px;border:1px solid var(--ahcs-border);border-radius:7px;background:#fff;padding:10px;color:#222}
.ahcs-cal-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:0 0 18px}.ahcs-cal-navigation{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.ahcs-cal-navigation button{border:1px solid var(--ahcs-border);background:#fff}
.ahcs-cal-navigation button:hover{background:#f1f5f9}
.ahcs-cal-navigation strong{min-width:150px;text-align:left;font-size:16px;white-space:nowrap;margin-right:8px}
/* Il filtro area coincide con la legenda cromatica: scelta persistente, anche con filtro corso. */
.ahcs-cal-legend{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 17px;padding:11px 13px;border:1px solid #e0e5eb;border-radius:9px;background:#f5f7fa}
.ahcs-cal-legend[hidden]{display:none}
.ahcs-cal-legend-title{font-size:12px;font-weight:750;color:#465365;margin-right:5px}
.ahcs-cal-legend-item{display:inline-flex;align-items:center;gap:7px;background:var(--ahcs-chip-bg);border:1px solid var(--ahcs-chip-border);border-radius:100px;padding:5px 9px;font-size:11px;font-weight:750;color:var(--ahcs-chip-text);cursor:pointer;font-family:inherit;line-height:1.3;transition:box-shadow .12s ease,transform .12s ease}
.ahcs-cal-legend-dot{width:9px;height:9px;border-radius:50%;background:var(--ahcs-chip-edge);flex-shrink:0}
/* Palette chiara e leggibile su fondo neutro: ogni area mantiene lo stesso colore in ogni vista. */
.ahcs-area-mixology{--ahcs-chip-bg:#e8f0ff;--ahcs-chip-text:#153f87;--ahcs-chip-edge:#245fcb;--ahcs-chip-border:#c6d8fa}
.ahcs-area-food{--ahcs-chip-bg:#e8f5dc;--ahcs-chip-text:#38661a;--ahcs-chip-edge:#5a922d;--ahcs-chip-border:#cce7b6}
.ahcs-area-wine{--ahcs-chip-bg:#f8e8f2;--ahcs-chip-text:#792354;--ahcs-chip-edge:#a33276;--ahcs-chip-border:#eac7dc}
.ahcs-area-beer{--ahcs-chip-bg:#fff5ce;--ahcs-chip-text:#735100;--ahcs-chip-edge:#a77900;--ahcs-chip-border:#ebd48a}
.ahcs-area-coffee{--ahcs-chip-bg:#f2e6d9;--ahcs-chip-text:#5b3522;--ahcs-chip-edge:#845132;--ahcs-chip-border:#d7b89c}
.ahcs-area-management{--ahcs-chip-bg:#ede9fe;--ahcs-chip-text:#4d328a;--ahcs-chip-edge:#6d4aca;--ahcs-chip-border:#d7ccff}
.ahcs-area-pizza{--ahcs-chip-bg:#fff0e2;--ahcs-chip-text:#873b0c;--ahcs-chip-edge:#c55d1c;--ahcs-chip-border:#f5d1b4}
.ahcs-area-other{--ahcs-chip-bg:#edf1f5;--ahcs-chip-text:#34455a;--ahcs-chip-edge:#627488;--ahcs-chip-border:#d5dee6}
/* Contenitore colorato: evita il bianco-su-bianco della vecchia griglia */
.ahcs-cal-viewport{background:#eef2f6;padding:9px;border:1px solid #dce2eb;border-radius:13px;box-shadow:0 3px 16px rgba(32,48,70,.07)}
.ahcs-cal-month{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border-top:1px solid var(--ahcs-border);border-left:1px solid var(--ahcs-border);border-radius:8px;overflow:hidden}
.ahcs-cal-weekday{text-align:center;padding:12px 3px;background:#e4eaf2;color:#36485d;font-size:12px;font-weight:800;border-right:1px solid var(--ahcs-border);border-bottom:1px solid var(--ahcs-border)}
.ahcs-cal-day{padding:9px;min-height:122px;min-width:0;border-right:1px solid var(--ahcs-border);border-bottom:1px solid var(--ahcs-border);background:#f9fbfd}
.ahcs-cal-day:nth-child(14n + 8),.ahcs-cal-day:nth-child(14n + 9),.ahcs-cal-day:nth-child(14n + 10),.ahcs-cal-day:nth-child(14n + 11),.ahcs-cal-day:nth-child(14n + 12),.ahcs-cal-day:nth-child(14n + 13),.ahcs-cal-day:nth-child(14n + 14){background:#f3f6fa}
.ahcs-cal-day.is-outside{background:#e9edf2!important;opacity:.72}
.ahcs-cal-day.is-today{background:#fff2f2!important;box-shadow:inset 0 0 0 2px rgba(173,0,22,.22)}
.ahcs-cal-daynum{border:0;background:transparent;padding:4px 8px;border-radius:7px;color:#253247;cursor:pointer;font-size:13px;font-weight:700}
.ahcs-cal-day.is-today .ahcs-cal-daynum{background:var(--ahcs-red);color:#fff}
.ahcs-cal-event{display:block!important;color:var(--ahcs-chip-text)!important;background:var(--ahcs-chip-bg)!important;border:1px solid var(--ahcs-chip-border);border-left:4px solid var(--ahcs-chip-edge);padding:6px 7px;margin:5px 0;border-radius:5px;font-size:12px;font-weight:650;line-height:1.35;text-decoration:none!important;overflow-wrap:anywhere;transition:filter .15s ease,transform .15s ease}
.ahcs-cal-event:is(a):hover{filter:brightness(.95);transform:translateY(-1px);text-decoration:underline!important}
.ahcs-cal-list{border:1px solid var(--ahcs-border);border-radius:8px;overflow:hidden;background:#f9fbfd}
.ahcs-cal-list-row{display:grid;grid-template-columns:minmax(145px,24%) 1fr;border-bottom:1px solid var(--ahcs-border);min-height:76px}
.ahcs-cal-list-row:nth-child(even){background:#f1f5fa}
.ahcs-cal-list-row:last-child{border-bottom:0}
.ahcs-cal-list-date{padding:17px;background:#e6ecf3;font-weight:750;color:#26364a}
.ahcs-cal-list-events{padding:12px 15px}
.ahcs-cal-list-events .ahcs-cal-event{display:inline-block;margin-right:8px;max-width:100%}
.ahcs-cal-empty{color:#69788b;font-size:13px}
.ahcs-cal-year{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.ahcs-cal-year-month{border:1px solid var(--ahcs-border);border-radius:9px;padding:15px;min-width:0;background:#f9fbfd}
.ahcs-cal-year-month:nth-child(even){background:#f3f6fa}
.ahcs-cal-year-title{background:transparent;border:0;padding:0;text-transform:capitalize;color:#202124;font-size:18px;font-weight:750;cursor:pointer}
.ahcs-cal-year-count{font-size:12px;color:var(--ahcs-muted);padding:4px 0 10px}
.ahcs-cal-year-entry{display:flex;gap:9px;align-items:center;margin-bottom:7px}
.ahcs-cal-year-date{font-size:12px;color:var(--ahcs-muted);min-width:22px}
.ahcs-cal-year-entry .ahcs-cal-event{margin:0;flex:1}
.ahcs-cal-note{font-size:12px;color:var(--ahcs-muted);margin-top:16px}
.ahcs-cal-error{border-left:3px solid #b91c1c;padding:12px;background:#fff5f5}
@media(max-width:850px){.ahcs-cal-year{grid-template-columns:repeat(2,minmax(0,1fr))}.ahcs-cal-toolbar{align-items:flex-start}.ahcs-cal-navigation{margin-right:auto}.ahcs-cal-day{padding:5px;min-height:96px}.ahcs-cal-event{font-size:11px;padding:4px 5px}}
@media(max-width:540px){.ahcs-cal-modes{width:100%;justify-content:space-between}.ahcs-cal-modes button{padding:8px}.ahcs-cal-controls label{flex:1;min-width:140px}.ahcs-cal-controls select{min-width:0;width:100%}.ahcs-cal-viewport{overflow-x:auto;-webkit-overflow-scrolling:touch;padding:6px}.ahcs-cal-month{min-width:690px}.ahcs-cal-day{min-height:95px;padding:4px}.ahcs-cal-weekday{font-size:11px}.ahcs-cal-event{font-size:11px;line-height:1.25;border-left-width:3px}.ahcs-cal-year{grid-template-columns:1fr}.ahcs-cal-list-row{grid-template-columns:1fr}.ahcs-cal-list-date{padding:10px}.ahcs-cal-navigation strong{font-size:14px;min-width:0;width:100%;margin-right:0}.ahcs-cal-toolbar{gap:12px}.ahcs-cal-navigation{width:100%}.ahcs-cal-modes{width:100%}.ahcs-cal-legend{gap:6px}.ahcs-cal-legend-title{width:100%}}
@media(prefers-reduced-motion:reduce){.ahcs-cal-event{transition:none}.ahcs-cal-event:is(a):hover{transform:none}}

/* Filtro area / legenda interattiva */
.ahcs-cal-legend-item:hover{box-shadow:0 0 0 1px var(--ahcs-chip-edge);transform:translateY(-1px)}
.ahcs-cal-legend-item.is-selected{box-shadow:0 0 0 2px var(--ahcs-chip-edge);border-color:var(--ahcs-chip-edge)}
.ahcs-cal-legend-item:focus-visible{outline:3px solid #2563eb;outline-offset:3px}
.ahcs-cal-legend-all{--ahcs-chip-bg:#fff;--ahcs-chip-text:#334155;--ahcs-chip-edge:#ad0016;--ahcs-chip-border:#d4dce5}
@media(prefers-reduced-motion:reduce){.ahcs-cal-legend-item{transition:none}.ahcs-cal-legend-item:hover{transform:none}}
