.atem-public {
	--atem-blue: #003048;
	--atem-cyan: #129ebe;
	--atem-gold: #ffb800;
	--atem-border: #d8e1e5;
	--atem-muted: #5d6970;
	color: #17232a;
	font-family: inherit;
}

.atem-calendar-shell,
.atem-event-list-shell,
.atem-event-detail {
	width: min(1180px, calc(100% - 32px));
	margin: 32px auto;
}

.atem-calendar-shell {
	isolation: isolate;
	position: relative;
	overflow-anchor: none;
	-webkit-user-select: none;
	user-select: none;
}

.atem-calendar-search input {
	-webkit-user-select: text;
	user-select: text;
}

.atem-calendar-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: -10px 0 24px;
}

.atem-calendar-filters a {
	padding: 7px 14px;
	border: 1px solid var(--atem-border);
	border-radius: 999px;
	background: #fff;
	color: var(--atem-blue);
	font-size: .86rem;
	font-weight: 700;
	text-decoration: none;
	touch-action: manipulation;
}

.atem-calendar-filters a:hover,
.atem-calendar-filters a:focus,
.atem-calendar-filters a.is-active {
	border-color: var(--atem-blue);
	background: var(--atem-blue);
	color: #fff;
}

.atem-calendar-filters a[data-atem-type]:not([data-atem-type=""]) {
	border-color: var(--atem-type-color);
}

.atem-calendar-filters a[data-atem-type]:not([data-atem-type=""]).is-active {
	border-color: var(--atem-type-color);
	background: var(--atem-type-color);
	color: var(--atem-type-text);
}

.atem-calendar-shell.is-loading {
	cursor: progress;
}

.atem-calendar-shell.is-loading::before {
	content: "";
	position: absolute;
	z-index: 20;
	inset: 0;
	border-radius: 14px;
	background: rgb(255 255 255 / 64%);
	pointer-events: none;
}

.atem-calendar-shell.is-loading::after {
	content: "";
	position: absolute;
	z-index: 21;
	top: 120px;
	left: 50%;
	width: 34px;
	height: 34px;
	margin-left: -17px;
	border: 4px solid #d8e1e5;
	border-top-color: var(--atem-blue);
	border-radius: 50%;
	animation: atem-calendar-spin .75s linear infinite;
	pointer-events: none;
}

@keyframes atem-calendar-spin {
	to { transform: rotate(360deg); }
}

.atem-calendar-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 18px;
}

.atem-calendar-toolbar h2 {
	margin: 0;
	color: var(--atem-blue);
	font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.atem-calendar-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin: -6px 0 14px;
	color: var(--atem-muted);
	font-size: .82rem;
}

.atem-calendar-legend span {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.atem-calendar-legend i {
	display: inline-block;
	width: 26px;
	height: 12px;
	border-radius: 3px;
}

.atem-legend-event {
	border-left: 4px solid var(--atem-cyan);
	background: color-mix(in srgb, var(--atem-cyan) 12%, white);
}

.atem-legend-registration {
	border: 1px dashed var(--atem-cyan);
	background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--atem-cyan) 13%, white) 0 4px, #fff 4px 8px);
}

.atem-calendar-nav {
	display: flex;
	align-items: center;
	gap: 8px;
}

.atem-calendar-nav a {
	display: inline-grid;
	min-width: 42px;
	height: 42px;
	place-items: center;
	border: 1px solid var(--atem-border);
	border-radius: 8px;
	background: #fff;
	color: var(--atem-blue);
	font-size: 1.5rem;
	text-decoration: none;
	touch-action: manipulation;
	-webkit-user-select: none;
	user-select: none;
}

.atem-calendar-nav .atem-today-link {
	padding: 0 15px;
	font-size: .95rem;
}

.atem-calendar {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	overflow: hidden;
	border: 1px solid var(--atem-border);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 12px 36px rgb(0 48 72 / 8%);
}

.atem-calendar-weekday {
	padding: 12px 8px;
	border-bottom: 1px solid var(--atem-border);
	background: #f5f8f9;
	color: var(--atem-muted);
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-align: center;
	text-transform: uppercase;
}

.atem-calendar-day {
	min-height: 132px;
	padding: 8px;
	border-right: 1px solid var(--atem-border);
	border-bottom: 1px solid var(--atem-border);
	background: #fff;
}

.atem-calendar-day:nth-child(7n) {
	border-right: 0;
}

.atem-calendar-empty {
	background: #fafcfc;
}

.atem-calendar-number {
	width: 30px;
	height: 30px;
	margin-bottom: 6px;
	line-height: 30px;
	text-align: center;
}

.atem-calendar-day.is-today .atem-calendar-number {
	border-radius: 50%;
	background: var(--atem-gold);
	color: var(--atem-blue);
	font-weight: 800;
}

.atem-calendar-event {
	display: block;
	margin: 5px 0;
	padding: 7px 8px;
	border-left: 4px solid var(--atem-event-color);
	border-radius: 6px;
	background: color-mix(in srgb, var(--atem-event-color) 10%, white);
	color: #17232a;
	font-size: .78rem;
	line-height: 1.25;
	text-decoration: none;
	touch-action: manipulation;
	-webkit-user-select: none;
	user-select: none;
}

.atem-calendar-event span,
.atem-calendar-event em,
.atem-calendar-event strong {
	display: block;
}

.atem-calendar-event span {
	margin-bottom: 2px;
	color: var(--atem-muted);
	font-size: .72rem;
}

.atem-calendar-event em {
	margin-bottom: 2px;
	color: color-mix(in srgb, var(--atem-event-color) 55%, #17232a);
	font-size: .64rem;
	font-style: normal;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.atem-calendar-registration {
	display: flex;
	align-items: center;
	min-height: 12px;
	margin: 4px 0;
	padding: 3px 6px;
	overflow: hidden;
	border: 1px dashed var(--atem-event-color);
	border-radius: 4px;
	background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--atem-event-color) 12%, white) 0 5px, #fff 5px 10px);
	color: #17232a;
	font-size: .67rem;
	line-height: 1.2;
	text-decoration: none;
	touch-action: manipulation;
}

.atem-calendar-registration strong {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.atem-calendar-registration.is-middle:not(.is-end) {
	min-height: 8px;
	padding-block: 0;
}

.atem-calendar-registration.is-start {
	border-left-width: 4px;
}

.atem-calendar-registration.is-end {
	border-right-width: 4px;
}

.atem-calendar-search-results {
	margin-top: 8px;
}

.atem-calendar-search-heading {
	margin-bottom: 18px;
}

.atem-calendar-search-heading h2 {
	margin: 0 0 6px;
	color: var(--atem-blue);
	font-size: clamp(1.35rem, 2.5vw, 2rem);
}

.atem-calendar-search-heading p,
.atem-event-registration-range {
	color: var(--atem-muted);
}

.atem-calendar-mobile {
	display: none;
}

.atem-event-search {
	display: flex;
	gap: 10px;
	margin-bottom: 24px;
}

.atem-event-search input {
	flex: 1;
	min-height: 46px;
	padding: 8px 14px;
	border: 1px solid var(--atem-border);
	border-radius: 8px;
}

.atem-event-search button,
.atem-public-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 18px;
	border: 1px solid var(--atem-blue);
	border-radius: 8px;
	background: var(--atem-blue);
	color: #fff !important;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none !important;
}

.atem-public-button-secondary {
	background: #fff;
	color: var(--atem-blue) !important;
}

.atem-event-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
}

.atem-event-card,
.atem-public-card {
	overflow: hidden;
	border: 1px solid var(--atem-border);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 10px 28px rgb(0 48 72 / 8%);
}

.atem-event-card {
	border-top: 5px solid var(--atem-event-color);
}

.atem-event-card img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 8;
	object-fit: cover;
}

.atem-event-card-body {
	padding: 20px;
}

.atem-event-card h3 {
	margin: 12px 0 8px;
	font-size: 1.25rem;
}

.atem-event-card h3 a {
	color: var(--atem-blue);
	text-decoration: none;
}

.atem-public-status {
	display: inline-flex;
	padding: 5px 10px;
	border-radius: 999px;
	background: #e7eef1;
	color: var(--atem-blue);
	font-size: .75rem;
	font-weight: 800;
	letter-spacing: .02em;
}

.atem-event-badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.atem-event-type-badge {
	display: inline-flex;
	padding: 5px 10px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--atem-event-color) 14%, white);
	color: color-mix(in srgb, var(--atem-event-color) 55%, #17232a);
	font-size: .75rem;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.atem-event-header > .atem-event-type-badge {
	margin-right: 7px;
}

.atem-public-status.is-abiertas { background: #dbf6e8; color: #12613a; }
.atem-public-status.is-cancelado { background: #fde5e5; color: #982424; }
.atem-public-status.is-cerradas,
.atem-public-status.is-realizado { background: #eef0f1; color: #59636a; }
.atem-public-status.is-proximo { background: #fff2c7; color: #6b5200; }

.atem-event-template {
	padding: 18px 0 64px;
}

.atem-event-back {
	display: inline-block;
	margin-bottom: 22px;
	color: var(--atem-blue);
	font-weight: 700;
	text-decoration: none;
}

.atem-event-cover {
	display: block;
	width: 100%;
	max-height: 480px;
	margin-bottom: 28px;
	border-radius: 16px;
	object-fit: cover;
}

.atem-event-header {
	padding-left: 20px;
	border-left: 6px solid var(--atem-event-color);
}

.atem-event-header h1 {
	margin: 10px 0;
	color: var(--atem-blue);
	font-size: clamp(2rem, 5vw, 3.75rem);
	line-height: 1.08;
}

.atem-event-date {
	color: var(--atem-muted);
	font-size: 1.05rem;
}

.atem-event-description {
	max-width: 820px;
	margin: 28px 0;
	font-size: 1.05rem;
}

.atem-event-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 24px 0 34px;
}

.atem-event-detail-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.atem-public-card {
	padding: 22px;
}

.atem-public-card h2 {
	margin-top: 0;
	color: var(--atem-blue);
	font-size: 1.25rem;
}

.atem-public-card dl,
.atem-public-card dl div {
	margin: 0;
}

.atem-public-card dl div + div {
	margin-top: 14px;
}

.atem-public-card dt {
	font-size: .75rem;
	font-weight: 800;
	letter-spacing: .05em;
	text-transform: uppercase;
}

.atem-public-card dd {
	margin: 3px 0 0;
}

.atem-event-categories,
.atem-event-qr {
	margin-top: 20px;
}

.atem-category-public-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.atem-category-public-list div {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 12px;
	border-radius: 8px;
	background: #f5f8f9;
}

.atem-category-public-list span {
	color: var(--atem-muted);
}

.atem-event-qr {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
}

.atem-event-qr img {
	border: 8px solid #fff;
	box-shadow: 0 4px 16px rgb(0 48 72 / 12%);
}

.atem-public-message {
	padding: 18px;
	border: 1px solid var(--atem-border);
	border-radius: 10px;
	background: #fff;
}

@media (max-width: 900px) {
	.atem-event-cards,
	.atem-event-detail-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 720px) {
	.atem-calendar {
		display: none;
	}

	.atem-calendar-legend {
		display: none;
	}

	.atem-calendar-mobile {
		display: block;
	}

	.atem-calendar-toolbar {
		align-items: flex-start;
		flex-direction: column-reverse;
	}

	.atem-event-cards,
	.atem-event-detail-grid,
	.atem-category-public-list {
		grid-template-columns: 1fr;
	}

	.atem-event-qr {
		align-items: flex-start;
		flex-direction: column;
	}

	.atem-event-search {
		flex-direction: column;
	}
}

@media (prefers-reduced-motion: reduce) {
	.atem-public *,
	.atem-public *::before,
	.atem-public *::after {
		scroll-behavior: auto !important;
		transition: none !important;
	}

	.atem-calendar-shell.is-loading::after {
		animation: none;
	}
}
