/* Martek Calendar. Inherits the theme's fonts and text color; skins only change the accent colors. */

.cc-calendar,
.cc-event-details,
.cc-widget-list {
	--cc-accent: #2563eb;
	--cc-accent-text: #fff;
	--cc-border: rgba(127, 127, 127, 0.35);
	--cc-soft: rgba(127, 127, 127, 0.1);
	--cc-chip: rgba(37, 99, 235, 0.14);
	--cc-bg: transparent;
	--cc-fg: inherit;
}

.cc-skin-ocean { --cc-accent: #0e7490; --cc-chip: rgba(14, 116, 144, 0.15); }
.cc-skin-forest { --cc-accent: #2f6f3e; --cc-chip: rgba(47, 111, 62, 0.16); }
.cc-skin-slate {
	--cc-accent: #7dd3fc;
	--cc-accent-text: #0f172a;
	--cc-border: #334155;
	--cc-soft: #1e293b;
	--cc-chip: rgba(125, 211, 252, 0.18);
	--cc-bg: #0f172a;
	--cc-fg: #e2e8f0;
}

.cc-calendar {
	background: var(--cc-bg);
	color: var(--cc-fg);
	font: inherit;
	margin: 1.5em 0;
	position: relative;
}
.cc-skin-slate.cc-calendar { padding: 12px; border-radius: 8px; color-scheme: dark; }
/* Themes color headings, links and form text themselves; on the dark skin force light text. */
.cc-calendar.cc-skin-slate,
.cc-calendar.cc-skin-slate h1,
.cc-calendar.cc-skin-slate h2,
.cc-calendar.cc-skin-slate h3,
.cc-calendar.cc-skin-slate h4,
.cc-calendar.cc-skin-slate h5,
.cc-calendar.cc-skin-slate h6,
.cc-calendar.cc-skin-slate p,
.cc-calendar.cc-skin-slate li,
.cc-calendar.cc-skin-slate span,
.cc-calendar.cc-skin-slate time,
.cc-calendar.cc-skin-slate a,
.cc-calendar.cc-skin-slate button,
.cc-calendar.cc-skin-slate select,
.cc-calendar.cc-skin-slate input { color: var(--cc-fg); }
.cc-calendar.cc-skin-slate .cc-chip { color: var(--cc-fg); }
.cc-calendar.cc-skin-slate .cc-btn.cc-active { color: var(--cc-accent-text); }
.cc-calendar.cc-skin-slate .cc-search::placeholder { color: #94a3b8; opacity: 1; }
.cc-calendar.cc-skin-slate .cc-group { border-bottom-color: var(--cc-accent); }
.cc-calendar a { color: inherit; }
.cc-calendar.cc-loading .cc-body { opacity: 0.5; transition: opacity 0.15s; }

/* server-rendered fallback list */
.cc-fallback { margin: 0; padding-left: 1.2em; }

/* toolbar and filters */
.cc-toolbar,
.cc-filters {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: space-between;
	margin-bottom: 10px;
}
.cc-nav,
.cc-opts,
.cc-switch { align-items: center; display: flex; flex-wrap: wrap; gap: 6px; }
.cc-switch { gap: 0; }
.cc-switch .cc-btn { border-radius: 0; margin-left: -1px; }
.cc-switch .cc-btn:first-child { border-radius: 4px 0 0 4px; margin-left: 0; }
.cc-switch .cc-btn:last-child { border-radius: 0 4px 4px 0; }
.cc-title { font-size: 1.15em; font-weight: 600; margin-left: 6px; }

.cc-btn,
.cc-select,
.cc-search {
	background: var(--cc-bg);
	border: 1px solid var(--cc-border);
	border-radius: 4px;
	color: inherit;
	font: inherit;
	font-size: 0.9em;
	line-height: 1.3;
	padding: 5px 10px;
}
.cc-btn { cursor: pointer; text-decoration: none; }
.cc-btn:hover { background: var(--cc-soft); }
.cc-btn.cc-active { background: var(--cc-accent); border-color: var(--cc-accent); color: var(--cc-accent-text); }
.cc-filters { justify-content: flex-start; }
.cc-search { min-width: 180px; }

/* month */
.cc-month { border-left: 1px solid var(--cc-border); border-top: 1px solid var(--cc-border); }
.cc-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cc-dow {
	background: var(--cc-soft);
	border-bottom: 1px solid var(--cc-border);
	border-right: 1px solid var(--cc-border);
	font-size: 0.85em;
	font-weight: 600;
	padding: 6px;
	text-align: center;
}
.cc-cell {
	border-bottom: 1px solid var(--cc-border);
	border-right: 1px solid var(--cc-border);
	min-height: 96px;
	min-width: 0;
	padding: 4px;
}
.cc-cell.cc-out { background: var(--cc-soft); opacity: 0.6; }
.cc-cell.cc-today { box-shadow: inset 0 0 0 2px var(--cc-accent); }
.cc-daynum {
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	display: block;
	font: inherit;
	font-size: 0.85em;
	font-weight: 600;
	padding: 0 2px 3px;
	text-align: left;
}
.cc-daynum:hover { color: var(--cc-accent); text-decoration: underline; }

.cc-chip {
	background: var(--cc-chip);
	border-left: 3px solid var(--cc-accent);
	border-radius: 3px;
	display: block;
	font-size: 0.8em;
	line-height: 1.3;
	margin-bottom: 3px;
	overflow: hidden;
	padding: 2px 5px;
	text-decoration: none;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.cc-chip:hover { filter: brightness(0.95); text-decoration: underline; }
.cc-chip-time { font-weight: 600; margin-right: 4px; }
.cc-more {
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	font: inherit;
	font-size: 0.8em;
	opacity: 0.8;
	padding: 0 2px;
	text-decoration: underline;
}

/* week */
.cc-week { display: grid; gap: 8px; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cc-weekday { border: 1px solid var(--cc-border); border-radius: 4px; min-height: 120px; padding: 6px; }
.cc-weekday.cc-today { box-shadow: inset 0 0 0 2px var(--cc-accent); }
.cc-weekday .cc-chip { white-space: normal; }
.cc-weekhead { margin-bottom: 4px; }
.cc-none { font-size: 0.8em; margin: 0; opacity: 0.6; }

/* day, list, agenda */
.cc-item {
	border-bottom: 1px solid var(--cc-border);
	display: flex;
	gap: 14px;
	padding: 12px 0;
}
.cc-thumb { border-radius: 4px; flex: 0 0 auto; height: 80px; object-fit: cover; width: 120px; }
.cc-info { min-width: 0; }
.cc-item-title { font-size: 1.05em; font-weight: 600; }
.cc-meta { font-size: 0.9em; opacity: 0.8; }
.cc-excerpt { font-size: 0.95em; margin: 6px 0 0; }
.cc-group {
	border-bottom: 2px solid var(--cc-accent);
	font-size: 1.05em;
	margin: 1.4em 0 0.3em;
	padding-bottom: 4px;
}
.cc-agenda-row {
	align-items: baseline;
	border-bottom: 1px solid var(--cc-border);
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	padding: 8px 0;
}
.cc-agenda-time { flex: 0 0 150px; font-size: 0.9em; font-weight: 600; }
.cc-agenda-place { font-size: 0.9em; opacity: 0.75; }
.cc-empty { opacity: 0.8; }
.cc-showmore { display: block; margin: 16px auto 0; }

/* single event details and widget */
.cc-event-details {
	background: var(--cc-soft);
	border-left: 4px solid var(--cc-accent);
	border-radius: 4px;
	margin: 0 0 1.5em;
	padding: 12px 16px;
}
.cc-detail { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 3px 0; }
.cc-label { flex: 0 0 120px; font-weight: 600; }
.cc-value { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.cc-addcal .cc-value a { margin-right: 14px; }
.cc-when-note { font-size: 0.9em; opacity: 0.75; }
.cc-widget-list { list-style: none; margin: 0; padding: 0; }
.cc-widget-list li { border-bottom: 1px solid var(--cc-border); padding: 8px 0; }

/* small screens */
@media (max-width: 720px) {
	.cc-week { grid-template-columns: 1fr; }
	.cc-cell { min-height: 56px; padding: 2px; }
	.cc-chip { font-size: 0.7em; padding: 1px 3px; }
	.cc-chip-time { display: none; }
	.cc-thumb { height: 60px; width: 90px; }
	.cc-agenda-time { flex-basis: 120px; }
	.cc-label { flex-basis: 100%; }
}

/* multi-day events */
.cc-sessions { display: block; }
.cc-session { display: block; padding: 1px 0; }
.cc-session-line { padding: 1px 0; }
.cc-more-days { font-size: 0.9em; opacity: 0.75; }
.cc-addrow { display: block; padding: 1px 0; }
.cc-addrow a { margin-right: 10px; }

/* notes only editors see */
.cc-diag {
	background: rgba(217, 119, 6, 0.15);
	border-left: 4px solid #d97706;
	border-radius: 4px;
	font-size: 0.9em;
	margin: 0 0 10px;
	padding: 8px 12px;
}

/* registration */
.cc-register { border-top: 2px solid var(--cc-accent, #2563eb); margin: 2em 0; padding-top: 0.5em; }
.cc-register h3 { margin-top: 0.5em; }
.cc-reg-note { font-size: 0.9em; opacity: 0.8; }
.cc-reg-form .cc-input { max-width: 420px; padding: 6px 8px; width: 100%; box-sizing: border-box; }
.cc-reg-mine { margin-bottom: 1em; }
.cc-inline { display: inline-block; margin: 0 0 0 6px; }
.cc-my-list { list-style: none; margin: 0; padding: 0; }
.cc-my-list li { border-bottom: 1px solid var(--cc-border, rgba(127,127,127,.35)); padding: 8px 0; }
.cc-notice { border-left: 4px solid; border-radius: 4px; padding: 8px 12px; }
.cc-notice-ok { background: rgba(22, 163, 74, 0.12); border-color: #16a34a; }
.cc-notice-bad { background: rgba(220, 38, 38, 0.12); border-color: #dc2626; }

/* Register / Full labels */
.cc-badge {
	border-radius: 999px;
	display: inline-block;
	font-size: 0.7em;
	font-weight: 600;
	line-height: 1.5;
	margin-left: 6px;
	padding: 0 7px;
	vertical-align: middle;
	white-space: nowrap;
}
.cc-badge-open { background: #16a34a; color: #fff; }
.cc-badge-waitlist { background: #d97706; color: #fff; }
.cc-badge-full { background: #6b7280; color: #fff; }
.cc-chip .cc-badge { font-size: 0.85em; margin-left: 4px; padding: 0 5px; }
@media (max-width: 720px) { .cc-chip .cc-badge { display: none; } }
