/**
 * Ingi Bjarni Concerts — front-end styles.
 *
 * A clean, date-led "gig list" look that inherits Astra's fonts (Playfair
 * Display for headings/act names, Open Sans for body). One accent colour drives
 * the theme — change --ibc-accent below to re-skin everything.
 *
 * Layout: desktop is the base; the @media (max-width: 600px) block at the end
 * adapts to mobile (stacked event list + archive cards).
 */

:root {
	--ibc-accent: #0f6e56;          /* deep teal-green; change this to re-theme */
	--ibc-ink:    inherit;          /* act / headline colour (inherits page text) */
	--ibc-muted:  #5d6b66;          /* secondary text */
	--ibc-line:   rgba(0, 0, 0, 0.10); /* hairline rules */
	--ibc-card:   #ffffff;          /* card / table surface */
}

/* Search/▾ icons as inline SVG so we don't depend on any icon font. */

/* =========================================================
   Event list — Upcoming & Recent
   ========================================================= */
.ibc-events {
	list-style: none;
	margin: 0 0 1.5em;
	padding: 0;
}

.ibc-event {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	padding: 15px 0;
	border-bottom: 1px solid var(--ibc-line);
}

.ibc-event:first-child {
	border-top: 1px solid var(--ibc-line);
}

/* Date block (desktop): big day over month/year over time. */
.ibc-event-date {
	flex: 0 0 7.5em;
}

.ibc-ed-day {
	display: block;
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 1.7em;
	line-height: 1;
	color: var(--ibc-ink);
}

.ibc-ed-mon {
	display: block;
	margin-top: 3px;
	font-size: 0.78em;
	font-weight: 600;
	color: var(--ibc-accent);
}

.ibc-ed-time {
	display: block;
	margin-top: 2px;
	font-size: 0.78em;
	color: var(--ibc-muted);
}

.ibc-event-main {
	flex: 1 1 auto;
	min-width: 0;
}

.ibc-event-act {
	font-family: 'Playfair Display', Georgia, serif;
	font-size: 1.15em;
	line-height: 1.3;
	color: var(--ibc-ink);
}

.ibc-event-meta {
	margin-top: 3px;
	font-size: 0.92em;
	color: var(--ibc-muted);
}

.ibc-event-meta .ibc-sep {
	opacity: 0.55;
}

.ibc-event-tickets {
	flex: 0 0 auto;
}

.ibc-tickets {
	display: inline-block;
	font-size: 0.9em;
	font-weight: 600;
	color: var(--ibc-accent);
	white-space: nowrap;
	text-decoration: none;
}

.ibc-tickets:hover,
.ibc-tickets:focus {
	text-decoration: underline;
}

.ibc-event-tickets .ibc-tickets::after {
	content: " \2192"; /* → */
}

/* =========================================================
   Archive
   ========================================================= */
.ibc-archive {
	margin: 0 0 1.5em;
}

/* --- Search + filter controls --- */
.ibc-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin: 0 0 1.1em;
}

/* Labels are kept for screen readers but hidden visually (the placeholder and
   default option already say what each control does). */
.ibc-controls label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.ibc-field {
	display: inline-flex;
}

.ibc-field-search {
	position: relative;
	flex: 1 1 16em;
}

.ibc-search {
	width: 100%;
	box-sizing: border-box;
	padding: 0.6em 0.9em 0.6em 2.3em;
	font: inherit;
	color: var(--ibc-ink);
	background: var(--ibc-card) no-repeat 0.8em center;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235d6b66' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l4 4'/%3E%3C/svg%3E");
	border: 1px solid var(--ibc-line);
	border-radius: 10px;
}

.ibc-filter {
	font: inherit;
	font-size: 0.92em;
	color: var(--ibc-muted);
	padding: 0.5em 2.2em 0.5em 0.95em;
	background: var(--ibc-card) no-repeat right 0.7em center;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%235d6b66' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
	border: 1px solid var(--ibc-line);
	border-radius: 999px;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

.ibc-search:focus,
.ibc-filter:focus {
	outline: 2px solid var(--ibc-accent);
	outline-offset: 1px;
	border-color: var(--ibc-accent);
}

.ibc-status {
	font-size: 0.9em;
	color: var(--ibc-muted);
	margin: 0 0 0.6em;
}

/* Hide JS-only controls until the script enhances the archive. */
.ibc-archive:not(.ibc-enhanced) .ibc-controls,
.ibc-archive:not(.ibc-enhanced) .ibc-status,
.ibc-archive:not(.ibc-enhanced) .ibc-pager {
	display: none;
}

/* --- Table (desktop) --- */
.ibc-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	background: var(--ibc-card);
	border: 1px solid var(--ibc-line);
	border-radius: 12px;
}

.ibc-archive-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95em;
}

.ibc-archive-table thead th {
	font-size: 0.8em;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: var(--ibc-muted);
	text-align: left;
	white-space: nowrap;
	padding: 14px 14px 10px;
	border-bottom: 1px solid var(--ibc-line);
}

.ibc-archive-table tbody td {
	padding: 12px 14px;
	vertical-align: top;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ibc-archive-table tbody tr:last-child td {
	border-bottom: 0;
}

.ibc-archive-table tbody tr:hover {
	background: rgba(15, 110, 86, 0.045);
}

.ibc-c-date {
	white-space: nowrap;
}

/* Sortable headers. */
.ibc-sort {
	cursor: pointer;
	user-select: none;
}

.ibc-sort:hover {
	color: var(--ibc-ink);
}

.ibc-sort::after {
	content: "";
	display: inline-block;
	width: 0.7em;
	margin-left: 0.3em;
	opacity: 0.4;
}

.ibc-sort[aria-sort="ascending"]::after {
	content: "\2191"; /* ↑ */
	opacity: 1;
}

.ibc-sort[aria-sort="descending"]::after {
	content: "\2193"; /* ↓ */
	opacity: 1;
}

.ibc-sort:focus {
	outline: 2px solid var(--ibc-accent);
	outline-offset: -2px;
}

/* Project tag (a soft pill tinted from the accent). */
.ibc-tag {
	display: inline-block;
	font-size: 0.72em;
	font-weight: 600;
	line-height: 1.7;
	padding: 0 10px;
	border-radius: 999px;
	white-space: nowrap;
	color: var(--ibc-accent);
	background: #e7f3ee;
	background: color-mix(in srgb, var(--ibc-accent) 13%, #fff);
}

/* Optional inline note under a venue. */
.ibc-note {
	display: block;
	font-size: 0.85em;
	color: var(--ibc-muted);
	margin-top: 0.15em;
}

/* --- Pagination --- */
.ibc-pager {
	display: flex;
	gap: 0.5em;
	align-items: center;
	justify-content: center;
	margin-top: 1.2em;
}

.ibc-page-btn {
	cursor: pointer;
	font: inherit;
	font-size: 0.9em;
	color: var(--ibc-muted);
	padding: 0.4em 1em;
	background: var(--ibc-card);
	border: 1px solid var(--ibc-line);
	border-radius: 999px;
}

.ibc-page-btn:hover:not([disabled]) {
	border-color: var(--ibc-accent);
	color: var(--ibc-accent);
}

.ibc-page-btn[disabled] {
	opacity: 0.4;
	cursor: default;
}

.ibc-page-info {
	font-size: 0.9em;
	color: var(--ibc-muted);
}

/* Friendly empty/placeholder message. */
.ibc-empty {
	color: var(--ibc-muted);
	font-style: italic;
}

/* =========================================================
   Mobile (≤ 600px)
   ========================================================= */
@media (max-width: 600px) {

	/* Event list → one-line date eyebrow + act + meta, stacked. */
	.ibc-event {
		display: block;
		padding: 13px 0;
	}

	.ibc-event-date {
		display: block;
		margin-bottom: 1px;
	}

	.ibc-ed-day,
	.ibc-ed-mon,
	.ibc-ed-time {
		display: inline;
		font-family: 'Open Sans', sans-serif;
		font-size: 0.82em;
		font-weight: 600;
		color: var(--ibc-accent);
		margin: 0;
	}

	.ibc-ed-time::before {
		content: " · ";
	}

	.ibc-event-act {
		font-size: 1.1em;
		margin-top: 2px;
	}

	.ibc-event-tickets {
		margin-top: 6px;
	}

	/* Archive → one card per concert; header is hidden (filter/search instead). */
	.ibc-table-wrap {
		overflow: visible;
		background: none;
		border: 0;
		border-radius: 0;
	}

	.ibc-archive-table thead {
		position: absolute;
		left: -9999px;
	}

	.ibc-archive-table,
	.ibc-archive-table tbody,
	.ibc-archive-table tr,
	.ibc-archive-table td {
		display: block;
	}

	.ibc-archive-table tr {
		background: var(--ibc-card);
		border: 1px solid var(--ibc-line);
		border-radius: 12px;
		padding: 12px 14px;
		margin: 0 0 10px;
	}

	.ibc-archive-table tbody tr:hover {
		background: var(--ibc-card);
	}

	/* Reset desktop padding/border. Must target "tbody td" to beat the desktop
	   ".ibc-archive-table tbody td" rule. The grouped cells are emitted without
	   whitespace between them in the markup so the inline meta reads cleanly. */
	.ibc-archive-table tbody td {
		padding: 0;
		border: 0;
	}

	.ibc-archive-table .ibc-c-date,
	.ibc-archive-table .ibc-c-time {
		display: inline;
		font-size: 0.8em;
		font-weight: 600;
		color: var(--ibc-accent);
		white-space: nowrap;
	}

	.ibc-archive-table .ibc-c-time:not(:empty)::before {
		content: " · ";
	}

	.ibc-archive-table .ibc-c-act {
		font-family: 'Playfair Display', Georgia, serif;
		font-size: 1.05em;
		margin: 3px 0 2px;
	}

	.ibc-archive-table .ibc-c-venue,
	.ibc-archive-table .ibc-c-city,
	.ibc-archive-table .ibc-c-country {
		display: inline;
		font-size: 0.9em;
		color: var(--ibc-muted);
	}

	.ibc-archive-table .ibc-c-city:not(:empty)::before {
		content: " · ";
	}

	.ibc-archive-table .ibc-c-country:not(:empty)::before {
		content: ", ";
	}

	.ibc-archive-table .ibc-c-project:not(:empty),
	.ibc-archive-table .ibc-c-tickets:not(:empty) {
		margin-top: 7px;
	}

	.ibc-archive-table .ibc-c-project:empty,
	.ibc-archive-table .ibc-c-tickets:empty {
		display: none;
	}
}
