/* TEACH Events */

.teach-events-list,
.teach-events-calendar {
	--te-accent: #f5861f;
	--te-accent-dark: #e07310;
	--te-border: #e3e3e3;
	--te-text: #1a1a1a;
	--te-muted: #6b6b6b;
	--te-bg-soft: #f5f5f5;
	font-size: 15px;
	color: var(--te-text);
}

/* ---------- shared button ---------- */

.teach-btn,
a.teach-btn {
	display: inline-block;
	background: var(--te-accent);
	color: #fff;
	border: 0;
	border-radius: 6px;
	padding: 7px 18px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s ease;
}

.teach-btn:hover,
.teach-btn:focus,
a.teach-btn:hover,
a.teach-btn:focus {
	background: var(--te-accent-dark);
	color: #fff;
}

/* ---------- event rows (upcoming list + all-events list) ---------- */

.teach-event-row {
	display: flex;
	align-items: center;
	gap: 16px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	padding: 14px 20px;
	margin: 0 0 12px;
}

.teach-event-row-date {
	flex: 0 0 110px;
	white-space: nowrap;
}

.teach-event-row-name {
	flex: 1 1 auto;
	font-weight: 500;
	text-align: center;
}

.teach-event-row-location {
	flex: 1 1 auto;
	font-style: italic;
	color: var(--te-muted);
	text-align: center;
}

.teach-event-row .teach-btn {
	flex: 0 0 auto;
	margin-left: auto;
}

.teach-events-empty {
	background: var(--te-bg-soft);
	border-radius: 8px;
	padding: 16px 20px;
	color: var(--te-muted);
	margin: 0 0 12px;
}

@media (max-width: 640px) {
	.teach-event-row {
		flex-wrap: wrap;
		gap: 6px 12px;
	}

	.teach-event-row-date {
		flex-basis: auto;
	}

	.teach-event-row-name,
	.teach-event-row-location {
		flex-basis: 100%;
		text-align: left;
	}
}

/* ---------- calendar container ---------- */

.teach-events-calendar {
	position: relative;
}

/* search */

.te-search {
	display: flex;
	align-items: center;
	background: var(--te-bg-soft);
	border-radius: 8px;
	padding: 6px 6px 6px 16px;
	margin: 0 0 24px;
}

.te-search-input {
	flex: 1 1 auto;
	border: 0;
	background: transparent;
	font-size: 15px;
	color: var(--te-text);
	outline: none;
	box-shadow: none;
	padding: 8px 12px 8px 0;
	min-width: 0;
}

.te-search-input::placeholder {
	color: var(--te-muted);
}

/* month header */

.te-cal-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
}

.te-nav-btn,
.te-today-btn {
	background: #fff;
	border: 1px solid var(--te-border);
	border-radius: 6px;
	color: var(--te-text);
	cursor: pointer;
	line-height: 1;
	transition: background 0.15s ease;
}

.te-nav-btn {
	font-size: 20px;
	padding: 4px 10px 6px;
}

.te-today-btn {
	font-size: 13px;
	padding: 7px 12px;
}

.te-nav-btn:hover,
.te-today-btn:hover {
	background: var(--te-bg-soft);
}

.te-cal-title {
	font-size: 20px;
	font-weight: 700;
	margin-left: 6px;
}

/* grid */

.te-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	border: 1px solid var(--te-border);
	border-radius: 4px;
	overflow: hidden;
	background: var(--te-border);
	gap: 1px;
	margin: 0 0 40px;
}

.te-cal-dow {
	background: #fff;
	padding: 8px 10px;
	font-size: 12px;
	font-weight: 600;
	color: var(--te-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.te-cal-cell {
	background: #fff;
	min-height: 96px;
	padding: 8px 10px;
}

.te-cal-daynum {
	display: block;
	font-weight: 700;
	margin-bottom: 4px;
}

.te-cal-cell.te-other-month .te-cal-daynum {
	color: #bdbdbd;
	font-weight: 400;
}

.te-cal-cell.te-today .te-cal-daynum {
	color: var(--te-accent);
}

.te-cal-event {
	display: block;
	width: 100%;
	background: none;
	border: 0;
	padding: 2px 0;
	margin: 0 0 4px;
	text-align: left;
	cursor: pointer;
	color: var(--te-text);
}

.te-cal-event-time {
	display: block;
	font-size: 10px;
	color: var(--te-muted);
	text-transform: uppercase;
}

.te-cal-event-name {
	display: block;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
}

.te-cal-event:hover .te-cal-event-name,
.te-cal-event.te-active .te-cal-event-name {
	color: var(--te-accent);
}

@media (max-width: 640px) {
	.te-cal-cell {
		min-height: 64px;
		padding: 5px 6px;
	}

	.te-cal-event-name {
		font-size: 10px;
	}
}

/* ---------- popup ---------- */

.te-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	z-index: 9998;
}

.te-overlay.te-open {
	display: block;
}

.te-popup {
	display: none;
	position: absolute;
	z-index: 9999;
	background: #f1f1f1;
	border-radius: 8px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
	padding: 18px 22px 22px;
	max-width: 360px;
}

.te-popup.te-open {
	display: block;
}

.te-popup.te-modal {
	position: fixed;
	top: 50%;
	left: 50% !important;
	transform: translate(-50%, -50%);
	width: min(360px, calc(100vw - 32px));
}

.te-popup-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}

.te-popup-when {
	font-size: 13px;
	color: var(--te-muted);
	white-space: pre;
}

.te-popup-close {
	background: none;
	border: 0;
	font-size: 20px;
	line-height: 1;
	color: var(--te-muted);
	cursor: pointer;
	padding: 0 2px;
}

.te-popup-close:hover {
	color: var(--te-text);
}

.te-popup-name {
	font-size: 19px;
	font-weight: 700;
	margin: 0 0 10px;
	color: var(--te-text);
}

.te-popup-desc {
	font-size: 14px;
	line-height: 1.5;
	margin: 0 0 10px;
	white-space: pre-line;
}

.te-popup-location {
	font-size: 14px;
	font-style: italic;
	color: var(--te-muted);
	margin: 0 0 14px;
}

.te-popup-actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.te-btn-outline {
	display: inline-block;
	background: #fff;
	border: 1px solid var(--te-accent);
	border-radius: 6px;
	color: var(--te-accent);
	padding: 6px 16px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.te-btn-outline:hover,
.te-btn-outline:focus {
	background: var(--te-accent);
	color: #fff;
}

/* ---------- all events section ---------- */

.te-list-heading {
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 14px;
}

.te-list-month {
	display: inline-block;
	border: 0;
	background: transparent;
	font-size: 15px;
	font-weight: 600;
	color: var(--te-text);
	margin: 0 0 12px;
	padding: 4px 0;
	cursor: pointer;
}
