/*!
 * Sentio for Elementor - tec-event-calendar widget
 * Extracted from frontend.css during Batch 2356 Checkpoint 2 mechanical extraction (2026-04-19)
 * Section: TEC-02 Event Calendar (.sentio-teca)
 */

/* ── TEC-02 · Event Calendar (.sentio-teca) ─────────────────────── */
/* 10 differentiators: zero-dependency vanilla JS, multi-event overflow,
   week view hourly swim lanes, AJAX month navigation, category color
   coding, today indicator, mini-calendar sidebar, quick-view modal,
   ICS export, drag-to-select date range */

.sentio-teca {
	background: #ffffff;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid #e5e7eb;
	/* Lock width to parent column. Without this, intrinsic block sizing in
	 * flex/grid parent contexts causes the wrapper to grow/shrink to fit its
	 * widest internal content — different months/views with different event
	 * title lengths produce different rendered widths. Forcing width: 100%
	 * pins the outer dimension to the Elementor column width regardless of
	 * what view (month/week/agenda) or month is active inside. */
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

/* ── Header ── */
.sentio-teca__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	padding: 16px 20px;
	background: #f9fafb;
	border-bottom: 1px solid #e5e7eb;
}

.sentio-teca__nav {
	display: flex;
	align-items: center;
	gap: 8px;
}

.sentio-teca__nav-btn {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	cursor: pointer;
	color: #374151;
	font-size: 14px;
	transition: all 0.2s ease;
}

.sentio-teca__nav-btn:hover { background: #f3f4f6; color: #111827; }

.sentio-teca__nav-title {
	font-size: 18px;
	font-weight: 600;
	margin: 0;
	min-width: 160px;
	text-align: center;
}

.sentio-teca__nav-today {
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 500;
	background: transparent;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	cursor: pointer;
	color: #6366f1;
	transition: all 0.2s ease;
}

.sentio-teca__nav-today:hover { background: #6366f1; color: #ffffff; border-color: #6366f1; }

.sentio-teca__views {
	display: flex;
	gap: 4px;
	background: #e5e7eb;
	border-radius: 8px;
	padding: 3px;
}

.sentio-teca__view-btn {
	padding: 6px 16px;
	font-size: 13px;
	font-weight: 500;
	background: transparent;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	color: #6b7280;
	transition: all 0.2s ease;
}

.sentio-teca__view-btn:hover { color: #111827; }
.sentio-teca__view-btn--active { background: #ffffff; color: #111827; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

.sentio-teca__ics-btn {
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 500;
	background: transparent;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	cursor: pointer;
	color: #6b7280;
	display: flex;
	align-items: center;
	gap: 6px;
	transition: all 0.2s ease;
}

.sentio-teca__ics-btn:hover { color: #111827; border-color: #d1d5db; }

/* ── Export menu (E1 + E3, cleanup-bundle 2026-04-21) ── */
.sentio-teca__export {
	position: relative;
}

.sentio-teca__export-caret {
	font-size: 10px;
	transition: transform 0.15s ease;
}

.sentio-teca__export--open .sentio-teca__export-caret {
	transform: rotate(180deg);
}

.sentio-teca__export-menu {
	position: absolute;
	top: calc(100% + 4px);
	right: 0;
	min-width: 240px;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
	padding: 6px 0;
	z-index: 20;
}

.sentio-teca__export-menu[hidden] {
	display: none;
}

.sentio-teca__export-item {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	padding: 8px 16px;
	border: 0;
	background: transparent;
	font-size: 13px;
	text-align: left;
	color: #374151;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.sentio-teca__export-item:hover,
.sentio-teca__export-item:focus-visible {
	background: #f3f4f6;
	color: #111827;
	outline: none;
}

.sentio-teca__export-item:focus-visible {
	box-shadow: inset 0 0 0 2px #6366f1;
}

.sentio-teca__export-sep {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px 4px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #9ca3af;
	border-top: 1px solid #f3f4f6;
	margin-top: 4px;
}

.sentio-teca__export-sep span { white-space: nowrap; }

/* ── Category Legend ── */
.sentio-teca__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px 20px;
	border-bottom: 1px solid #e5e7eb;
}

.sentio-teca__legend-item {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px;
	font-size: 12px;
	font-weight: 500;
	background: transparent;
	border: 1px solid #e5e7eb;
	border-radius: 100px;
	cursor: pointer;
	color: #6b7280;
	transition: all 0.2s ease;
}

.sentio-teca__legend-item::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--cat-color, #6366f1);
}

.sentio-teca__legend-item--active { border-color: var(--cat-color, #6366f1); color: #111827; }
.sentio-teca__legend-item--dimmed { opacity: 0.4; }

/* ── Layout: Body (Sidebar + Main) ── */
.sentio-teca__body {
	display: flex;
}

.sentio-teca__sidebar {
	flex: 0 0 220px;
	border-right: 1px solid #e5e7eb;
	padding: 16px;
}

/* ── Sidebar upcoming-events list (E2, cleanup-bundle 2026-04-21) ── */
.sentio-teca__sidebar-title {
	margin: 0 0 12px;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #6b7280;
}

.sentio-teca__sidebar-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.sentio-teca__sidebar-item {
	position: relative;
}

.sentio-teca__sidebar-link {
	display: flex;
	align-items: baseline;
	gap: 8px;
	width: 100%;
	padding: 8px 10px 8px 14px;
	border: 0;
	border-left: 3px solid var(--ev-clr, #6366f1);
	background: transparent;
	font-size: 13px;
	text-align: left;
	color: #374151;
	cursor: pointer;
	border-radius: 0 6px 6px 0;
	transition: background-color 0.15s ease;
}

.sentio-teca__sidebar-link:hover,
.sentio-teca__sidebar-link:focus-visible {
	background: #f9fafb;
	outline: none;
}

.sentio-teca__sidebar-link:focus-visible {
	box-shadow: inset 0 0 0 2px #6366f1;
}

.sentio-teca__sidebar-date {
	flex: 0 0 auto;
	font-size: 11px;
	font-weight: 600;
	color: var(--ev-clr, #6366f1);
	white-space: nowrap;
}

.sentio-teca__sidebar-name {
	flex: 1;
	min-width: 0;
	font-weight: 500;
	line-height: 1.3;
	word-break: break-word;
}

.sentio-teca__sidebar-empty {
	margin: 8px 0 0;
	font-size: 12px;
	color: #9ca3af;
	font-style: italic;
}

.sentio-teca__main {
	flex: 1;
	min-width: 0;
}

.sentio-teca__month {
	display: block;
}

/* ── Mini Calendar ── */
.sentio-teca__mini {
	font-size: 12px;
}

.sentio-teca__mini-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
	font-weight: 600;
	font-size: 13px;
}

.sentio-teca__mini-nav {
	background: none;
	border: none;
	cursor: pointer;
	color: #6b7280;
	font-size: 12px;
	padding: 2px;
}

.sentio-teca__mini-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 2px;
	text-align: center;
}

.sentio-teca__mini-day {
	padding: 4px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 11px;
	color: #6b7280;
}

.sentio-teca__mini-day:hover { background: #f3f4f6; }
.sentio-teca__mini-day--today { background: #6366f1; color: #ffffff; font-weight: 600; }
.sentio-teca__mini-day--has-events { font-weight: 700; color: #111827; }
.sentio-teca__mini-day--other { opacity: 0.3; }

/* ── Month View ── */
.sentio-teca__weekdays {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	border-bottom: 1px solid #e5e7eb;
}

.sentio-teca__weekday {
	padding: 10px;
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.sentio-teca__days {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
}

.sentio-teca__cell {
	min-height: 100px;
	min-width: 0;
	border-right: 1px solid #f3f4f6;
	border-bottom: 1px solid #f3f4f6;
	padding: 6px;
	overflow: hidden;
	transition: background 0.15s ease;
}

.sentio-teca__cell:hover { background: #fafbfc; }
.sentio-teca__cell:nth-child(7n) { border-right: none; }
.sentio-teca__cell--other { background: #fafafa; }
.sentio-teca__cell--today { background: #eff6ff; }

.sentio-teca__cell-number {
	font-size: 13px;
	font-weight: 500;
	color: #374151;
	margin-bottom: 4px;
}

.sentio-teca__cell--today .sentio-teca__cell-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background: #6366f1;
	color: #ffffff;
	border-radius: 50%;
	font-weight: 600;
}

.sentio-teca__cell--other .sentio-teca__cell-number { color: #d1d5db; }

/* Event cards in month cells */
.sentio-teca__event-card {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 4px 6px;
	margin-bottom: 3px;
	font-size: 12px;
	line-height: 1.3;
	border-radius: 4px;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	cursor: pointer;
	text-decoration: none;
	color: inherit;
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
	transition: background 0.15s ease, box-shadow 0.15s ease;
}
.sentio-teca__event-card:hover {
	background: #f3f4f6;
	box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.sentio-teca__event-card-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--event-color, #6366f1);
	flex-shrink: 0;
}
.sentio-teca__event-card-time {
	font-weight: 600;
	font-size: 11px;
	color: var(--event-color, #6366f1);
	flex-shrink: 0;
	white-space: nowrap;
}
.sentio-teca__event-card-title {
	color: #374151;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sentio-teca__more {
	font-size: 11px;
	color: #6366f1;
	cursor: pointer;
	padding: 2px 6px;
	font-weight: 500;
}

.sentio-teca__more:hover { text-decoration: underline; }

/* More dropdown */
.sentio-teca__more-dropdown {
	position: absolute;
	z-index: 20;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0,0,0,0.12);
	padding: 8px;
	min-width: 200px;
}

/* ── Week View ── */
.sentio-teca__week {
	position: relative;
}

.sentio-teca__week-header {
	display: grid;
	grid-template-columns: 60px repeat(7, minmax(0, 1fr));
	border-bottom: 1px solid #e5e7eb;
}

.sentio-teca__week-day-header {
	text-align: center;
	padding: 8px;
	font-size: 12px;
	font-weight: 500;
	color: #6b7280;
}

.sentio-teca__week-day-header--today { color: #6366f1; font-weight: 700; }

.sentio-teca__week-grid {
	display: grid;
	grid-template-columns: 60px repeat(7, minmax(0, 1fr));
	position: relative;
}

.sentio-teca__week-time {
	font-size: 11px;
	color: #9ca3af;
	text-align: right;
	padding: 0 8px;
	border-right: 1px solid #f3f4f6;
	height: 60px;
	display: flex;
	align-items: flex-start;
	justify-content: flex-end;
}

.sentio-teca__week-cell {
	border-right: 1px solid #f3f4f6;
	border-bottom: 1px solid #f3f4f6;
	height: 60px;
	position: relative;
}

.sentio-teca__week-cell:nth-child(8n) { border-right: none; }

.sentio-teca__week-event {
	position: absolute;
	left: 2px;
	right: 2px;
	background: var(--event-color, #6366f1);
	color: #ffffff;
	border-radius: 4px;
	padding: 4px 6px;
	font-size: 11px;
	font-weight: 500;
	overflow: hidden;
	cursor: pointer;
	z-index: 5;
	transition: opacity 0.15s ease;
}

.sentio-teca__week-event:hover { opacity: 0.9; }

/* Current time line */
.sentio-teca__now-line {
	position: absolute;
	left: 60px;
	right: 0;
	height: 2px;
	background: #ef4444;
	z-index: 10;
	pointer-events: none;
}

.sentio-teca__now-line::before {
	content: "";
	position: absolute;
	left: -4px;
	top: -3px;
	width: 8px;
	height: 8px;
	background: #ef4444;
	border-radius: 50%;
}

/* ── Week View (JS-rendered) ── */
.sentio-teca__wk-header {
	display: grid;
	grid-template-columns: 56px repeat(7, minmax(0, 1fr));
	border-bottom: 1px solid #e5e7eb;
}

.sentio-teca__wk-gutter {
	font-size: 11px;
	color: #9ca3af;
	text-align: right;
	padding: 4px 8px 4px 0;
	border-right: 1px solid #f3f4f6;
	white-space: nowrap;
}

.sentio-teca__wk-col-hd {
	text-align: center;
	padding: 10px 4px;
	font-size: 12px;
	font-weight: 500;
	color: #6b7280;
}

.sentio-teca__wk-col-hd--today { color: #6366f1; font-weight: 700; }

.sentio-teca__wk-day-name { display: block; text-transform: uppercase; letter-spacing: 0.3px; }

.sentio-teca__wk-day-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	font-size: 14px;
	font-weight: 600;
	margin-top: 2px;
}

.sentio-teca__wk-col-hd--today .sentio-teca__wk-day-num {
	background: #6366f1;
	color: #ffffff;
}

.sentio-teca__wk-body {
	--teca-wk-row-h: 48px;
	max-height: 576px; /* 12 visible hours */
	overflow-y: auto;
}

.sentio-teca__wk-row {
	display: grid;
	grid-template-columns: 56px repeat(7, minmax(0, 1fr));
	min-height: var(--teca-wk-row-h, 48px);
}

.sentio-teca__wk-cell {
	border-right: 1px solid #f3f4f6;
	border-bottom: 1px solid #f3f4f6;
	min-height: var(--teca-wk-row-h, 48px);
	position: relative;
}

.sentio-teca__wk-cell:last-child { border-right: none; }

.sentio-teca__wk-event {
	position: absolute;
	left: 2px;
	right: 2px;
	background: var(--ev-clr, #6366f1);
	color: #ffffff;
	text-decoration: none;
	border-radius: 4px;
	padding: 3px 6px;
	font-size: 11px;
	font-weight: 500;
	overflow: hidden;
	cursor: pointer;
	z-index: 5;
	transition: opacity var(--teca-wk-event-duration, 0.15s) ease, background-color var(--teca-wk-event-duration, 0.15s) ease, color var(--teca-wk-event-duration, 0.15s) ease, box-shadow var(--teca-wk-event-duration, 0.15s) ease;
	line-height: 1.3;
}

.sentio-teca__wk-event:hover { opacity: var(--teca-wk-event-hover-opacity, 0.85); }

.sentio-teca__wk-event--allday {
	position: relative;
	top: auto;
	height: auto;
	opacity: var(--teca-wk-event-allday-opacity, 0.85);
}

.sentio-teca__wk-event-time {
	display: block;
	font-size: 10px;
	opacity: 0.85;
}

.sentio-teca__wk-event-title {
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sentio-teca__wk-now {
	position: absolute;
	left: 0;
	right: 0;
	height: 2px;
	background: #ef4444;
	z-index: 10;
	pointer-events: none;
}

.sentio-teca__wk-now::before {
	content: "";
	position: absolute;
	left: -4px;
	top: -3px;
	width: 8px;
	height: 8px;
	background: #ef4444;
	border-radius: 50%;
}

/* ── Agenda View ── */
.sentio-teca__agenda-day {
	padding: 16px 20px;
	border-bottom: 1px solid #f3f4f6;
}

.sentio-teca__agenda-date {
	font-size: 14px;
	font-weight: 600;
	color: #111827;
	margin-bottom: 8px;
}

.sentio-teca__agenda-event {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.15s ease;
	margin-bottom: 4px;
}

.sentio-teca__agenda-event:hover { background: #f9fafb; }

.sentio-teca__agenda-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--event-color, #6366f1);
	flex-shrink: 0;
}

.sentio-teca__agenda-time {
	font-size: 13px;
	color: #6b7280;
	min-width: 80px;
}

.sentio-teca__agenda-title {
	font-size: 14px;
	font-weight: 500;
	color: #111827;
}

.sentio-teca__agenda-venue {
	font-size: 12px;
	color: #9ca3af;
	margin-left: auto;
}

/* ── Quick View Modal ── */
.sentio-teca__modal {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0,0,0,0.5);
	opacity: 0;
	visibility: hidden;
	transition: all 0.25s ease;
}

.sentio-teca__modal--visible {
	opacity: 1;
	visibility: visible;
}

.sentio-teca__modal-inner {
	background: #ffffff;
	border-radius: 16px;
	max-width: 480px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0,0,0,0.2);
	position: relative;
}

.sentio-teca__modal-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0,0,0,0.05);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	font-size: 18px;
	color: #6b7280;
	z-index: 5;
}

.sentio-teca__modal-close:hover { background: rgba(0,0,0,0.1); }

.sentio-teca__modal-image { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 16px 16px 0 0; }
.sentio-teca__modal-content { padding: 20px; }
.sentio-teca__modal-title { font-size: 20px; font-weight: 600; margin: 0 0 8px 0; }
.sentio-teca__modal-title a { color: inherit; text-decoration: none; }
.sentio-teca__modal-date { font-size: 14px; color: #6b7280; margin-bottom: 4px; }
.sentio-teca__modal-venue { font-size: 14px; color: #6b7280; margin-bottom: 4px; }
.sentio-teca__modal-cost { font-size: 15px; font-weight: 600; color: #059669; margin-bottom: 12px; }
.sentio-teca__modal-desc { font-size: 14px; color: #6b7280; line-height: 1.6; }
.sentio-teca__modal-excerpt {
	font-size: 13px; color: #6b7280; line-height: 1.6; margin-bottom: 8px;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.sentio-teca__modal-link {
	display: inline-flex; padding: 8px 20px; margin-top: 12px;
	font-size: 14px; font-weight: 600; color: #ffffff; background: #6366f1;
	border-radius: 8px; text-decoration: none;
}
.sentio-teca__modal-link:hover { background: #4f46e5; color: #ffffff; }

/* ── Drag Select ── */
.sentio-teca__cell--selecting {
	background: rgba(99,102,241,0.1) !important;
}

/* ── Loading ── */
.sentio-teca__body--loading {
	opacity: 0.5;
	pointer-events: none;
}

/* ── Empty ── */
.sentio-teca__empty {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	min-height: 200px; padding: 40px; text-align: center; color: #9ca3af;
	border: 2px dashed #e5e7eb; border-radius: 12px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
	.sentio-teca__sidebar { display: none; }
}
@media (max-width: 767px) {
	.sentio-teca__header { flex-direction: column; align-items: stretch; }
	.sentio-teca__nav { justify-content: center; }
	.sentio-teca__views { justify-content: center; }
	.sentio-teca__cell { min-height: 60px; }
	.sentio-teca__event-card { font-size: 0; padding: 4px; gap: 0; border: none; }
	.sentio-teca__event-card-dot { width: 8px; height: 8px; }
	.sentio-teca__event-card-time,
	.sentio-teca__event-card-title { display: none; }
	.sentio-teca__week-grid { overflow-x: auto; }
	.sentio-teca__wk-body { max-height: 400px; }
	.sentio-teca__wk-header,
	.sentio-teca__wk-row { grid-template-columns: 44px repeat(7, minmax(60px, 1fr)); }
	.sentio-teca__week { overflow-x: auto; }
	.sentio-teca__ics-btn { display: none; }
}
