/* Ασκληπιείο – Ημερολόγιο Εφημεριών */

.aek-calendar *,
.aek-calendar *::before,
.aek-calendar *::after,
.aek-modal *,
.aek-modal *::before,
.aek-modal *::after {
	box-sizing: border-box;
}

.aek-calendar {
	--aek-border: #e3e6ea;
	--aek-bg: #ffffff;
	--aek-muted: #8a919b;
	--aek-text: #1d2327;
	--aek-accent: #030542;
	--aek-radius: 14px;
	font-family: inherit;
	color: var(--aek-text);
	max-width: 100%;
}

.aek-card {
	background: var(--aek-bg);
	border: 1px solid var(--aek-border);
	border-radius: var(--aek-radius);
	box-shadow: 0 8px 28px rgba(16, 24, 40, 0.07);
	overflow: hidden;
}

/* ---------- Header ---------- */
.aek-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 16px 18px;
	background: var(--aek-accent);
	color: #fff;
	flex-wrap: wrap;
}

.aek-calendar .aek-header .aek-title {
	font-size: 20px;
	font-weight: 700;
	margin: 0;
	padding: 0;
	line-height: 1.2;
	letter-spacing: 0.2px;
	text-transform: capitalize;
	color: #ffffff !important;
}

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

.aek-btn {
	appearance: none;
	border: 1px solid rgba(255, 255, 255, 0.35);
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	border-radius: 10px;
	padding: 7px 12px;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease;
}

.aek-btn:hover,
.aek-btn:focus-visible {
	background: rgba(255, 255, 255, 0.25);
	color: #fff;
	outline: none;
}

.aek-btn-arrow {
	width: 36px;
	height: 36px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
}

/* ---------- Legend ---------- */
.aek-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	padding: 12px 18px;
	border-bottom: 1px solid var(--aek-border);
	background: #fafbfc;
	font-size: 13px;
}

.aek-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: var(--aek-text);
}

.aek-legend-swatch {
	width: 13px;
	height: 13px;
	border-radius: 4px;
	flex: 0 0 auto;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.aek-legend-holiday {
	color: #b32d2e;
	font-weight: 600;
}

/* ---------- Grid ---------- */
.aek-weekdays,
.aek-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
}

.aek-weekdays {
	border-bottom: 1px solid var(--aek-border);
}

.aek-weekday {
	padding: 10px 6px;
	text-align: center;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--aek-muted);
}

.aek-day {
	min-height: 104px;
	border-right: 1px solid var(--aek-border);
	border-bottom: 1px solid var(--aek-border);
	padding: 6px;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 4px;
	background: var(--aek-bg);
	cursor: pointer;
	transition: background 0.12s ease;
}

.aek-day:nth-child(7n) {
	border-right: none;
}

.aek-day:hover {
	background: #f6f8fa;
}

.aek-day-out {
	background: #fafbfc;
}

.aek-day-out .aek-day-num {
	color: #c2c8cf;
}

.aek-day-num {
	font-size: 13px;
	font-weight: 600;
	color: var(--aek-text);
	width: 26px;
	height: 26px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	flex: 0 0 auto;
}

.aek-day-today .aek-day-num {
	background: var(--aek-accent);
	color: #fff;
}

@keyframes aek-pulse {
	0% {
		box-shadow: inset 0 0 0 3px var(--aek-accent);
		background: #eef0fb;
	}
	100% {
		box-shadow: inset 0 0 0 0 rgba(3, 5, 66, 0);
	}
}

.aek-day-pulse {
	animation: aek-pulse 1.5s ease;
}

.aek-day-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 4px;
}

.aek-day-holiday {
	font-size: 10px;
	line-height: 1.15;
	color: #b32d2e;
	font-weight: 600;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.aek-events {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.aek-chip {
	appearance: none;
	border: none;
	text-align: left;
	font: inherit;
	display: block;
	width: 100%;
	border-radius: 7px;
	padding: 4px 7px;
	font-size: 11.5px;
	line-height: 1.25;
	cursor: pointer;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	transition: filter 0.12s ease, transform 0.12s ease;
}

.aek-chip:hover,
.aek-chip:focus-visible {
	filter: brightness(1.12);
	transform: translateY(-1px);
	outline: none;
}

.aek-chip-time {
	font-weight: 700;
	margin-right: 4px;
	font-size: 10.5px;
	opacity: 0.9;
}

.aek-error {
	padding: 40px 20px;
	text-align: center;
	font-size: 14px;
	grid-column: 1 / -1;
	color: #b32d2e;
	align-self: center;
}

/* ---------- Loader ---------- */
.aek-grid-wrap {
	position: relative;
}

.aek-grid {
	min-height: 440px;
}

.aek-grid-loading {
	opacity: 0.4;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.aek-loader {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 5;
	pointer-events: none;
}

.aek-spinner {
	width: 44px;
	height: 44px;
	border: 4px solid rgba(3, 5, 66, 0.15);
	border-top-color: var(--aek-accent);
	border-radius: 50%;
	animation: aek-spin 0.8s linear infinite;
}

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

/* ---------- Modal ---------- */
.aek-modal-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(13, 18, 28, 0.55);
	backdrop-filter: blur(2px);
	z-index: 99998;
	opacity: 0;
	transition: opacity 0.18s ease;
}

.aek-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
	pointer-events: none;
}

.aek-modal-open .aek-modal-backdrop {
	opacity: 1;
}

.aek-modal-box {
	pointer-events: auto;
	background: #fff;
	border-radius: 16px;
	max-width: 460px;
	width: 100%;
	max-height: 84vh;
	overflow: auto;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
	transform: translateY(14px) scale(0.97);
	opacity: 0;
	transition: transform 0.18s ease, opacity 0.18s ease;
}

.aek-modal-open .aek-modal-box {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.aek-modal-header {
	padding: 16px 20px;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	position: sticky;
	top: 0;
	background: inherit;
}

.aek-modal-date {
	font-size: 16px;
	font-weight: 700;
	margin: 0;
	padding: 0;
	line-height: 1.3;
	color: inherit !important;
}

.aek-modal-holiday {
	display: inline-block;
	margin-top: 4px;
	font-size: 12px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.22);
}

.aek-modal-close {
	appearance: none;
	border: none;
	background: rgba(255, 255, 255, 0.18);
	color: inherit;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.aek-modal-close:hover {
	background: rgba(255, 255, 255, 0.32);
}

.aek-modal-body {
	padding: 14px 20px 20px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.aek-detail {
	border: 1px solid var(--aek-border, #e3e6ea);
	border-left-width: 5px;
	border-radius: 12px;
	padding: 12px 14px;
}

.aek-detail-title {
	font-size: 14.5px;
	font-weight: 700;
	margin: 0 0 4px;
	line-height: 1.35;
	color: #1d2327;
}

.aek-detail-time {
	font-size: 13px;
	font-weight: 600;
	color: #3c434a;
	display: flex;
	align-items: center;
	gap: 6px;
}

.aek-detail-desc {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.5;
	color: #50575e;
}

.aek-detail-link {
	display: inline-block;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.aek-clock {
	width: 14px;
	height: 14px;
	flex: 0 0 auto;
	opacity: 0.7;
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
	.aek-header {
		padding: 12px 14px;
		flex-wrap: nowrap; /* η πλοήγηση μένει δεξιά — όχι κάτω από floating widgets */
	}

	.aek-calendar .aek-header .aek-title {
		font-size: 16px;
	}

	.aek-btn {
		padding: 6px 10px;
		font-size: 13px;
	}

	.aek-btn-arrow {
		width: 32px;
		height: 32px;
	}

	.aek-legend {
		padding: 10px 12px;
		gap: 6px 12px;
		font-size: 11.5px;
	}

	.aek-grid {
		min-height: 320px;
	}

	.aek-day {
		min-height: 74px;
		padding: 4px;
		gap: 3px;
	}

	.aek-day-num {
		font-size: 11.5px;
		width: 21px;
		height: 21px;
	}

	.aek-day-holiday {
		display: none;
	}

	.aek-chip {
		padding: 0;
		height: 9px;
		flex: 0 0 9px;
		border-radius: 5px;
		font-size: 0;
	}

	.aek-chip .aek-chip-time {
		display: none;
	}

	.aek-holiday-dot {
		width: 6px;
		height: 6px;
		border-radius: 50%;
		background: #b32d2e;
		flex: 0 0 auto;
	}
}

@media (min-width: 721px) {
	.aek-holiday-dot {
		display: none;
	}
}
