/* WS Corsi – calendario, lista e box dettagli */
.wsc-calendar-wrap {
	--wsc-accent: #95cdc8;
	--wsc-text: #1f1f1f;
	--wsc-muted: #6b7280;
	--wsc-border: #e5e7eb;
	--wsc-bg: #ffffff;
	--wsc-radius: 10px;
	--wsc-font: inherit;
	font-family: var(--wsc-font);
	color: var(--wsc-text);
	background: var(--wsc-bg);
	border: 1px solid var(--wsc-border);
	border-radius: var(--wsc-radius);
	padding: 16px;
	box-sizing: border-box;
}
.wsc-calendar-wrap * { box-sizing: border-box; }

/* Toolbar */
.wsc-calendar.fc .fc-toolbar { flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.wsc-calendar.fc .fc-toolbar-title { font-size: 1.25em; font-weight: 600; text-transform: capitalize; }
.wsc-calendar.fc .fc-button { background: #fff; border: 1px solid var(--wsc-border); color: var(--wsc-text); text-transform: none; font-weight: 500; box-shadow: none; border-radius: 8px; padding: 6px 12px; }
.wsc-calendar.fc .fc-button:hover { background: #f3f4f6; }
.wsc-calendar.fc .fc-button:focus { box-shadow: 0 0 0 2px rgba(149,205,200,.3); }
.wsc-calendar.fc .fc-button-primary:not(:disabled).fc-button-active,
.wsc-calendar.fc .fc-button-primary:not(:disabled):active { background: var(--wsc-accent); border-color: var(--wsc-accent); color: #1f1f1f; }
.wsc-calendar.fc .fc-button-primary:disabled { background: #fff; color: var(--wsc-muted); border-color: var(--wsc-border); }
.wsc-calendar.fc .fc-button-group > .fc-button { border-radius: 0; }
.wsc-calendar.fc .fc-button-group > .fc-button:first-child { border-radius: 8px 0 0 8px; }
.wsc-calendar.fc .fc-button-group > .fc-button:last-child { border-radius: 0 8px 8px 0; }

/* Griglia */
.wsc-calendar.fc { --fc-border-color: var(--wsc-border); --fc-today-bg-color: rgba(149,205,200,.07); --fc-page-bg-color: var(--wsc-bg); --fc-neutral-bg-color: #f9fafb; }
.wsc-calendar.fc .fc-col-header-cell-cushion { padding: 8px 4px; font-weight: 600; text-transform: capitalize; color: var(--wsc-muted); font-size: .85em; text-decoration: none; }
.wsc-calendar.fc .fc-daygrid-day-number { padding: 6px 8px; color: var(--wsc-text); text-decoration: none; font-size: .9em; }
.wsc-calendar.fc .fc-day-today .fc-daygrid-day-number { background: var(--wsc-accent); color: #1f1f1f; border-radius: 999px; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; margin: 4px; padding: 0; }
.wsc-calendar.fc .fc-daygrid-event { border-radius: 6px; padding: 2px 6px; font-size: .85em; cursor: pointer; border: 0; }
.wsc-calendar.fc .fc-daygrid-dot-event { padding: 2px 6px; }
.wsc-calendar.fc .fc-timegrid-event { border-radius: 6px; border: 0; padding: 2px 4px; cursor: pointer; }
.wsc-calendar.fc .fc-event-title { font-weight: 500; }
.wsc-calendar.fc .fc-daygrid-more-link { color: #1f1f1f; font-size: .85em; }
.wsc-calendar.fc .fc-timegrid-slot-label-cushion { font-size: .8em; color: var(--wsc-muted); }
.wsc-calendar.fc .fc-timegrid-slot { height: 2.2em; }
.wsc-calendar.fc-theme-standard td, .wsc-calendar.fc-theme-standard th, .wsc-calendar.fc-theme-standard .fc-scrollgrid { border-color: var(--wsc-border); }
.wsc-calendar.fc .fc-list { border-radius: 8px; overflow: hidden; }
.wsc-calendar.fc .fc-list-day-cushion { background: #f9fafb; text-transform: capitalize; }
.wsc-calendar.fc .fc-list-event:hover td { background: #f3f4f6; }
.wsc-calendar.fc .fc-list-event { cursor: pointer; }
.wsc-calendar.fc .fc-list-empty { background: transparent; color: var(--wsc-muted); }
.wsc-calendar a { text-decoration: none; }
.wsc-error { color: #b91c1c; }

/* Modal */
.wsc-modal { position: fixed; inset: 0; z-index: 99999; display: none; }
.wsc-modal.is-open { display: block; }
body.wsc-modal-open { overflow: hidden; }
.wsc-modal-backdrop { position: absolute; inset: 0; background: rgba(17,24,39,.55); }
.wsc-modal-box { --wsc-color: #95cdc8; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.25); border-top: 6px solid var(--wsc-color); color: #1f1f1f; }
.wsc-modal-close { position: absolute; top: 8px; right: 10px; background: none; border: 0; font-size: 28px; line-height: 1; color: #6b7280; cursor: pointer; padding: 4px 8px; z-index: 1; }
.wsc-modal-close:hover { color: #111; }
.wsc-modal-content { padding: 20px 24px 24px; }
.wsc-modal-image { margin: -20px -24px 16px; }
.wsc-modal-image img { display: block; width: 100%; max-height: 220px; object-fit: cover; }
.wsc-modal-head { display: flex; align-items: center; gap: 10px; padding-right: 28px; }
.wsc-modal-dot { width: 14px; height: 14px; border-radius: 4px; background: var(--wsc-color); flex: 0 0 auto; }
.wsc-modal-title { margin: 0; font-size: 1.3em; line-height: 1.25; }
.wsc-modal-date { margin: 8px 0 0 24px; font-weight: 500; }
.wsc-modal-date em { color: #6b7280; font-weight: 400; }
.wsc-modal-cats { margin: 4px 0 0 24px; font-size: .85em; color: #6b7280; }
.wsc-modal-desc { margin: 14px 0 0; color: #374151; line-height: 1.55; }
.wsc-modal-rows { margin-top: 14px; border-top: 1px solid #e5e7eb; padding-top: 12px; display: grid; gap: 6px; }
.wsc-modal-row { display: flex; gap: 12px; font-size: .95em; }
.wsc-modal-label { flex: 0 0 90px; color: #6b7280; }
.wsc-modal-actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }

/* Aggiungi al calendario */
.wsc-subscribe { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 14px 0 28px; padding: 14px 18px; border: 1px dashed #d1d5db; border-radius: 10px; font-size: .92em; color: #374151; }
.wsc-subscribe-label { font-weight: 600; }
.wsc-subscribe-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.wsc-modal-addto { margin-top: 14px; font-size: .88em; color: #6b7280; }
.wsc-modal-addto a, .wsc-date-addto a { color: inherit !important; text-decoration: underline !important; }
.wsc-date-addto { flex-basis: 100%; font-size: .85em; color: #6b7280; }
.wsc-btn.wsc-btn-outline.wsc-btn-small { padding: 7px 14px; font-size: .9em; border-radius: 999px; }

/* Pulsanti */
.wsc-btn { display: inline-block; background: var(--wsc-color, #95cdc8); color: var(--wsc-color-text, #1f1f1f) !important; padding: 10px 18px; border-radius: 8px; text-decoration: none !important; font-weight: 600; line-height: 1.2; border: 2px solid var(--wsc-color, #95cdc8); transition: opacity .15s; }
.wsc-btn:hover { opacity: .9; }
.wsc-btn-outline { background: transparent; color: #1f1f1f !important; }

/* Lista prossime date */
.wsc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.wsc-list-item { --wsc-color: #95cdc8; display: flex; align-items: center; gap: 16px; padding: 12px 16px; border: 1px solid #e5e7eb; border-left: 5px solid var(--wsc-color); border-radius: 10px; background: #fff; }
.wsc-list-date { flex: 0 0 56px; text-align: center; line-height: 1.1; }
.wsc-list-day { display: block; font-size: 1.6em; font-weight: 700; color: var(--wsc-color); }
.wsc-list-month { display: block; font-size: .8em; text-transform: uppercase; color: #6b7280; letter-spacing: .04em; }
.wsc-list-body { flex: 1 1 auto; min-width: 0; }
.wsc-list-title { font-weight: 600; text-decoration: none; color: inherit; font-size: 1.05em; }
.wsc-list-meta { font-size: .875em; color: #6b7280; margin-top: 2px; }
.wsc-list-empty { color: #6b7280; }
@media (max-width: 560px) {
	.wsc-list-item { flex-wrap: wrap; }
	.wsc-list-item .wsc-btn { width: 100%; text-align: center; }
}

/* Box dettagli pagina corso */
.wsc-details { --wsc-color: #95cdc8; border: 1px solid #e5e7eb; border-left: 5px solid var(--wsc-color); border-radius: 10px; padding: 18px 20px; margin: 0 0 28px; background: #fafafa; }
.wsc-details-grid { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.wsc-details-grid dt { color: #6b7280; font-weight: 500; }
.wsc-details-grid dd { margin: 0; }
.wsc-details-title { font-size: 1.05em; margin: 18px 0 8px; }
.wsc-details-dates { margin: 0 0 12px 18px; padding: 0; }
.wsc-details-dates li { margin-bottom: 4px; }
.wsc-details-dates em { color: #6b7280; }
.wsc-details-none { color: #6b7280; margin: 12px 0; }
.wsc-details > p:last-child { margin-bottom: 0; }

.wsc-calendar .wsc-event-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.wsc-calendar .fc-list-event .wsc-event-title { white-space: normal; }

/* Catalogo corsi a box: [ws_corsi_griglia] */
.wsc-grid { display: grid; grid-template-columns: repeat(var(--wsc-cols, 3), minmax(0, 1fr)); gap: 24px; margin: 0 0 28px; }
.wsc-card { --wsc-color: #95cdc8; display: flex; flex-direction: column; background: #fff; border: 1px solid #e5e7eb; border-top: 5px solid var(--wsc-color); border-radius: 10px; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.wsc-card:hover { box-shadow: 0 10px 28px rgba(0,0,0,.08); transform: translateY(-2px); }
.wsc-card-image { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #f3f4f6; }
.wsc-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wsc-card-body { display: flex; flex-direction: column; gap: 12px; padding: 24px; flex: 1 1 auto; }
.wsc-card-cats { font-size: .75em; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #6b7280; }
.wsc-card-title { margin: 0 !important; padding: 0 !important; font-size: 1.3em; line-height: 1.3; }
.wsc-card-title a { text-decoration: none !important; color: inherit !important; }
.wsc-card-title a:hover { text-decoration: underline !important; }
.wsc-card-text { color: #4b5563; line-height: 1.6; font-size: .95em; }
.wsc-card-meta { display: grid; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid #eef0f2; font-size: .9em; color: #374151; }
.wsc-card-meta-row { display: flex; flex-direction: column; gap: 1px; line-height: 1.45; }
.wsc-card-meta-label { color: #6b7280; font-size: .78em; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.wsc-card-more { display: inline-block; margin: 4px 0 0; padding: 1px 8px; border-radius: 999px; background: #f3f4f6; color: #4b5563; font-size: .85em; white-space: nowrap; }
.wsc-card-meta-row > span:last-child { display: flex; flex-direction: column; align-items: flex-start; }
.wsc-card-nodate { color: #6b7280; font-style: italic; }
.wsc-card-btn { align-self: flex-start; margin-top: auto; }
.wsc-card-meta + .wsc-card-btn { margin-top: 6px; }
@media (max-width: 1024px) { .wsc-grid { grid-template-columns: repeat(min(var(--wsc-cols, 3), 2), minmax(0, 1fr)); } }
@media (max-width: 640px) { .wsc-grid { grid-template-columns: 1fr; gap: 18px; } .wsc-card-body { padding: 20px; } }

/* Prossime date nella pagina del corso (2.0): una riga per data con i suoi pulsanti */
.wsc-dates { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.wsc-date { display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; padding: 14px 16px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; scroll-margin-top: 220px; }
.wsc-date:target { border-color: var(--wsc-color, #95cdc8); box-shadow: 0 0 0 2px color-mix(in srgb, var(--wsc-color, #95cdc8) 25%, transparent); }
.wsc-date-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.wsc-date-when { font-weight: 600; color: #1f1f1f; }
.wsc-date-where { font-size: .9em; color: #6b7280; }
.wsc-date-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.wsc-whatsapp-btn.wsc-whatsapp-btn-small { padding: 8px 14px; font-size: .9em; box-shadow: none; }
.wsc-whatsapp-btn-small .wsc-whatsapp-icon { width: 18px; height: 18px; }
.wsc-btn.wsc-btn-small { padding: 7px 14px; font-size: .9em; border-radius: 999px; }
.wsc-details-grid + .wsc-details-title { margin-top: 18px; }
.wsc-details > .wsc-details-title:first-child { margin-top: 0; }

/* Pulsante WhatsApp (pagina corso) */
.wsc-whatsapp { margin: 28px 0 8px; text-align: center; }
.wsc-whatsapp-btn { display: inline-flex; align-items: center; gap: 10px; background: #25d366; color: #fff !important; padding: 12px 22px; border-radius: 999px; text-decoration: none !important; font-weight: 600; font-size: 1.05em; line-height: 1.2; box-shadow: 0 2px 8px rgba(37,211,102,.35); transition: background .15s, transform .15s; }
.wsc-whatsapp-btn:hover { background: #1ebe5b; transform: translateY(-1px); color: #fff !important; }
.wsc-whatsapp-icon { width: 24px; height: 24px; flex: 0 0 auto; }

/* Titolo toolbar: neutralizza gli stili del tema sugli h2 */
.wsc-calendar.fc .fc-toolbar-title { font-size: 1.25em !important; line-height: 1.2 !important; margin: 0 !important; padding: 0 !important; }

/* Mobile: titolo su una riga, sotto i pulsanti prev/next/oggi allineati */
@media (max-width: 640px) {
	.wsc-calendar-wrap { padding: 10px; }
	.wsc-calendar.fc .fc-toolbar { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
	.wsc-calendar.fc .fc-toolbar-chunk { display: flex; align-items: center; justify-content: center; gap: 6px; }
	.wsc-calendar.fc .fc-toolbar-chunk:nth-child(2) { order: -1; flex: 1 0 100%; }
	.wsc-calendar.fc .fc-toolbar-chunk:first-child { flex: 1 1 auto; }
	.wsc-calendar.fc .fc-toolbar-chunk:last-child:empty { display: none; }
	.wsc-calendar.fc .fc-toolbar-title { font-size: 1.15em !important; text-align: center; white-space: nowrap; }
	.wsc-calendar.fc .fc-button { padding: 5px 10px; font-size: .9em; }
	.wsc-calendar.fc .fc-col-header-cell-cushion { font-size: .75em; padding: 6px 2px; }
	.wsc-calendar.fc .fc-daygrid-day-number { font-size: .8em; padding: 4px 5px; }
	.wsc-calendar.fc .fc-daygrid-event { font-size: .72em; padding: 1px 4px; }
}
