/* ============================================================
   Thrive Event Calendar — Front-end Styles
   Brand colours from thrivetherapyofks.com:
     Primary teal  #3fa9a5
     Dark navy     #1a3a4a
     Accent orange #f07c37
     Light bg      #f4f9f9
   ============================================================ */

:root {
	--tec-primary:   #3fa9a5;
	--tec-dark:      #1a3a4a;
	--tec-accent:    #f07c37;
	--tec-light-bg:  #f4f9f9;
	--tec-border:    #d0e6e5;
	--tec-text:      #2d2d2d;
	--tec-muted:     #7a9ea0;
	--tec-dot:       #f07c37;
	--tec-today-bg:  #e6f5f4;
	--tec-radius:    10px;
}

/* ── Wrapper ───────────────────────────────────────────────── */
.tec-wrapper {
	font-family: inherit;
	max-width: 760px;
	margin: 0 auto 2rem;
	position: relative;
}

.tec-heading {
	color: var(--tec-dark);
	font-size: 1.5rem;
	margin-bottom: 1rem;
	text-align: center;
}

/* ── Navigation bar ────────────────────────────────────────── */
.tec-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--tec-dark);
	color: #fff;
	border-radius: var(--tec-radius) var(--tec-radius) 0 0;
	padding: 10px 16px;
}

.tec-nav button {
	background: none;
	border: none;
	color: #fff;
	font-size: 1.8rem;
	cursor: pointer;
	line-height: 1;
	padding: 0 8px;
	border-radius: 4px;
	transition: background 0.15s;
}
.tec-nav button:hover {
	background: rgba(255,255,255,0.15);
}

.tec-month-label {
	font-size: 1.1rem;
	font-weight: 700;
	letter-spacing: 0.03em;
}

/* ── Grid (shared by weekdays & days) ─────────────────────── */
.tec-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
}

/* ── Weekday header row ────────────────────────────────────── */
.tec-weekdays {
	background: var(--tec-primary);
	color: #fff;
}
.tec-weekdays > div {
	text-align: center;
	padding: 8px 4px;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

/* ── Day cells ─────────────────────────────────────────────── */
.tec-days {
	border-left: 1px solid var(--tec-border);
	border-bottom: 1px solid var(--tec-border);
	border-radius: 0 0 var(--tec-radius) var(--tec-radius);
	overflow: hidden;
}

.tec-day {
	min-height: 72px;
	border-right: 1px solid var(--tec-border);
	border-top: 1px solid var(--tec-border);
	padding: 6px 8px 4px;
	background: #fff;
	position: relative;
	transition: background 0.12s;
}

.tec-day--empty {
	background: var(--tec-light-bg);
}

.tec-day--today {
	background: var(--tec-today-bg);
}

.tec-day--today .tec-day-num {
	background: var(--tec-primary);
	color: #fff;
	border-radius: 50%;
	width: 24px;
	height: 24px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.tec-day-num {
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--tec-dark);
	margin-bottom: 4px;
	display: inline-block;
}

/* ── Event dots / pills ────────────────────────────────────── */
.tec-event-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tec-event-pill {
	display: block;
	font-size: 0.7rem;
	line-height: 1.3;
	background: var(--tec-accent);
	color: #fff;
	border-radius: 3px;
	padding: 2px 5px;
	margin-bottom: 2px;
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: background 0.12s, transform 0.1s;
}
.tec-event-pill:hover {
	background: var(--tec-dark);
	transform: scale(1.02);
}

/* "+N more" link */
.tec-more {
	font-size: 0.68rem;
	color: var(--tec-primary);
	cursor: pointer;
	display: block;
	margin-top: 2px;
}
.tec-more:hover { text-decoration: underline; }

/* ── Popup / flyout ────────────────────────────────────────── */
.tec-popup {
	position: absolute;
	z-index: 9999;
	background: #fff;
	border: 1px solid var(--tec-border);
	border-radius: var(--tec-radius);
	box-shadow: 0 8px 28px rgba(0,0,0,0.14);
	width: 280px;
	padding: 14px 16px;
}
.tec-popup[hidden] { display: none; }

.tec-popup-close {
	position: absolute;
	top: 8px;
	right: 10px;
	background: none;
	border: none;
	font-size: 1rem;
	cursor: pointer;
	color: var(--tec-muted);
}
.tec-popup-close:hover { color: var(--tec-dark); }

.tec-popup-body h3 {
	font-size: 0.92rem;
	color: var(--tec-dark);
	margin: 0 0 10px;
}

.tec-popup-event {
	border-bottom: 1px solid var(--tec-border);
	padding: 8px 0;
}
.tec-popup-event:last-child { border-bottom: none; }

.tec-popup-event-title {
	font-weight: 700;
	font-size: 0.88rem;
	color: var(--tec-dark);
	display: block;
	margin-bottom: 2px;
}
.tec-popup-event-meta {
	font-size: 0.78rem;
	color: var(--tec-muted);
	margin-bottom: 4px;
}
.tec-popup-event-link {
	display: inline-block;
	font-size: 0.78rem;
	color: #fff;
	background: var(--tec-primary);
	border-radius: 4px;
	padding: 3px 10px;
	text-decoration: none;
	transition: background 0.12s;
}
.tec-popup-event-link:hover {
	background: var(--tec-dark);
	color: #fff;
}

/* ── Loading ───────────────────────────────────────────────── */
.tec-loading {
	text-align: center;
	padding: 20px;
	color: var(--tec-muted);
	font-size: 0.9rem;
}
.tec-loading[hidden] { display: none; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 520px) {
	.tec-day { min-height: 56px; padding: 4px 3px; }
	.tec-day-num { font-size: 0.75rem; }
	.tec-event-pill { font-size: 0.6rem; padding: 1px 3px; }
	.tec-popup { width: 220px; }
}
