/* ==========================================================================
   Figure Schedule — Frontend Calendar
   Typsnitt ärvs från Elementor/tema, fallback Arial
   ========================================================================== */

.fs-calendar-wrap * {
	font-family: inherit, Arial, sans-serif;
	box-sizing: border-box;
}

/* --- Toolbar --- */
.fs-cal-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}
.fs-cal-toolbar-left  { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fs-cal-toolbar-right { display: flex; align-items: center; gap: 6px; }

/* Gruppfilter */
.fs-group-filter-wrap { position: relative; }

.fs-group-filter-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border: 1px solid #ddd;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	font-size: 14px;
	white-space: nowrap;
	font-family: inherit;
}
.fs-group-filter-btn:hover { border-color: #aaa; }
.fs-group-filter-btn .fs-chevron { font-size: 10px; transition: transform .2s; }
.fs-group-filter-btn.is-open .fs-chevron { transform: rotate(180deg); }

.fs-group-dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	z-index: 200;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	box-shadow: 0 4px 16px rgba(0,0,0,.1);
	min-width: 200px;
	padding: 8px 0;
}
.fs-group-dropdown.is-open { display: block; }

.fs-group-option {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 16px;
	cursor: pointer;
	font-size: 14px;
	transition: background .1s;
	font-family: inherit;
}
.fs-group-option:hover { background: #f5f5f5; }
.fs-group-option input[type="checkbox"] { margin: 0; cursor: pointer; }

.fs-filter-clear {
	font-size: 12px;
	color: #888;
	padding: 8px 16px 4px;
	border-top: 1px solid #eee;
	margin-top: 4px;
	cursor: pointer;
	display: block;
	text-align: left;
	background: none;
	border-left: none;
	border-right: none;
	border-bottom: none;
	width: 100%;
	font-family: inherit;
}
.fs-filter-clear:hover { color: #333; }

/* Vyväljare */
.fs-view-tabs { display: flex; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.fs-view-tab {
	padding: 7px 16px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	background: #fff;
	border: none;
	border-right: 1px solid #ddd;
	transition: background .15s, color .15s;
	white-space: nowrap;
	font-family: inherit;
}
.fs-view-tab:last-child { border-right: none; }
.fs-view-tab.is-active { background: var(--fs-cal-accent, #1B9AF7); color: #fff; }
.fs-view-tab:hover:not(.is-active) { background: #f5f5f5; }

/* --- Layout --- */
.fs-cal-main {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 24px;
	align-items: start;
}
@media (max-width: 768px) {
	.fs-cal-main { grid-template-columns: 1fr; }
}

/* --- Månadsvy: Navigering --- */
.fs-cal-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}
.fs-cal-nav-btn {
	background: none;
	border: none;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	color: var(--fs-cal-accent, #1B9AF7);
	padding: 4px 8px;
	border-radius: 4px;
	display: flex;
	align-items: center;
	gap: 4px;
	font-family: inherit;
}
.fs-cal-nav-btn:hover { background: rgba(27,154,247,.08); }
.fs-cal-title { font-size: 18px; font-weight: 700; letter-spacing: .02em; }

/* Grid */
.fs-cal-grid { width: 100%; border-collapse: collapse; }
.fs-cal-grid th {
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	color: #888;
	padding: 6px 0 10px;
	letter-spacing: .06em;
}
.fs-cal-grid td { text-align: center; padding: 4px 0; vertical-align: top; }

.fs-cal-day {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	width: 40px;
	cursor: default;
}
.fs-cal-day.has-sessions { cursor: pointer; }
.fs-cal-day.has-sessions:hover .fs-day-num { background: #f0f0f0; }

.fs-day-num {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	font-size: 14px;
	font-weight: 500;
	transition: background .15s;
}
.fs-cal-day.is-today .fs-day-num {
	background: var(--fs-cal-accent, #1B9AF7);
	color: #fff;
	font-weight: 700;
}
.fs-cal-day.is-selected .fs-day-num {
	background: rgba(27,154,247,.15);
	color: var(--fs-cal-accent, #1B9AF7);
	font-weight: 700;
}
.fs-cal-day.is-other-month .fs-day-num { color: #ccc; }

/* Prickar */
.fs-day-dots { display: flex; gap: 3px; justify-content: center; min-height: 7px; }
.fs-day-dot { width: 6px; height: 6px; border-radius: 50%; }

/* --- Höger panel (dag) --- */
.fs-day-panel {
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 12px;
	overflow: hidden;
	position: sticky;
	top: 20px;
}
.fs-day-panel-header {
	padding: 16px 20px;
	border-bottom: 1px solid #e8e8e8;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #333;
}
.fs-session-card {
	padding: 16px 20px;
	border-bottom: 1px solid #f0f0f0;
}
.fs-session-card:last-child { border-bottom: none; }
.fs-session-time {
	font-size: 13px;
	font-weight: 600;
	color: #555;
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 5px;
}
.fs-session-time-icon { opacity: .6; }
.fs-session-title {
	font-size: 14px;
	font-weight: 700;
	color: #1a1a1a;
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 3px;
}
.fs-session-color-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
}
.fs-session-meta { font-size: 12px; color: #888; }
.fs-day-panel-empty {
	padding: 32px 20px;
	text-align: center;
	color: #bbb;
	font-size: 14px;
	font-style: italic;
}

/* --- Veckovy --- */
.fs-week-view {}
.fs-week-day-block { margin-bottom: 20px; }
.fs-week-day-header {
	font-size: 12px;
	font-weight: 700;
	color: #555;
	text-transform: uppercase;
	letter-spacing: .06em;
	padding: 10px 0 8px;
	border-bottom: 2px solid #eee;
	margin-bottom: 8px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.fs-week-date-num {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
}
.fs-week-day-header.is-today .fs-week-date-num {
	background: var(--fs-cal-accent, #1B9AF7);
	color: #fff;
}
.fs-week-session { padding: 8px 0; border-bottom: 1px solid #f5f5f5; }
.fs-week-session:last-child { border-bottom: none; }
.fs-week-empty { font-size: 13px; color: #ccc; font-style: italic; padding: 4px 0 8px; }

/* --- Dagvy --- */
.fs-day-view-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}
.fs-day-view-title { font-size: 18px; font-weight: 700; }
.fs-day-view-btn {
	background: none;
	border: 1px solid #ddd;
	border-radius: 6px;
	padding: 6px 12px;
	font-size: 13px;
	cursor: pointer;
	color: var(--fs-cal-accent, #1B9AF7);
	font-family: inherit;
}
.fs-day-view-btn:hover { background: #f5f5f5; }

/* Spinner */
.fs-cal-spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(0,0,0,.1);
	border-top-color: var(--fs-cal-accent, #1B9AF7);
	border-radius: 50%;
	animation: fs-cal-spin .6s linear infinite;
	vertical-align: middle;
}
@keyframes fs-cal-spin { to { transform: rotate(360deg); } }
