/*
 * Area Riservata — layout e token vicini al frame Figma (UI / Area riservata).
 */

.intersections-area-riservata {
	/* Token allineati a single-workshop + superfici tipo design system */
	--int-sc-navy: #1d1e4c;
	--int-sc-pink: #e91e63;
	--int-sc-white: #fff;

	--ar-bg-page: #eef2f6;
	--ar-bg-elevated: #ffffff;
	--ar-bg-soft: #e4edf3;
	--ar-bg-muted: #f4f7fa;
	--ar-bg-tabs: #e8eef4;
	--ar-bg-banner: #c5dae6;
	--ar-border: #dce4ea;
	--ar-border-subtle: #edf2f6;
	--ar-border-strong: #1d1e4c;
	--ar-text: #1d1e4c;
	--ar-text-muted: #5c6670;
	--ar-accent: #047481;
	--ar-accent-soft: rgba(4, 116, 129, 0.1);
	--ar-shadow-sm: 0 1px 2px rgba(29, 30, 76, 0.05);
	--ar-shadow-md: 0 1px 2px rgba(29, 30, 76, 0.04), 0 8px 24px rgba(29, 30, 76, 0.06);
	--ar-radius: 6px;
	--ar-radius-lg: 10px;
	--ar-radius-xl: 14px;
	--ar-max: 1280px;
	--ar-sidebar: 302px;
	--ar-gap: 40px;

	font-family: 'Poppins', system-ui, -apple-system, sans-serif;
	color: var(--ar-text);
	background-color: var(--ar-bg-page);
	padding: 40px 24px 56px;
	min-height: 60vh;
	box-sizing: border-box;
}

.intersections-area-riservata *,
.intersections-area-riservata *::before,
.intersections-area-riservata *::after {
	box-sizing: border-box;
}

/* ---- Header: titolo + card biglietto ---- */
.ar-header {
	max-width: var(--ar-max);
	margin: 0 auto 32px;
	padding-bottom: 28px;
	border-bottom: 1px solid var(--ar-border-subtle);
}

.ar-header-main {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px 32px;
}

.ar-title-group {
	flex: 1 1 280px;
	min-width: 0;
	text-align: left;
}

.ar-subtitle {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ar-text-muted);
	display: block;
	margin-bottom: 10px;
}

.ar-title {
	font-size: clamp(28px, 4vw, 48px);
	font-weight: 700;
	line-height: 1.15;
	margin: 0 0 12px;
	letter-spacing: -0.02em;
	text-align: left;
	color: var(--int-sc-navy);
}

.ar-privacy-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 500;
	color: var(--ar-text);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.ar-privacy-link:hover,
.ar-privacy-link:focus-visible {
	color: var(--ar-accent);
	border-bottom-color: var(--ar-accent);
	outline: none;
}

.ar-privacy-link-icon {
	display: flex;
	color: currentColor;
}

.ar-header-ticket-card.ar-box {
	flex: 0 1 301px;
	max-width: 100%;
	margin: 0;
	padding: 22px 22px 24px;
	background: var(--ar-bg-elevated);
	border: 1px solid var(--ar-border);
	border-radius: var(--ar-radius-xl);
	box-shadow: var(--ar-shadow-md);
}

.ar-ticket-card-heading {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 8px;
	color: var(--int-sc-navy);
}

.ar-ticket-card-note,
.ar-ticket-card-more {
	font-size: 13px;
	color: var(--ar-text-muted);
	margin: 0 0 12px;
	line-height: 1.45;
}

.ar-ticket-card-more {
	margin-bottom: 16px;
}

.ar-btn-primary {
	display: inline-block;
	background: var(--int-sc-navy);
	border: 1px solid var(--int-sc-navy);
	color: #fff;
	padding: 12px 22px;
	text-align: center;
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
	border-radius: var(--ar-radius);
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
	box-shadow: var(--ar-shadow-sm);
}

.ar-btn-primary:hover {
	background: #2a2c66;
	border-color: #2a2c66;
	color: #fff;
	box-shadow: 0 2px 8px rgba(29, 30, 76, 0.15);
}

.ar-btn-full {
	width: 100%;
}

/* ---- Griglia: sidebar app + main ---- */
.ar-layout {
	max-width: var(--ar-max);
	margin: 0 auto;
	display: grid;
	grid-template-columns: var(--ar-sidebar) minmax(0, 1fr);
	gap: var(--ar-gap);
	align-items: start;
}

.ar-sidebar {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.ar-box {
	background: var(--ar-bg-soft);
	border-radius: var(--ar-radius-lg);
	padding: 0;
	border: 1px solid var(--ar-border);
	overflow: hidden;
	box-shadow: var(--ar-shadow-sm);
}

.ar-banner-webapp {
	background: linear-gradient(152deg, #c5dce8 0%, #a8ccdd 42%, #8fbed2 100%);
	border: 1px solid rgba(255, 255, 255, 0.35);
	min-height: 220px;
	box-shadow: var(--ar-shadow-sm);
}

.ar-banner-webapp-inner {
	padding: 26px 24px 30px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.ar-banner-webapp-kicker {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(26, 26, 26, 0.65);
	margin: 0;
}

.ar-banner-webapp-title {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
	margin: 0;
	color: var(--ar-text);
}

.ar-banner-webapp-desc {
	font-size: 13px;
	line-height: 1.5;
	color: rgba(26, 26, 26, 0.78);
	margin: 0 0 8px;
}

/* ---- Programma / calendario ---- */
.ar-main {
	background: var(--ar-bg-elevated);
	border: 1px solid var(--ar-border);
	border-radius: var(--ar-radius-xl);
	padding: 32px 32px 40px;
	min-width: 0;
	box-shadow: var(--ar-shadow-md);
}

.ar-program-header {
	margin-bottom: 20px;
}

.ar-program-header-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px 20px;
	margin-bottom: 12px;
}

.ar-program-title {
	font-size: clamp(22px, 2.5vw, 28px);
	font-weight: 700;
	margin: 0;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--int-sc-navy);
}

.ar-program-link {
	font-size: 14px;
	font-weight: 600;
	color: var(--ar-accent);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	text-underline-offset: 3px;
	white-space: nowrap;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.ar-program-link:hover {
	color: #035f6a;
	border-bottom-color: currentColor;
}

.ar-program-intro {
	font-size: 14px;
	line-height: 1.5;
	color: var(--ar-text-muted);
	margin: 0;
	max-width: 58em;
}

/* Tab giorni — segment control tipo Figma */
.ar-day-tabs {
	display: flex;
	flex-wrap: nowrap;
	gap: 6px;
	margin: 28px 0 12px;
	padding: 6px;
	background: var(--ar-bg-tabs);
	border-radius: var(--ar-radius-lg);
	border: 1px solid var(--ar-border-subtle);
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.ar-day-tab {
	flex: 0 0 auto;
	display: flex;
	align-items: baseline;
	gap: 10px;
	padding: 12px 18px 14px;
	min-width: 132px;
	margin: 0;
	font: inherit;
	color: inherit;
	text-align: left;
	cursor: pointer;
	background: transparent;
	border: 1px solid transparent;
	border-radius: var(--ar-radius);
	text-decoration: none;
	transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.ar-day-tab:hover,
.ar-day-tab:focus-visible {
	background: rgba(255, 255, 255, 0.55);
	outline: none;
}

.ar-day-tab:focus-visible {
	box-shadow: 0 0 0 2px var(--ar-accent-soft);
}

.ar-day-tab.is-selected,
.ar-day-tab[aria-selected='true'] {
	background: var(--ar-bg-elevated);
	border-color: var(--ar-border);
	box-shadow: var(--ar-shadow-sm);
	font-weight: 600;
	color: var(--int-sc-navy);
}

.ar-day-tab .ar-day {
	font-size: 30px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.03em;
	color: var(--int-sc-navy);
}

.ar-day-tab .ar-month-year {
	font-size: 12px;
	font-weight: 500;
	color: var(--ar-text-muted);
	text-transform: capitalize;
	letter-spacing: 0.01em;
}

/* Timeline */
.ar-timeline {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ar-date-group {
	padding-top: 8px;
}

.ar-date-group[hidden] {
	display: none !important;
}

.ar-time-group {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin-top: 16px;
}

.ar-time-header {
	margin-bottom: 4px;
}

.ar-time-header h4 {
	font-size: 20px;
	font-weight: 700;
	margin: 0;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	letter-spacing: -0.02em;
	color: var(--int-sc-navy);
}

.ar-time-icon {
	display: inline-flex;
	width: 16px;
	height: 16px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235c6670' stroke-width='1.3'%3E%3Ccircle cx='8' cy='8' r='6.5'/%3E%3Cpath d='M8 4.5V8l2.5 1.5' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
	opacity: 0.85;
}

.ar-events-list {
	display: flex;
	flex-direction: column;
	border-top: 1px solid var(--ar-border-subtle);
}

.ar-event-card {
	display: grid;
	grid-template-columns: 108px minmax(0, 1fr) minmax(200px, 260px);
	gap: 20px 28px;
	padding: 26px 4px 26px 0;
	border-bottom: 1px solid var(--ar-border-subtle);
	align-items: start;
	transition: background 0.15s ease;
	border-radius: var(--ar-radius);
	margin-left: -4px;
	margin-right: -4px;
	padding-left: 4px;
	padding-right: 4px;
}

.ar-event-card:hover {
	background: var(--ar-bg-muted);
}

.ar-event-card:last-child {
	border-bottom: none;
}

.ar-event-time-col {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
	padding-top: 2px;
}

.ar-event-time {
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	text-align: right;
	width: 100%;
}

.ar-event-date {
	font-size: 12px;
	color: var(--ar-text-muted);
	text-transform: lowercase;
	text-align: right;
	width: 100%;
}

.ar-event-content-col {
	border-left: 1px solid var(--ar-border-subtle);
	padding-left: 24px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

.ar-event-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0;
	line-height: 1.3;
	letter-spacing: -0.02em;
	min-width: 0;
	color: var(--int-sc-navy);
}

.ar-speakers-bookmark-row {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
}

.ar-speakers-list-wrap {
	flex: 1 1 auto;
	min-width: 0;
}

.ar-title-bookmark-wrap {
	flex: 0 0 auto;
	padding-top: 2px;
}

.intersections-area-riservata .int-sc-bookmark {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	color: var(--int-sc-navy);
	cursor: pointer;
	border-radius: var(--ar-radius);
	transition: color 0.2s ease, background 0.2s ease;
}

.intersections-area-riservata .int-sc-bookmark:hover,
.intersections-area-riservata .int-sc-bookmark:focus-visible {
	color: var(--int-sc-pink);
	background: rgba(233, 30, 99, 0.08);
	outline: none;
}

.intersections-area-riservata .int-sc-bookmark.loading {
	opacity: 0.55;
	pointer-events: none;
}

.intersections-area-riservata .int-sc-bookmark svg {
	display: block;
}

a.ar-event-cta-link.ar-btn-full {
	box-sizing: border-box;
}

.ar-event-title-link {
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.ar-event-title-link:hover,
.ar-event-title-link:focus-visible {
	color: var(--ar-accent);
	border-bottom-color: var(--ar-accent);
	outline: none;
}

.ar-event-meta {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
	color: var(--ar-text-muted);
}

.ar-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	line-height: 1.35;
}

.ar-meta-item::before {
	content: '';
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	opacity: 0.75;
	background: center / contain no-repeat;
}

.ar-meta-category::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%235c6670' stroke-width='1.2'%3E%3Crect x='2' y='3' width='10' height='8' rx='1'/%3E%3Cpath d='M4 3V2h6v1' stroke-linecap='round'/%3E%3C/svg%3E");
}

.ar-meta-room::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%235c6670' stroke-width='1.2' stroke-linecap='round'%3E%3Cpath d='M7 12.2c2.2-2.6 3.5-4.7 3.5-6.4a3.5 3.5 0 10-7 0c0 1.7 1.3 3.8 3.5 6.4z'/%3E%3Ccircle cx='7' cy='5.6' r='1.2' fill='%235c6670' stroke='none'/%3E%3C/svg%3E");
}

.ar-meta-status::before {
	width: 16px;
	height: 16px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235c6670' stroke-width='1.2'%3E%3Cpath d='M3.5 8.5l3 3 6-7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.ar-meta-status.booked {
	color: var(--ar-accent);
	font-weight: 600;
}

.ar-meta-status.booked::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23047481' stroke-width='1.2'%3E%3Cpath d='M3.5 8.5l3 3 6-7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	opacity: 1;
}

.ar-meta-status.available::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235c6670' stroke-width='1.2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='M8 4.5V8l2.5 1.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.ar-event-speakers-col {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	gap: 14px;
	min-width: 0;
}

.ar-speakers-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ar-speaker-item {
	font-size: 12px;
	line-height: 1.4;
}

.ar-speaker-name {
	font-weight: 600;
	color: var(--ar-text);
}

.ar-speaker-job {
	font-size: 12px;
	color: var(--ar-text-muted);
	margin-top: 2px;
	line-height: 1.35;
}

.ar-speaker-desc {
	color: var(--ar-text-muted);
	margin-top: 2px;
}

.ar-day-empty {
	margin: 0;
	padding: 12px 0 4px;
	font-size: 14px;
	color: var(--ar-text-muted);
}

.ar-event-actions {
	margin-top: 4px;
}

.ar-btn-outline {
	display: inline-block;
	background: transparent;
	border: 1px solid var(--int-sc-navy);
	color: var(--int-sc-navy);
	padding: 11px 20px;
	text-align: center;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	border-radius: var(--ar-radius);
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ar-btn-outline:hover {
	background: var(--int-sc-navy);
	color: #fff;
	border-color: var(--int-sc-navy);
}

/* Prenota (solo workshop booking): stile Figma — non applicare a .ar-event-cta-link né a Cancella */
.intersections-area-riservata .ar-btn-outline.btn-booking[data-action="book"] {
	background: linear-gradient(90deg, #221e4d 0%, #4a3d82 50%, #5c4f8f 100%) !important;
	color: #ffffff !important;
	border: 1px solid #221e4d !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

.intersections-area-riservata .ar-btn-outline.btn-booking[data-action="book"]:hover:not(:disabled):not(.loading),
.intersections-area-riservata .ar-btn-outline.btn-booking[data-action="book"]:focus-visible {
	background: linear-gradient(90deg, #2d2762 0%, #554691 50%, #6b5c9a 100%) !important;
	color: #ffffff !important;
	border-color: #1a1538 !important;
	box-shadow: none !important;
	outline: none;
}

.intersections-area-riservata .ar-btn-outline.btn-booking[data-action="book"]:disabled,
.intersections-area-riservata .ar-btn-outline.btn-booking[data-action="book"].loading {
	opacity: 0.72;
	cursor: wait;
}

.ar-empty-state {
	text-align: center;
	padding: 40px 20px;
}

.ar-empty-state p {
	margin: 0 0 20px;
	color: var(--ar-text-muted);
	font-size: 15px;
}

/* Responsive */
@media (max-width: 992px) {
	.intersections-area-riservata {
		padding: 28px 16px 40px;
	}

	.ar-main {
		padding: 24px 20px 32px;
		border-radius: var(--ar-radius-lg);
	}

	.ar-layout {
		grid-template-columns: 1fr;
	}

	.ar-header-main {
		flex-direction: column;
	}

	.ar-header-ticket-card.ar-box {
		flex-basis: auto;
		width: 100%;
	}

	.ar-event-card {
		grid-template-columns: 1fr;
		gap: 16px;
		padding: 20px 0;
	}

	.ar-event-content-col {
		border-left: none;
		padding-left: 0;
		border-top: 1px solid var(--ar-border);
		padding-top: 16px;
	}

	.ar-speakers-bookmark-row {
		flex-wrap: wrap;
	}

	.ar-day-tabs {
		flex-wrap: nowrap;
	}
}
