/* ==========================================================================
   GetBent Events - Front-end calendar styles
   Served directly from src/; no build step required.

   Colours and chip border-radius are exposed as CSS custom properties so
   a theme can override them in theme.json or a stylesheet without touching
   this file. See docs/user-guide.md "Customising the calendar appearance".
   ========================================================================== */

/* -- Custom properties ----------------------------------------------------- */

:root {

	/* Structural */
	--getbent-card-bg: #fff;
	--getbent-card-border: #e0e0e0;
	--getbent-card-title: #111;
	--getbent-card-muted: #666;
	--getbent-card-divider: #f0f0f0;
	--getbent-badge-bg: rgba(10, 10, 10, 0.82);
	--getbent-badge-color: #fff;
	--getbent-card-image-placeholder: #2d2d2d;

	/* Chip shape */
	--getbent-chip-radius: 2px;

	/* Event type chips */
	--getbent-chip-et-bg: #3d1f5e;
	--getbent-chip-et-color: #d4b0ff;

	/* Audience chips */
	--getbent-chip-aud-bg: #1a3a4a;
	--getbent-chip-aud-color: #7dd3f5;

	/* Gear chips */
	--getbent-chip-gear-bg: #3a2200;
	--getbent-chip-gear-color: #fbbf24;

	/* Kink/play chips */
	--getbent-chip-kink-bg: #3d0f2a;
	--getbent-chip-kink-color: #f9a8d4;
}

/* -- Base ------------------------------------------------------------------ */

[x-cloak] {
	display: none !important;
}

.getbent-calendar {
	font-family: inherit;
}

/* -- Filters --------------------------------------------------------------- */

.getbent-calendar__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 24px;
}

.getbent-filter {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.getbent-filter__label {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.getbent-filter__select {
	padding: 6px 10px;
	border: 2px solid currentcolor;
	border-radius: 4px;
	background: transparent;
	font-size: 14px;
	cursor: pointer;
}

/* -- Loading / states ------------------------------------------------------ */

.getbent-calendar__loading {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 24px 0;
}

.getbent-spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 3px solid rgba(0, 0, 0, 0.15);
	border-top-color: currentcolor;
	border-radius: 50%;
	animation: getbent-spin 0.7s linear infinite;
}

@keyframes getbent-spin {

	to {
		transform: rotate(360deg);
	}
}

.getbent-calendar__error {
	color: #c00;
	padding: 12px 0;
}

.getbent-calendar__empty {
	padding: 24px 0;
	opacity: 0.7;
}

/* -- Event grid / list layout ---------------------------------------------- */

.getbent-calendar__events--list {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.getbent-calendar__events--grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
}

/* -- Event card ------------------------------------------------------------ */

.getbent-event-card {
	background: var(--getbent-card-bg);
	border: 1.5px solid var(--getbent-card-border);
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.getbent-calendar__events--list .getbent-event-card {
	flex-direction: row;
}

.getbent-event-card--cancelled {
	opacity: 0.55;
}

/* -- Image area ------------------------------------------------------------ */

.getbent-event-card__image-wrap {
	position: relative;
	flex-shrink: 0;
}

.getbent-event-card__image-link {
	display: block;
}

.getbent-event-card__image {
	display: block;
	width: 100%;
	height: 180px;
	object-fit: cover;
	background: var(--getbent-card-image-placeholder);
}

.getbent-calendar__events--list .getbent-event-card__image {
	width: 200px;
	height: 100%;
	min-height: 180px;
}

/* -- Date badge (positioned over image) ------------------------------------ */

.getbent-event-card__badge {
	position: absolute;
	bottom: 10px;
	left: 10px;
	background: var(--getbent-badge-bg);
	backdrop-filter: blur(4px);
	color: var(--getbent-badge-color);
	border-radius: 6px;
	padding: 7px 11px;
	text-align: center;
	min-width: 52px;
	line-height: 1;
}

.getbent-event-card__badge-month {
	display: block;
	font-size: 9px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	opacity: 0.8;
	margin-bottom: 2px;
}

.getbent-event-card__badge-day {
	display: block;
	font-size: 24px;
	font-weight: 800;
	line-height: 1;
}

.getbent-event-card__badge-dow {
	display: block;
	font-size: 9px;
	font-weight: 600;
	opacity: 0.7;
	margin-top: 2px;
}

.getbent-event-card__badge-sep {
	display: block;
	border-top: 1px solid rgba(255, 255, 255, 0.25);
	margin: 6px 0 5px;
}

.getbent-event-card__badge-time {
	display: block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

/* -- Date badge: no-image fallback (list mode) ----------------------------- */

/*
 * In list mode with no image, the badge sits as a narrow left column
 * inside the card body - a static dark block acting as a visual anchor.
 */

.getbent-event-card__badge--no-img-list {
	position: static;
	border-radius: 0;
	backdrop-filter: none;
	min-width: 64px;
	width: 64px;
	flex-shrink: 0;
	align-self: stretch;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin: -16px 12px -16px -16px;
}

/* -- Date badge: no-image fallback (grid mode) ----------------------------- */

/*
 * In grid mode with no image, the badge is inline to the left of the
 * title area.
 */

.getbent-event-card__primary {

	/* Default: full-width stacked layout (image present, or list no-image) */
}

.getbent-event-card__primary--with-badge {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin-bottom: 8px;
}

.getbent-event-card__badge--no-img-grid {
	position: static;
	backdrop-filter: none;
	flex-shrink: 0;
}

/* -- Card body ------------------------------------------------------------- */

.getbent-event-card__body {
	padding: 16px;
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

/* -- Taxonomy chips (top row: event type only) ----------------------------- */

.getbent-event-card__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 8px;
}

/* -- Chip base ------------------------------------------------------------- */

.getbent-chip {
	display: inline-block;
	padding: 3px 9px;
	border-radius: var(--getbent-chip-radius);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.getbent-chip--event-type {
	background: var(--getbent-chip-et-bg);
	color: var(--getbent-chip-et-color);
}

.getbent-chip--audience {
	background: var(--getbent-chip-aud-bg);
	color: var(--getbent-chip-aud-color);
}

.getbent-chip--gear {
	background: var(--getbent-chip-gear-bg);
	color: var(--getbent-chip-gear-color);
}

.getbent-chip--kink-play {
	background: var(--getbent-chip-kink-bg);
	color: var(--getbent-chip-kink-color);
}

/* -- Card text ------------------------------------------------------------- */

.getbent-event-card__title {
	margin: 0 0 4px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--getbent-card-title);
}

.getbent-event-card__title a {
	text-decoration: none;
	color: inherit;
}

.getbent-event-card__title a:hover {
	text-decoration: underline;
}

.getbent-event-card__cancelled-badge {
	display: inline-block;
	margin-left: 8px;
	padding: 1px 6px;
	background: #c00;
	color: #fff;
	font-size: 11px;
	border-radius: 3px;
	vertical-align: middle;
}

.getbent-event-card__excerpt {
	margin: 0 0 6px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--getbent-card-muted);
}

.getbent-event-card__venue {
	margin: 0 0 10px;
	font-size: 13px;
	color: var(--getbent-card-muted);
}

/* -- Divider --------------------------------------------------------------- */

.getbent-event-card__divider {
	border: none;
	border-top: 1px solid var(--getbent-card-divider);
	margin: 10px 0;
}

/* -- Bottom taxonomy chips ------------------------------------------------- */

.getbent-event-card__chips--secondary {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

/* -- Price ----------------------------------------------------------------- */

.getbent-event-card__price {
	margin: 6px 0 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--getbent-card-title);
}

/* -- CTA button ------------------------------------------------------------ */

.getbent-event-card__cta {
	display: inline-block;
	margin-top: 12px;
	padding: 8px 16px;
	border: 2px solid currentcolor;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	transition: background 0.15s, color 0.15s;
}

/* -- Pagination ------------------------------------------------------------ */

.getbent-calendar__pagination {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 32px;
}

.getbent-btn {
	padding: 8px 16px;
	border: 2px solid currentcolor;
	border-radius: 4px;
	background: transparent;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.getbent-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* -- Feed subscription links ----------------------------------------------- */

.getbent-calendar__feeds {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin-top: 32px;
	padding-top: 16px;
	border-top: 1px solid var(--getbent-border, rgba(255, 255, 255, 0.12));
	font-size: 13px;
	opacity: 0.75;
}

.getbent-calendar__feeds-label {
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-size: 11px;
}

.getbent-calendar__feed-link {
	text-decoration: none;
	border-bottom: 1px dotted currentcolor;
}

.getbent-calendar__feed-link:hover {
	opacity: 1;
	border-bottom-style: solid;
}

/* -- Block editor preview -------------------------------------------------- */

.getbent-calendar-editor-preview__inner {
	padding: 16px;
	border: 2px dashed #ccc;
	border-radius: 4px;
	text-align: center;
	color: #555;
}

.getbent-calendar-editor-preview__note {
	font-size: 12px;
	opacity: 0.7;
}

/* -- Single event page ----------------------------------------------------- */

.getbent-single-event {
	background: #f2f3f5;
}

/* -- Hero image ------------------------------------------------------------ */

.getbent-single-event__hero {
	width: 100%;
	height: 380px;
	overflow: hidden;
}

.getbent-single-event__hero-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

/* -- Two-column layout ----------------------------------------------------- */

.getbent-single-event__layout {
	display: flex;
	align-items: stretch;
}

/* -- Sidebar --------------------------------------------------------------- */

.getbent-single-event__sidebar {
	width: 220px;
	flex-shrink: 0;
	background: #18181b;
	color: #fff;
	padding: 24px 20px;
}

/* -- Date badge (in sidebar) ----------------------------------------------- */

.getbent-single-event__badge {
	text-align: center;
	margin-bottom: 20px;
}

.getbent-single-event__badge-month {
	display: block;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	opacity: 0.7;
	margin-bottom: 2px;
}

.getbent-single-event__badge-day {
	display: block;
	font-size: 36px;
	font-weight: 800;
	line-height: 1;
}

.getbent-single-event__badge-dow {
	display: block;
	font-size: 10px;
	opacity: 0.6;
	margin-top: 2px;
}

.getbent-single-event__badge-sep {
	display: block;
	border-top: 1px solid rgba(255, 255, 255, 0.25);
	margin: 8px 0 6px;
}

.getbent-single-event__badge-time {
	display: block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.getbent-single-event__no-dates {
	display: block;
	font-size: 13px;
	font-style: italic;
	color: rgba(255, 255, 255, 0.5);
	margin-bottom: 20px;
}

/* -- Sidebar meta (venue, price, organizer) -------------------------------- */

.getbent-single-event__meta {
	padding-top: 16px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.getbent-single-event__meta-item {
	font-size: 13px;
	color: rgba(255, 255, 255, 0.75);
	margin-bottom: 6px;
	line-height: 1.4;
}

.getbent-single-event__meta-item a {
	color: rgba(255, 255, 255, 0.75);
	text-decoration: underline;
}

.getbent-single-event__meta-item a:hover {
	color: #fff;
}

/* -- Sidebar CTA button ---------------------------------------------------- */

.getbent-single-event__cta {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin-top: 14px;
	padding: 8px 16px;
	border: 1.5px solid rgba(255, 255, 255, 0.4);
	border-radius: 4px;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.getbent-single-event__cta:hover {
	background: #fff;
	color: #18181b;
	border-color: #fff;
}

/* -- Sidebar chip sections ------------------------------------------------- */

.getbent-single-event__chips-section {
	margin-top: 16px;
	padding-top: 12px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.getbent-single-event__chips-label {
	display: block;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: rgba(255, 255, 255, 0.4);
	margin-bottom: 6px;
}

.getbent-single-event__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

/* -- Main content area ----------------------------------------------------- */

.getbent-single-event__main {
	flex: 1;
	min-width: 0;
	padding: 28px 32px;
	background: #f2f3f5;
}

/* -- Event type chips (above title, in main) ------------------------------- */

.getbent-single-event__event-type-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

/* -- Title ----------------------------------------------------------------- */

.getbent-single-event__title {
	font-size: 28px;
	font-weight: 800;
	line-height: 1.2;
	color: #111;
	margin: 0 0 16px;
}

/* -- Map (full-width, below layout) --------------------------------------- */

.getbent-single-event__map {
	height: 280px;
	width: 100%;
	filter: grayscale(75%) opacity(0.65) brightness(1.08);
}

/* -- Responsive: mobile (< 640px) ----------------------------------------- */

@media (max-width: 640px) {

	.getbent-single-event__hero {
		height: 220px;
	}

	.getbent-single-event__layout {
		flex-direction: column;
	}

	.getbent-single-event__sidebar {
		width: auto;
		padding: 20px 16px;
	}

	.getbent-single-event__main {
		padding: 20px 16px;
	}
}

/* -- Event navigation bar -------------------------------------------------- */

.getbent-event-nav {
	display: flex;
	justify-content: space-between;
	background: #18181b;
	padding: 10px 20px;
}

.getbent-event-nav__prev,
.getbent-event-nav__next {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
	min-width: 0;
	padding: 4px 8px;
	border-radius: 4px;
	text-decoration: none;
	color: #fff;
	transition: background 0.15s;
}

.getbent-event-nav__next {
	justify-content: flex-end;
	text-align: right;
}

.getbent-event-nav__prev:hover,
.getbent-event-nav__next:hover {
	background: rgba(255, 255, 255, 0.05);
}

.getbent-event-nav__chevron {
	font-size: 20px;
	opacity: 0.5;
	flex-shrink: 0;
	transition: opacity 0.15s;
}

.getbent-event-nav__prev:hover .getbent-event-nav__chevron,
.getbent-event-nav__next:hover .getbent-event-nav__chevron {
	opacity: 1;
}

.getbent-event-nav__title {
	display: block;
	font-size: 13px;
	font-weight: 700;
	opacity: 0.75;
	transition: opacity 0.15s;
}

.getbent-event-nav__prev:hover .getbent-event-nav__title,
.getbent-event-nav__next:hover .getbent-event-nav__title {
	opacity: 1;
}

.getbent-event-nav__date {
	display: block;
	font-size: 11px;
	opacity: 0.5;
	/* intentionally no hover change — date is secondary info */
}

.getbent-event-nav__prev--empty,
.getbent-event-nav__next--empty {
	pointer-events: none;
	opacity: 0;
}

/* -- Responsive: nav bar (< 640px) ---------------------------------------- */

@media (max-width: 640px) {

	.getbent-event-nav {
		flex-direction: column;
		padding: 0;
	}

	.getbent-event-nav__prev,
	.getbent-event-nav__next {
		width: 100%;
		box-sizing: border-box;
		padding: 12px 16px;
	}

	.getbent-event-nav__prev {
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	}

}
