/*
 * ACHILE Event Widget
 * Same component and interaction on desktop/mobile.
 * Mobile only reduces density, it does not change the UX model.
 */

.achile-event-widget {
	--event-blue: var(--achile-blue, #0085c6);
	--event-dark: var(--blue-dark, #1A3E6E);
	--event-coral: var(--achile-red, #F16C76);
	--event-yellow: var(--achile-yellow, #FFB056);
	--event-text: var(--text-mid, #4A5568);
	--event-muted: #718096;
	--event-border: #E8EEF6;
	--event-bg: rgba(255,255,255,.96);

	position: relative;
	z-index: 20;
	width: min(100%, 510px);
	font-family: 'Barlow', Arial, sans-serif;
	color: var(--event-dark);
}

.achile-event-widget *,
.achile-event-widget *::before,
.achile-event-widget *::after {
	box-sizing: border-box;
}

.achile-event-widget a {
	text-decoration: none;
}

.achile-event-widget svg {
	display: block;
	width: 1em;
	height: 1em;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.achile-event-widget__inner {
	position: relative;
}

.achile-event-widget__summary {
	position: relative;
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) 36px;
	align-items: center;
	gap: 14px;
	width: 100%;
	min-height: 82px;
	padding: 12px 13px;
	border: 1.5px solid var(--event-border);
	border-radius: 16px;
	background:
		radial-gradient(circle at 98% 0%, rgba(184,231,255,.22) 0 52px, transparent 54px),
		var(--event-bg);
	color: var(--event-dark);
	text-align: left;
	box-shadow: 0 10px 28px rgba(26,62,110,.075);
	cursor: pointer;
	transition:
		border-color .22s ease,
		box-shadow .22s ease,
		transform .22s ease,
		border-radius .22s ease;
}

.achile-event-widget__summary:hover {
	border-color: rgba(0,133,198,.28);
	box-shadow: 0 14px 32px rgba(26,62,110,.11);
	transform: translateY(-1px);
}

.achile-event-widget__summary:focus-visible {
	outline: 3px solid rgba(0,133,198,.18);
	outline-offset: 3px;
}

.achile-event-widget.is-open .achile-event-widget__summary {
	border-color: rgba(0,133,198,.24);
	border-radius: 16px 16px 0 0;
	box-shadow: 0 12px 30px rgba(26,62,110,.10);
	transform: none;
}

.achile-event-widget__date {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border: 1px solid rgba(241,108,118,.16);
	border-radius: 14px;
	background: linear-gradient(145deg, rgba(247,188,194,.58), rgba(255,222,199,.58));
	color: var(--event-coral);
	line-height: 1;
	text-align: center;
}

.achile-event-widget__date strong {
	color: var(--event-dark);
	font-size: 22px;
	font-weight: 900;
}

.achile-event-widget__date span {
	margin-top: 4px;
	font-size: 9px;
	font-weight: 900;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.achile-event-widget__summary-copy {
	display: grid;
	min-width: 0;
	gap: 3px;
}

.achile-event-widget__label {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	color: var(--event-coral);
	font-size: 9.5px;
	font-weight: 900;
	line-height: 1.15;
	letter-spacing: .10em;
	text-transform: uppercase;
}

.achile-event-widget__label::before {
	content: "";
	width: 5px;
	height: 5px;
	margin-right: 6px;
	border-radius: 50%;
	background: var(--event-coral);
}

.achile-event-widget__title {
	display: -webkit-box;
	overflow: hidden;
	color: var(--event-dark);
	font-size: 14px;
	font-weight: 900;
	line-height: 1.28;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.achile-event-widget__meta {
	overflow: hidden;
	color: var(--event-muted);
	font-size: 10.5px;
	font-weight: 600;
	line-height: 1.25;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.achile-event-widget__chevron-wrap {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: rgba(184,231,255,.30);
	color: var(--event-blue);
}

.achile-event-widget__chevron {
	width: 17px;
	height: 17px;
	transition: transform .22s ease;
}

.achile-event-widget.is-open .achile-event-widget__chevron {
	transform: rotate(180deg);
}

.achile-event-widget__panel {
	position: absolute;
	z-index: 50;
	top: calc(100% - 1px);
	right: 0;
	left: 0;
	padding: 18px;
	border: 1.5px solid rgba(0,133,198,.18);
	border-top: 0;
	border-radius: 0 0 16px 16px;
	background: rgba(255,255,255,.985);
	box-shadow: 0 24px 50px rgba(26,62,110,.16);
	backdrop-filter: blur(12px);
}

.achile-event-widget__panel[hidden] {
	display: none;
}

.achile-event-widget__list {
	display: grid;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.achile-event-widget__list li {
	display: grid;
	grid-template-columns: 58px minmax(0, 1fr);
	gap: 14px;
	padding: 16px 0;
	border-bottom: 1px solid #EDF2F7;
}

.achile-event-widget__list li:first-child {
	padding-top: 2px;
}

.achile-event-widget__list li:last-child {
	border-bottom: 0;
}

.achile-event-widget__list li.is-primary {
	padding: 4px 0 18px;
}

.achile-event-widget__list time {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	align-self: start;
	min-height: 58px;
	padding: 7px;
	border-radius: 14px;
	background: rgba(245,248,252,.9);
	color: var(--event-coral);
	font-size: 9px;
	font-weight: 900;
	line-height: 1;
	text-transform: uppercase;
}

.achile-event-widget__list li.is-primary time {
	background: linear-gradient(145deg, rgba(247,188,194,.52), rgba(255,222,199,.52));
}

.achile-event-widget__list time span {
	margin-bottom: 4px;
	color: var(--event-dark);
	font-size: 21px;
	line-height: 1;
}

.achile-event-widget__item-content {
	min-width: 0;
}

.achile-event-widget__item-content h3 {
	margin: 0 0 4px;
	color: var(--event-dark);
	font-size: 14px;
	font-weight: 900;
	line-height: 1.3;
}

.achile-event-widget__item-content p {
	margin: 0;
	color: var(--event-text);
	font-size: 11.5px;
	line-height: 1.5;
}

.achile-event-widget__item-content .achile-event-widget__location {
	margin-bottom: 5px;
	color: var(--event-blue);
	font-size: 10.5px;
	font-weight: 800;
}

.achile-event-widget__item-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 14px;
	margin-top: 10px;
}

.achile-event-widget__link,
.achile-event-widget__ics,
.achile-event-widget__all {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 900;
	transition: color .2s ease, gap .2s ease;
}

.achile-event-widget__link {
	color: var(--event-blue);
}

.achile-event-widget__ics {
	color: var(--event-dark);
}

.achile-event-widget__link:hover,
.achile-event-widget__ics:hover,
.achile-event-widget__all:hover {
	gap: 9px;
	color: var(--event-coral);
}

.achile-event-widget__link svg,
.achile-event-widget__ics svg,
.achile-event-widget__all svg {
	width: 14px;
	height: 14px;
}

.achile-event-widget__all {
	justify-content: flex-end;
	width: 100%;
	margin-top: 8px;
	padding-top: 13px;
	border-top: 1px solid #EDF2F7;
	color: var(--event-blue);
}

@media (max-width: 760px) {
	.achile-event-widget {
		width: 100%;
		max-width: none;
	}

	.achile-event-widget__summary {
		grid-template-columns: 50px minmax(0, 1fr) 34px;
		gap: 11px;
		min-height: 72px;
		padding: 10px;
		border-radius: 14px;
	}

	.achile-event-widget.is-open .achile-event-widget__summary {
		border-radius: 14px 14px 0 0;
	}

	.achile-event-widget__date {
		width: 50px;
		height: 50px;
		border-radius: 12px;
	}

	.achile-event-widget__date strong {
		font-size: 20px;
	}

	.achile-event-widget__label {
		font-size: 8.8px;
	}

	.achile-event-widget__title {
		font-size: 12.5px;
		line-height: 1.25;
	}

	.achile-event-widget__meta {
		display: none;
	}

	.achile-event-widget__chevron-wrap {
		width: 32px;
		height: 32px;
	}

	.achile-event-widget__panel {
		padding: 14px;
		border-radius: 0 0 14px 14px;
	}

	.achile-event-widget__list li {
		grid-template-columns: 50px minmax(0, 1fr);
		gap: 11px;
		padding: 14px 0;
	}

	.achile-event-widget__list time {
		min-height: 50px;
		border-radius: 12px;
	}

	.achile-event-widget__list time span {
		font-size: 19px;
	}
}

@media (max-width: 480px) {
	.achile-event-widget__summary {
		grid-template-columns: 48px minmax(0, 1fr) 30px;
		gap: 10px;
	}

	.achile-event-widget__date {
		width: 48px;
		height: 48px;
	}

	.achile-event-widget__chevron-wrap {
		width: 30px;
		height: 30px;
	}

	.achile-event-widget__panel {
		right: 0;
		left: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.achile-event-widget *,
	.achile-event-widget *::before,
	.achile-event-widget *::after {
		transition-duration: .01ms !important;
	}
}
