/* Community Events Calendar — front-end styles
   Dark / neon aesthetic: near-black surfaces, hot-pink borders & labels,
   lime CTAs, bold uppercase display type. Brand colors are CSS custom
   properties set inline from Settings > Community Calendar, so the palette
   can be changed without touching this file. */

@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Inter:wght@400;600;700&display=swap');

.cec-calendar-wrap, .cec-events-wrap, .cec-upcoming-wrap, .cec-submit-form, .cec-single-event, .cec-taxonomy-archive, .cec-auth-form {
	--cec-radius: 12px;
	--cec-pill: 100px;
	--cec-card: #1b1826;
	--cec-card-alt: #211d2e;
	--cec-muted: #a9a6bb;
	--cec-border-soft: rgba(255, 255, 255, 0.08);
	color: var(--cec-text);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	box-sizing: border-box;
	max-width: 100%;
	/* No-op for anything still at 100% width (calendar/events/upcoming —
	   these fill whatever column they're dropped into either way), but
	   self-centers .cec-submit-form/.cec-auth-form's own narrower
	   max-width wherever they land — including a plain page with no
	   Elementor column to do that centering for them, e.g. this plugin's
	   own auto-created pages. */
	margin: 0 auto;
}
.cec-calendar-wrap *, .cec-events-wrap *, .cec-upcoming-wrap *, .cec-submit-form *, .cec-single-event *, .cec-taxonomy-archive *, .cec-auth-form * {
	box-sizing: border-box;
}
/* Not .cec-single-event here — it has a position:sticky sidebar, and
   overflow-x:hidden on an ancestor silently breaks sticky positioning. */
.cec-calendar-wrap, .cec-events-wrap, .cec-upcoming-wrap, .cec-submit-form, .cec-taxonomy-archive, .cec-auth-form {
	overflow-x: hidden;
}

/* These two are rendered by the plugin's own page templates (not built in
   Elementor), so unlike shortcode output dropped into an Elementor page,
   nothing else paints a dark background behind them — the active theme's
   default (often white) would otherwise show through. */
.cec-single-event, .cec-taxonomy-archive {
	background: var(--cec-bg);
	padding: 32px 24px 60px;
	max-width: 1100px;
	margin: 0 auto;
}
body.cec-plugin-page {
	background: var(--cec-bg) !important;
}

.cec-calendar-wrap h1, .cec-calendar-wrap h2, .cec-calendar-wrap h3,
.cec-events-wrap h1, .cec-events-wrap h2, .cec-events-wrap h3,
.cec-single-event h1, .cec-single-event h3,
.cec-taxonomy-archive h1 {
	font-family: 'Archivo Black', 'Arial Black', sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--cec-primary);
}

.cec-btn {
	display: inline-block;
	padding: 12px 26px;
	border-radius: var(--cec-pill);
	text-decoration: none;
	cursor: pointer;
	font-weight: 700;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-family: 'Inter', sans-serif;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
/* Every button variant keeps a solid, filled background and dark text in
   its resting state, full stop — hover/focus only adds a glow/lift, never
   a color swap or a transparent background. This is deliberate: a
   transparent/outline resting state is exactly what caused buttons to
   become unreadable against certain backgrounds.
   !important on background/border/color here guards against the active
   theme's own default styling for native <button>/<input type=submit>
   elements — many themes apply that with high specificity, and it was
   overriding all three properties (not just text color) on every actual
   <button> in the plugin (form submit buttons), while <a class="cec-btn">
   links were unaffected since themes style those separately. */
.cec-btn, .cec-btn-outline, .cec-btn-danger {
	color: #0b0a12 !important;
	border-style: solid !important;
	border-width: 2px !important;
}
.cec-btn { background: var(--cec-primary) !important; border-color: var(--cec-primary) !important; }
.cec-btn-outline { background: var(--cec-secondary) !important; border-color: var(--cec-secondary) !important; }
.cec-btn-danger { background: #ff4d5e !important; border-color: #ff4d5e !important; }
.cec-btn:hover, .cec-btn-outline:hover, .cec-btn-danger:hover,
.cec-btn:focus-visible, .cec-btn-outline:focus-visible, .cec-btn-danger:focus-visible {
	color: #0b0a12 !important;
	transform: translateY(-1px);
}
.cec-btn:hover, .cec-btn:focus-visible { box-shadow: 0 0 24px var(--cec-primary); }
.cec-btn-outline { padding: 10px 24px; }
.cec-btn-outline:hover, .cec-btn-outline:focus-visible { box-shadow: 0 0 24px var(--cec-secondary); }
.cec-btn-danger:hover, .cec-btn-danger:focus-visible { box-shadow: 0 0 24px #ff4d5e; }
.cec-btn-small { padding: 8px 18px; font-size: 11px; }
.cec-btn-block { display: block; width: 100%; text-align: center; margin-top: 10px; }

.cec-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 5px 12px;
	border-radius: var(--cec-pill);
	background: var(--cec-accent);
	color: #0b0a12;
	margin: 0 4px 4px 0;
}
.cec-badge-free { background: var(--cec-free-badge); }
.cec-badge-paid { background: var(--cec-secondary); color: #fff; }
.cec-badge-postponed { background: #ffb020; color: #0b0a12; }
.cec-badge-cancelled { background: #ff4d5e; color: #0b0a12; }

.cec-event-card-cancelled { opacity: 0.7; }
.cec-event-card-cancelled .cec-card-title a, .cec-event-card-cancelled .cec-card-media img { text-decoration: line-through; filter: grayscale(60%); }
.cec-event-card-postponed .cec-card-media img { filter: grayscale(35%); }
.cec-status-note { font-size: 12px; font-weight: 700; color: #ffb020; margin: -4px 0 8px; }
.cec-event-card-cancelled .cec-status-note { color: #ff4d5e; }

.cec-cal-chip-postponed { background: #ffb020 !important; }
.cec-cal-chip-cancelled { background: #ff4d5e !important; opacity: 0.75; }
.cec-cal-chip-cancelled .cec-cal-event-title { text-decoration: line-through; }

.cec-status-banner { padding: 14px 18px; border-radius: var(--cec-radius); margin-bottom: 20px; font-size: 14px; }
.cec-status-banner-postponed { background: rgba(255, 176, 32, 0.12); border: 1px solid #ffb020; color: #ffb020; }
.cec-status-banner-cancelled { background: rgba(255, 77, 94, 0.12); border: 1px solid #ff4d5e; color: #ff4d5e; }
.cec-rsvp-disabled-note { color: var(--cec-muted); font-size: 13px; font-style: italic; }

.cec-notice { padding: 16px 20px; border-radius: var(--cec-radius); background: var(--cec-card); border: 1px solid var(--cec-border-soft); margin-bottom: 18px; color: var(--cec-text); }
.cec-notice-success { border-color: var(--cec-primary); }
.cec-notice-error { border-color: var(--cec-secondary); }

/* ---------- Calendar (month view) ---------- */
.cec-cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cec-cal-header h3 { margin: 0; font-size: 22px; }
.cec-cal-nav { background: var(--cec-primary); color: #0b0a12; border: none; border-radius: 50%; width: 34px; height: 34px; cursor: pointer; font-size: 16px; font-weight: 700; }
.cec-cal-nav:hover { box-shadow: 0 0 16px var(--cec-primary); }

.cec-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 100%; }
.cec-cal-dow-cell { text-align: center; font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; padding: 6px 0; color: var(--cec-secondary); min-width: 0; }
.cec-cal-cell {
	background: var(--cec-card);
	border: 1px solid var(--cec-border-soft);
	border-radius: 8px;
	min-height: 100px;
	min-width: 0;
	padding: 8px;
	position: relative;
}
.cec-cal-empty { background: transparent; border: none; }
.cec-cal-today { border: 2px solid var(--cec-primary); box-shadow: 0 0 14px rgba(225, 245, 119, 0.25); }
.cec-cal-daynum { font-size: 12px; font-weight: 700; color: var(--cec-muted); }
.cec-cal-events { margin-top: 5px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cec-cal-event-chip {
	display: flex;
	align-items: center;
	gap: 4px;
	background: var(--cec-secondary);
	color: #fff;
	border-radius: var(--cec-pill);
	padding: 3px 8px;
	font-size: 11px;
	font-weight: 600;
	text-decoration: none;
	overflow: hidden;
	min-width: 0;
}
.cec-cal-thumb { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.cec-cal-event-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.cec-cal-more { font-size: 10px; color: var(--cec-muted); }

.cec-subscribe-links { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

@media (max-width: 700px) {
	.cec-cal-dow-cell:nth-child(n) { font-size: 10px; }
	.cec-cal-cell { min-height: 60px; }
	.cec-view-list .cec-event-card { flex-direction: column; }
	.cec-view-list .cec-card-media { width: 100%; aspect-ratio: 16/10; }
}

/* ---------- Filters ---------- */
.cec-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; align-items: center; }
.cec-filters select {
	padding: 10px 16px;
	border-radius: var(--cec-pill);
	border: 2px solid var(--cec-secondary);
	background: var(--cec-card);
	color: var(--cec-text);
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.cec-view-toggle { margin-left: auto; display: flex; gap: 6px; }
.cec-view-btn {
	border: 2px solid var(--cec-secondary);
	background: var(--cec-secondary);
	color: #0b0a12 !important;
	padding: 8px 18px;
	border-radius: var(--cec-pill);
	cursor: pointer;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.cec-view-btn:hover { box-shadow: 0 0 16px var(--cec-secondary); }
.cec-view-btn.active { border-color: var(--cec-primary); background: var(--cec-primary); color: #0b0a12 !important; box-shadow: 0 0 16px var(--cec-primary); }

/* ---------- Grid / List ---------- */
.cec-events-list.cec-view-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.cec-events-list.cec-view-list { display: flex; flex-direction: column; gap: 16px; }

.cec-event-card { background: var(--cec-card); border: 1px solid var(--cec-border-soft); border-radius: var(--cec-radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow 0.2s ease, transform 0.2s ease; }
.cec-event-card:hover { border-color: var(--cec-secondary); box-shadow: 0 0 24px rgba(255, 80, 215, 0.2); transform: translateY(-2px); }
.cec-view-list .cec-event-card { flex-direction: row; }
.cec-card-media { position: relative; display: block; aspect-ratio: 16/10; overflow: hidden; background: var(--cec-card-alt); }
.cec-view-list .cec-card-media { width: 220px; flex-shrink: 0; aspect-ratio: 4/3; }
.cec-card-media img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cec-card-media-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, var(--cec-secondary), #4a1442); }
.cec-card-media .cec-badge-free, .cec-card-media .cec-badge-paid { position: absolute; top: 10px; right: 10px; }

/* display:flex column so the "View Details" button (margin-top:auto below)
   always sits flush at the same bottom edge across cards in a row,
   regardless of how much badge/partner/excerpt content sits above it. */
.cec-card-body { padding: 16px 18px; flex: 1; display: flex; flex-direction: column; }
.cec-card-body > .cec-btn, .cec-card-body > .cec-card-actions { margin-top: auto; align-self: flex-start; }
.cec-card-actions { display: flex; gap: 8px; align-items: center; }
.cec-card-title { margin: 4px 0 8px; font-size: 17px; font-family: 'Inter', sans-serif; font-weight: 700; text-transform: none; letter-spacing: 0; }
.cec-card-title a { color: var(--cec-text); text-decoration: none; }
.cec-card-title a:hover { color: var(--cec-primary); }
.cec-card-meta { font-size: 12px; color: var(--cec-muted); display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; }
.cec-card-where a { color: var(--cec-secondary); }
.cec-card-partners { font-size: 12px; margin-bottom: 8px; }
.cec-card-partners a { color: var(--cec-secondary); font-weight: 600; }
.cec-card-excerpt { font-size: 13px; color: var(--cec-muted); margin: 0 0 8px; line-height: 1.5; }
.cec-expand-toggle { background: none; border: none; color: var(--cec-primary); font-weight: 700; cursor: pointer; padding: 0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.cec-card-full { margin-top: 10px; font-size: 13px; border-top: 1px dashed var(--cec-border-soft); padding-top: 10px; color: var(--cec-muted); }
.cec-no-events { padding: 40px; text-align: center; color: var(--cec-muted); }

/* ---------- Upcoming scroller ---------- */
.cec-upcoming-wrap { display: flex; align-items: center; gap: 10px; }
.cec-upcoming-scroll { display: flex; gap: 18px; overflow-x: auto; scroll-behavior: smooth; padding: 4px 2px 14px; flex: 1; }
.cec-upcoming-card { flex: 0 0 220px; background: var(--cec-card); border: 1px solid var(--cec-border-soft); border-radius: var(--cec-radius); overflow: hidden; text-decoration: none; color: var(--cec-text); transition: box-shadow 0.2s ease; }
.cec-upcoming-card:hover { border-color: var(--cec-primary); box-shadow: 0 0 20px rgba(225, 245, 119, 0.18); }
.cec-upcoming-card img { width: 100%; height: 130px; object-fit: contain; display: block; background: var(--cec-card-alt); }
.cec-upcoming-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.cec-upcoming-date { font-size: 11px; color: var(--cec-secondary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.cec-upcoming-title { font-size: 14px; font-weight: 700; }
.cec-scroll-btn { background: var(--cec-primary); color: #0b0a12; border: none; border-radius: 50%; width: 34px; height: 34px; flex-shrink: 0; cursor: pointer; font-weight: 700; }
.cec-scroll-btn:hover { box-shadow: 0 0 16px var(--cec-primary); }

/* ---------- Submission / edit form ---------- */
.cec-submit-form { max-width: 700px; }
.cec-hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cec-auth-form { max-width: 420px; }
.cec-series-note { color: var(--cec-muted); font-size: 13px; margin-bottom: 16px; max-width: 640px; }
.cec-field, .cec-field-row > .cec-field { margin-bottom: 18px; }
.cec-field-row { display: flex; gap: 16px; }
.cec-field-row .cec-field { flex: 1; }
.cec-submit-form label {
	display: block;
	font-weight: 700;
	margin-bottom: 6px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--cec-secondary);
}
.cec-submit-form input[type=text], .cec-submit-form input[type=url], .cec-submit-form input[type=email],
.cec-submit-form input[type=datetime-local], .cec-submit-form input[type=number], .cec-submit-form select,
.cec-submit-form textarea, .cec-submit-form input[type=file] {
	width: 100%;
	padding: 12px 14px;
	background: var(--cec-card);
	border: 2px solid var(--cec-secondary);
	border-radius: 8px;
	font-size: 14px;
	color: var(--cec-text);
	font-family: 'Inter', sans-serif;
}
.cec-submit-form input::placeholder, .cec-submit-form textarea::placeholder { color: var(--cec-muted); }
.cec-submit-form input:focus, .cec-submit-form select:focus, .cec-submit-form textarea:focus {
	outline: none;
	border-color: var(--cec-primary);
	box-shadow: 0 0 0 3px rgba(225, 245, 119, 0.15);
}
.cec-checkbox { font-weight: 400 !important; text-transform: none !important; color: var(--cec-text) !important; display: inline-flex !important; align-items: center; gap: 6px; margin-right: 14px; letter-spacing: 0 !important; }

/* ---------- Single event ---------- */
.cec-single-hero { position: relative; background: var(--cec-card-alt); border-radius: var(--cec-radius); }
.cec-single-hero img { width: 100%; max-height: 440px; object-fit: contain; display: block; border-radius: var(--cec-radius); margin: 0 auto; }
.cec-single-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: var(--cec-radius);
	background: linear-gradient(180deg, rgba(11, 10, 18, 0) 40%, rgba(11, 10, 18, 0.7) 100%);
	pointer-events: none;
}
.cec-single-wrap { display: flex; gap: 36px; margin-top: 28px; flex-wrap: wrap; }
.cec-single-main { flex: 2; min-width: 300px; }
.cec-single-sidebar { flex: 1; min-width: 260px; }
.cec-single-main h1 { font-size: 32px; margin: 12px 0 20px; }
.cec-info-box { background: var(--cec-card); border: 1px solid var(--cec-border-soft); border-radius: var(--cec-radius); padding: 24px; position: sticky; top: 20px; }
.cec-info-box h3 { font-size: 12px; letter-spacing: 0.06em; color: var(--cec-secondary); margin: 18px 0 6px; }
.cec-info-box h3:first-child { margin-top: 0; }
.cec-info-box p { color: var(--cec-muted); }
.cec-info-box a { color: var(--cec-primary); }
.cec-coc-box { background: var(--cec-card); border: 1px solid var(--cec-border-soft); border-left: 4px solid var(--cec-secondary); padding: 18px 22px; border-radius: 6px; margin-top: 28px; color: var(--cec-muted); }
.cec-rsvp-form input {
	width: 100%;
	margin-bottom: 10px;
	padding: 10px 12px;
	border-radius: 8px;
	border: 2px solid var(--cec-secondary);
	background: #0f0d17;
	color: var(--cec-text);
}
.cec-rsvp-message { font-size: 13px; margin-top: 8px; color: var(--cec-primary); }
.cec-add-to-calendar { display: flex; flex-wrap: wrap; gap: 8px; }

.cec-share { position: relative; display: inline-block; margin-top: 4px; }
.cec-share-btn-icon { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.cec-share-menu {
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: 8px;
	background: var(--cec-card);
	border: 1px solid var(--cec-border-soft);
	border-radius: var(--cec-radius);
	padding: 14px 12px;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px 8px;
	width: 240px;
	z-index: 30;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.cec-share-icon {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font-family: inherit;
	min-width: 0;
}
.cec-share-icon-circle {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--cec-primary);
	color: #0b0a12;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.cec-share-icon-circle svg { width: 20px; height: 20px; }
.cec-share-icon:hover .cec-share-icon-circle, .cec-share-icon:focus-visible .cec-share-icon-circle {
	box-shadow: 0 0 16px var(--cec-primary);
	transform: translateY(-1px);
}
.cec-share-label {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--cec-muted);
	text-align: center;
}
.cec-share-icon.cec-share-copied .cec-share-icon-circle { background: var(--cec-secondary); }

@media (max-width: 480px) {
	.cec-share-menu { width: 210px; gap: 12px 6px; }
}

@media (max-width: 782px) {
	.cec-field-row { flex-direction: column; gap: 0; }
	.cec-single-wrap { flex-direction: column; }
}
