/* Γ.Ν. Νίκαιας «Άγιος Παντελεήμων» – Ημερολόγιο Εφημεριών */

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

.nek-calendar {
	--nek-border: var(--qq-line, #dfe3e6);
	--nek-bg: #ffffff;
	--nek-soft: var(--qq-grey-tint, #f6f6f7);
	--nek-muted: var(--qq-muted, #506f72);
	--nek-text: var(--qq-text, #3e4c59);
	--nek-accent: var(--qq-navy, #202c44); /* overridden inline by the colour set in the settings */
	--nek-holiday: var(--qq-coral-text, #b03b3d);
	--nek-radius: 10px;
	font-family: inherit;
	color: var(--nek-text);
	max-width: 100%;
}

.nek-card {
	background: var(--nek-bg);
	border: 1px solid var(--nek-border);
	border-radius: var(--nek-radius);
	box-shadow: 0 10px 24px rgba(32, 44, 68, 0.08);
	overflow: hidden;
}

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

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

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

.nek-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;
}

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

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

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

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

.nek-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);
}

.nek-legend-holiday {
	color: var(--nek-holiday);
	font-weight: 600;
}

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

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

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

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

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

.nek-day:hover {
	background: var(--nek-soft);
}

.nek-day-out {
	background: var(--nek-soft);
}

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

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

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

@keyframes nek-pulse {
	0% {
		box-shadow: inset 0 0 0 3px var(--nek-accent);
		background: var(--qq-tint, #eaf0f0);
	}
	100% {
		box-shadow: inset 0 0 0 0 transparent;
	}
}

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

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

.nek-day-holiday {
	font-size: 10px;
	line-height: 1.15;
	color: var(--nek-holiday);
	font-weight: 600;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

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

.nek-chip {
	appearance: none;
	border: none;
	text-align: left;
	font: inherit;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 1px;
	width: 100%;
	border-radius: 7px;
	padding: 4px 7px;
	font-size: 11px;
	line-height: 1.25;
	cursor: pointer;
	overflow: hidden;
	transition: filter 0.12s ease, transform 0.12s ease;
}

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

.nek-chip-time,
.nek-chip-label {
	display: block;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.nek-chip-time {
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.nek-error {
	padding: 40px 20px;
	text-align: center;
	font-size: 14px;
	grid-column: 1 / -1;
	color: var(--nek-holiday);
	align-self: center;
}

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

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

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

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

.nek-spinner {
	width: 44px;
	height: 44px;
	border: 4px solid var(--qq-tint, #eaf0f0);
	border-top-color: var(--nek-accent);
	border-radius: 50%;
	animation: nek-spin 0.8s linear infinite;
}

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

/* ---------- Modal ---------- */
.nek-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;
}

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

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

.nek-modal-box {
	pointer-events: auto;
	background: #fff;
	border-radius: 12px;
	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;
}

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

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

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

.nek-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);
}

.nek-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;
}

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

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

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

.nek-detail-title {
	font-size: 14.5px;
	font-weight: 700;
	margin: 0 0 4px;
	line-height: 1.35;
	color: #202c44;
}

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

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

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

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

/* ---------- Month list (readable on phones, where the grid only shows bars) ---------- */
.nek-list-wrap {
	padding: 18px;
	border-top: 1px solid var(--nek-border);
}

.nek-calendar .nek-list-title {
	margin: 0 0 12px;
	padding: 0;
	font-family: inherit;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--qq-navy, #202c44);
}

.nek-calendar .nek-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 8px;
}

.nek-calendar .nek-list-item {
	margin: 0;
	padding: 10px 12px;
	border: 1px solid var(--nek-border);
	border-left: 4px solid var(--nek-accent);
	border-radius: 8px;
	background: var(--nek-bg);
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 14px;
	line-height: 1.4;
}

.nek-list-date {
	font-weight: 700;
	color: var(--qq-navy, #202c44);
}

.nek-list-label {
	font-weight: 600;
	color: var(--nek-text);
}

.nek-list-time {
	color: var(--nek-text);
	font-variant-numeric: tabular-nums;
}

.nek-list-holiday {
	font-size: 12px;
	font-weight: 600;
	color: var(--nek-holiday);
}

.nek-calendar .nek-list-past {
	opacity: 0.55;
}

.nek-calendar .nek-list-today {
	background: var(--qq-tint, #eaf0f0);
}

.nek-list-empty {
	margin: 0;
	font-size: 14px;
	color: var(--nek-muted);
}

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

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

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

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

	.nek-list-wrap {
		padding: 14px 12px;
	}

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

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

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

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

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

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

	.nek-chip .nek-chip-time,
	.nek-chip .nek-chip-label {
		display: none;
	}

	.nek-holiday-dot {
		width: 6px;
		height: 6px;
		border-radius: 50%;
		background: var(--nek-holiday);
		flex: 0 0 auto;
	}
}

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