/*
 * Class schedule calendar. Reuses the --ff-* tokens (and .ff-sr-only)
 * defined in main.css, always loaded alongside this file.
 */

.ff-calendar {
	max-width: 760px;
	margin-inline: auto;
}

.ff-cal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1em;
}

.ff-cal-header .ff-btn {
	padding: 0.5rem 1rem;
}

.ff-cal-month-label {
	margin: 0;
}

.ff-cal-grid-head {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
	font-weight: 700;
	font-size: 0.8rem;
	color: var(--ff-muted);
	text-align: center;
	margin-bottom: 4px;
}

.ff-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.ff-cal-cell {
	min-height: 64px;
	border: 1px solid var(--ff-border);
	border-radius: 6px;
	padding: 4px;
	background: #fff;
}

.ff-cal-cell-empty {
	border: none;
	background: transparent;
}

.ff-cal-day-num {
	display: block;
	font-size: 0.75rem;
	color: var(--ff-muted);
	margin-bottom: 2px;
}

.ff-cal-chip {
	display: block;
	width: 100%;
	text-align: left;
	font-size: 0.7rem;
	line-height: 1.3;
	padding: 3px 5px;
	margin-bottom: 3px;
	border-radius: 4px;
	border: none;
	background: var(--ff-copper);
	color: #fff;
	cursor: pointer;
}

.ff-cal-chip:hover,
.ff-cal-chip:focus-visible {
	background: var(--ff-copper-dark);
}

.ff-cal-chip-full {
	background: var(--ff-border);
	color: var(--ff-muted);
}

/* A session running low on seats gets the circuit teal "interactive /
   pay attention" color instead of the standard copper, a visual nudge
   distinct from both the normal and full states. */
.ff-cal-chip-low {
	background: var(--ff-circuit);
}

.ff-cal-chip-low:hover,
.ff-cal-chip-low:focus-visible {
	background: var(--ff-circuit-dark);
}

.ff-cal-empty {
	margin-top: 1em;
	color: var(--ff-muted);
}

.ff-cal-panel {
	margin-top: 1.5em;
	padding: 1.25em;
	border: 1px solid var(--ff-border);
	border-radius: var(--ff-radius);
	background: var(--ff-bg-alt);
	position: relative;
}

.ff-cal-panel-close {
	position: absolute;
	top: 10px;
	right: 10px;
	background: none;
	border: none;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	color: var(--ff-muted);
}

.ff-cal-panel-body h4 {
	margin: 0 0 0.4em;
}

.ff-cal-seats {
	font-weight: 700;
}

.ff-cal-seats-low {
	color: var(--ff-circuit-dark);
}

.ff-enroll-form {
	margin-top: 1em;
	display: flex;
	flex-direction: column;
	gap: 0.75em;
	max-width: 360px;
}

.ff-field {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
}

.ff-field input {
	display: block;
	width: 100%;
	margin-top: 0.3em;
	padding: 0.55em 0.75em;
	border: 1px solid var(--ff-border);
	border-radius: 6px;
	font-size: 1rem;
}

.ff-hp-field {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.ff-form-error {
	color: #a30000;
	font-weight: 600;
	margin: 0;
}

.ff-form-success {
	color: #166534;
	font-weight: 600;
}

@media (max-width: 560px) {
	.ff-cal-cell {
		min-height: 48px;
	}

	.ff-cal-chip {
		font-size: 0.62rem;
	}
}
