/* ==========================================================================
   AIF eSport Kalender — dark esports theme (AlhedeLan-inspired)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700;800&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap');

.aif-cal-root {
	--aif-bg: #100c22;
	--aif-card: #1a1533;
	--aif-card-hover: #211a40;
	--aif-line: #2c2452;
	--aif-ink: #f2f0fb;
	--aif-muted: #948eb8;
	--aif-purple: #7c5cff;
	--aif-purple-dark: #6544e0;
	--aif-purple-glow: rgba(124,92,255,0.35);
	--aif-green: #22c55e;

	--aif-type-traening: #22c55e;
	--aif-type-kamp: #f2b544;
	--aif-type-lan: #7c5cff;
	--aif-type-pokemon: #ee1515;
	--aif-type-andet: #6ea8d8;

	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	color: var(--aif-ink);
	background: var(--aif-bg);
	border: 1px solid var(--aif-line);
	border-radius: 18px;
	padding: 24px;
	width: 100%;
	max-width: 1400px;
	box-sizing: border-box;
}
.aif-cal-root *, .aif-cal-root *::before, .aif-cal-root *::after { box-sizing: border-box; }

/* ---------- Header ---------- */
.aif-cal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 20px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--aif-line);
}
.aif-cal-title {
	display: flex;
	align-items: center;
	gap: 14px;
}
.aif-logo {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 12px;
	background: transparent;
	border: 1px solid var(--aif-line);
	padding: 0;
	flex-shrink: 0;
}
.aif-brand-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.aif-brand-eyebrow {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--aif-purple);
}
.aif-title-text {
	font-family: 'Space Grotesk', sans-serif;
	font-weight: 700;
	font-size: 21px;
	letter-spacing: -0.01em;
	color: var(--aif-ink);
}

.aif-cal-nav {
	display: flex;
	align-items: center;
	gap: 8px;
}
.aif-cal-btn {
	font-family: inherit;
	border: 1px solid var(--aif-line);
	background: var(--aif-card);
	color: var(--aif-ink);
	border-radius: 10px;
	padding: 8px 12px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all .15s ease;
	line-height: 1;
}
.aif-cal-btn:hover { border-color: var(--aif-purple); background: var(--aif-card-hover); }
.aif-cal-btn.aif-icon { padding: 8px 10px; color: var(--aif-muted); }
.aif-cal-btn.aif-today {
	background: var(--aif-purple);
	border-color: var(--aif-purple);
	color: #fff;
	box-shadow: 0 0 0 3px var(--aif-purple-glow);
}
.aif-cal-btn.aif-today:hover { background: var(--aif-purple-dark); border-color: var(--aif-purple-dark); }

.aif-cal-toggle {
	display: inline-flex;
	background: var(--aif-card);
	border: 1px solid var(--aif-line);
	border-radius: 10px;
	padding: 3px;
	gap: 2px;
}
.aif-cal-toggle button {
	font-family: inherit;
	border: none;
	background: transparent;
	color: var(--aif-muted);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 7px 15px;
	border-radius: 7px;
	cursor: pointer;
	transition: all .15s ease;
}
.aif-cal-toggle button.active {
	background: var(--aif-purple);
	color: #fff;
	box-shadow: 0 0 0 3px var(--aif-purple-glow);
}

/* ---------- Weeks-as-columns layout (month + week view share this) ---------- */
.aif-weeks-scroll {
	display: flex;
	gap: 14px;
	overflow-x: auto;
	padding-bottom: 8px;
}
.aif-weeks-scroll.aif-single-week .aif-week-column {
	flex: 1 0 100%;
	max-width: none;
}

.aif-week-column {
	flex: 1 0 240px;
	min-width: 240px;
	max-width: 280px;
	background: var(--aif-card);
	border: 1px solid var(--aif-line);
	border-radius: 16px;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.aif-week-column-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding-bottom: 12px;
	margin-bottom: 8px;
	border-bottom: 1px solid var(--aif-line);
}
.aif-week-badge {
	font-family: 'JetBrains Mono', monospace;
	font-size: 11px;
	font-weight: 700;
	color: var(--aif-purple);
	background: var(--aif-bg);
	border: 1px solid var(--aif-line);
	padding: 5px 11px;
	border-radius: 999px;
	letter-spacing: 0.03em;
	transition: border-color .15s ease;
}
.aif-week-badge:hover { border-color: var(--aif-purple); }
.aif-week-current-tag {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #fff;
	background: var(--aif-purple);
	padding: 4px 9px;
	border-radius: 999px;
	box-shadow: 0 0 0 3px var(--aif-purple-glow);
}

.aif-day-row {
	display: flex;
	flex-direction: column;
	gap: 7px;
	padding: 10px 0;
	border-bottom: 1px dashed var(--aif-line);
}
.aif-day-row:last-child { border-bottom: none; }
.aif-day-row.aif-outside { opacity: 0.32; }
.aif-day-row.aif-today { background: rgba(124,92,255,0.06); border-radius: 10px; padding-left: 8px; padding-right: 8px; margin: 0 -8px; }

.aif-day-row-label {
	display: flex;
	align-items: center;
	gap: 10px;
}
.aif-day-row-name {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--aif-muted);
	letter-spacing: 0.05em;
	width: 32px;
}
.aif-day-row-num {
	font-family: 'Space Grotesk', sans-serif;
	font-weight: 700;
	font-size: 16px;
	color: var(--aif-ink);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
}
.aif-day-row.aif-today .aif-day-row-num {
	background: var(--aif-purple);
	color: #fff;
}

.aif-event-card {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--aif-bg);
	border-left: 4px solid var(--aif-type-traening);
	border-radius: 10px;
	padding: 10px 12px;
	cursor: pointer;
	transition: background .15s ease, transform .12s ease;
}
.aif-event-card:hover { background: #1c1836; transform: translateX(2px); }
.aif-event-card.aif-t-kamp { border-left-color: var(--aif-type-kamp); }
.aif-event-card.aif-t-lan { border-left-color: var(--aif-type-lan); }
.aif-event-card.aif-t-pokemon { border-left-color: var(--aif-type-pokemon); }
.aif-event-card.aif-t-andet { border-left-color: var(--aif-type-andet); }

.aif-ec-tag {
	font-size: 9.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 4px 8px;
	border-radius: 6px;
	background: var(--aif-type-traening);
	color: #0d0b1a;
	flex-shrink: 0;
}
.aif-event-card.aif-t-kamp .aif-ec-tag { background: var(--aif-type-kamp); }
.aif-event-card.aif-t-lan .aif-ec-tag { background: var(--aif-type-lan); color: #fff; }
.aif-event-card.aif-t-pokemon .aif-ec-tag { background: var(--aif-type-pokemon); color: #fff; }
.aif-event-card.aif-t-andet .aif-ec-tag { background: var(--aif-type-andet); color: #0d0b1a; }

.aif-ec-title {
	font-weight: 700;
	font-size: 13.5px;
	color: var(--aif-ink);
	flex: 1;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.aif-ec-time {
	font-family: 'JetBrains Mono', monospace;
	font-size: 11px;
	color: var(--aif-muted);
	flex-shrink: 0;
}

.aif-more {
	font-size: 11px;
	color: var(--aif-purple);
	font-weight: 600;
	padding-left: 42px;
}
.aif-more:hover { text-decoration: underline; }

/* ---------- Modal (day detail) ---------- */
.aif-modal-overlay {
	position: fixed; inset: 0;
	background: rgba(8,6,18,0.6);
	display: flex; align-items: center; justify-content: center;
	z-index: 9999;
	padding: 20px;
}
.aif-modal {
	background: var(--aif-card);
	border: 1px solid var(--aif-line);
	border-radius: 16px;
	padding: 22px;
	max-width: 380px;
	width: 100%;
	max-height: 80vh;
	overflow-y: auto;
}
.aif-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.aif-modal-head h3 { font-family: 'Space Grotesk', sans-serif; margin: 0; font-size: 17px; color: var(--aif-ink); }
.aif-modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--aif-muted); line-height: 1; }
.aif-modal-close:hover { color: var(--aif-ink); }
.aif-modal-event { padding: 10px 0; border-bottom: 1px solid var(--aif-line); }
.aif-modal-event:last-child { border-bottom: none; }
.aif-modal-event .aif-me-title { font-weight: 700; margin-bottom: 3px; color: var(--aif-ink); }
.aif-modal-event .aif-me-meta { font-size: 12px; color: var(--aif-muted); }
.aif-modal-event .aif-me-desc { font-size: 13px; margin-top: 6px; color: var(--aif-ink); }

/* ---------- Side panel (event detail) ---------- */
.aif-panel-overlay {
	position: fixed; inset: 0;
	background: rgba(8,6,18,0.65);
	z-index: 9998;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease;
}
.aif-panel-overlay.aif-open {
	opacity: 1;
	pointer-events: auto;
}

.aif-side-panel {
	position: fixed;
	top: 0;
	right: 0;
	height: 100vh;
	width: 380px;
	max-width: 90vw;
	background: var(--aif-card, #1a1533);
	border-left: 1px solid var(--aif-line, #2c2452);
	box-shadow: -12px 0 40px rgba(0,0,0,0.4);
	z-index: 9999;
	transform: translateX(100%);
	transition: transform .25s ease;
	display: flex;
	flex-direction: column;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	color: var(--aif-ink, #f2f0fb);
}
.aif-side-panel.aif-open { transform: translateX(0); }

.aif-panel-banner {
	height: 8px;
	background: var(--aif-type-traening, #22c55e);
	flex-shrink: 0;
}
.aif-panel-banner.aif-t-kamp { background: var(--aif-type-kamp, #f2b544); }
.aif-panel-banner.aif-t-lan { background: var(--aif-type-lan, #7c5cff); }
.aif-panel-banner.aif-t-pokemon { background: var(--aif-type-pokemon, #ee1515); }
.aif-panel-banner.aif-t-andet { background: var(--aif-type-andet, #6ea8d8); }

.aif-panel-body {
	padding: 26px;
	overflow-y: auto;
	flex: 1;
}

.aif-panel-close {
	position: absolute;
	top: 16px;
	right: 16px;
	background: var(--aif-bg, #100c22);
	border: 1px solid var(--aif-line, #2c2452);
	border-radius: 50%;
	width: 32px;
	height: 32px;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	color: var(--aif-muted, #948eb8);
}
.aif-panel-close:hover { color: var(--aif-ink, #f2f0fb); border-color: var(--aif-purple, #7c5cff); }

.aif-panel-type-tag {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #0d0b1a;
	background: var(--aif-type-traening, #22c55e);
	padding: 5px 11px;
	border-radius: 999px;
	margin-bottom: 16px;
}
.aif-panel-type-tag.aif-t-kamp { background: var(--aif-type-kamp, #f2b544); }
.aif-panel-type-tag.aif-t-lan { background: var(--aif-type-lan, #7c5cff); color: #fff; }
.aif-panel-type-tag.aif-t-pokemon { background: var(--aif-type-pokemon, #ee1515); color: #fff; }
.aif-panel-type-tag.aif-t-andet { background: var(--aif-type-andet, #6ea8d8); }

.aif-panel-title {
	font-family: 'Space Grotesk', sans-serif;
	font-size: 23px;
	font-weight: 700;
	margin: 0 0 20px;
	line-height: 1.2;
	padding-right: 30px;
	color: var(--aif-ink, #f2f0fb);
}

.aif-panel-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 15px;
	font-size: 14px;
}
.aif-panel-row .aif-panel-value { flex: 1; color: var(--aif-ink, #f2f0fb); }
.aif-panel-row .aif-panel-label {
	display: block;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--aif-purple, #7c5cff);
	margin-bottom: 3px;
}

.aif-panel-desc {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--aif-line, #2c2452);
	font-size: 14px;
	line-height: 1.6;
	color: var(--aif-muted, #948eb8);
}

.aif-panel-signup {
	display: block;
	text-align: center;
	margin-top: 26px;
	background: var(--aif-purple, #7c5cff);
	color: #fff !important;
	text-decoration: none;
	font-weight: 700;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 14px 20px;
	border-radius: 10px;
	transition: background .15s ease, box-shadow .15s ease;
	box-shadow: 0 0 0 0 var(--aif-purple-glow, rgba(124,92,255,0.35));
}
.aif-panel-signup:hover {
	background: var(--aif-purple-dark, #6544e0);
	box-shadow: 0 0 0 4px var(--aif-purple-glow, rgba(124,92,255,0.35));
}

@media (max-width: 480px) {
	.aif-side-panel { width: 100vw; max-width: 100vw; }
}

/* ---------- Signup block (Pokémon GO / native participant list) ---------- */
.aif-signup-block {
	margin-top: 22px;
	padding-top: 20px;
	border-top: 1px solid var(--aif-line, #234436);
}
.aif-signup-heading {
	font-size: 13px;
	font-weight: 700;
	color: var(--aif-ink, #eafbf2);
	margin-bottom: 10px;
}
.aif-signup-list {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-height: 180px;
	overflow-y: auto;
}
.aif-signup-list li {
	background: var(--aif-bg, #0b1613);
	border: 1px solid var(--aif-line, #234436);
	border-radius: 8px;
	padding: 8px 12px;
	font-size: 13px;
	color: var(--aif-ink, #eafbf2);
}
.aif-signup-form {
	display: flex;
	gap: 8px;
}
.aif-signup-input {
	flex: 1;
	background: var(--aif-bg, #0b1613);
	border: 1px solid var(--aif-line, #234436);
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 13px;
	color: var(--aif-ink, #eafbf2);
	font-family: inherit;
}
.aif-signup-input:focus {
	outline: none;
	border-color: var(--aif-purple, #7c5cff);
}
.aif-signup-btn {
	background: var(--aif-purple, #7c5cff);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
	transition: background .15s ease;
}
.aif-signup-btn:hover:not(:disabled) { background: var(--aif-purple-dark, #6544e0); }
.aif-signup-btn:disabled { opacity: 0.6; cursor: default; }
.aif-signup-msg {
	font-size: 12px;
	margin-top: 8px;
	min-height: 16px;
}
.aif-signup-msg.aif-success { color: var(--aif-type-traening, #22c55e); }
.aif-signup-msg.aif-error { color: var(--aif-type-pokemon, #ee1515); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
	.aif-title-text { font-size: 17px; }
	.aif-logo { width: 48px; height: 48px; }
	.aif-week-column { min-width: 200px; }
	.aif-ec-title { font-size: 12px; }
}

