/**
 * Event Booking — Frontend Styles
 * Used by the [event_bookings] shortcode page.
 *
 * @package EventBooking
 */

/* ── Variables ───────────────────────────────────────────────────────────── */
:root {
	--eb-primary:   #2271b1;
	--eb-success:   #00a32a;
	--eb-danger:    #d63638;
	--eb-warning:   #dba617;
	--eb-grey-light:#f6f7f7;
	--eb-grey-mid:  #dcdcde;
	--eb-text:      #3c434a;
	--eb-radius:    6px;
	--eb-font:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ── Notices ─────────────────────────────────────────────────────────────── */
.eb-notice {
	padding: 14px 18px;
	border-left: 4px solid var(--eb-primary);
	background: #f0f6fc;
	border-radius: var(--eb-radius);
	margin: 0 0 20px;
	font-family: var(--eb-font);
	color: var(--eb-text);
	font-size: 0.95rem;
}

.eb-notice--success {
	border-color: var(--eb-success);
	background: #f0fdf4;
	color: #166534;
}

.eb-notice--error {
	border-color: var(--eb-danger);
	background: #fef2f2;
	color: #7f1d1d;
}

.eb-notice--info {
	border-color: var(--eb-primary);
	background: #f0f6fc;
	color: #1e3a5f;
}

/* ── Section headings ────────────────────────────────────────────────────── */
.eb-section-title {
	font-family: var(--eb-font);
	font-size: 1.15rem;
	font-weight: 600;
	color: var(--eb-text);
	margin: 28px 0 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--eb-grey-mid);
}

/* ── Bookings table wrapper ───────────────────────────────────────────────── */
.eb-bookings-table-wrap {
	overflow-x: auto;
	margin-bottom: 24px;
	border: 1px solid var(--eb-grey-mid);
	border-radius: var(--eb-radius);
	box-shadow: 0 1px 3px rgba(0,0,0,.05);
}

/* ── Bookings table ──────────────────────────────────────────────────────── */
.eb-bookings-table {
	width: 100%;
	border-collapse: collapse;
	font-family: var(--eb-font);
	font-size: 0.9rem;
	color: var(--eb-text);
	background: #fff;
}

.eb-bookings-table thead {
	background: var(--eb-grey-light);
}

.eb-bookings-table th {
	text-align: left;
	padding: 11px 14px;
	font-weight: 600;
	font-size: 0.82rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #646970;
	border-bottom: 1px solid var(--eb-grey-mid);
	white-space: nowrap;
}

.eb-bookings-table td {
	padding: 12px 14px;
	border-bottom: 1px solid var(--eb-grey-mid);
	vertical-align: middle;
}

.eb-bookings-table tbody tr:last-child td {
	border-bottom: none;
}

.eb-bookings-table tbody tr:hover td {
	background: var(--eb-grey-light);
}

/* Cancelled row: muted look */
.eb-row.eb-status-cancelled td {
	opacity: 0.6;
	text-decoration-color: var(--eb-danger);
}

/* ── Status badges ───────────────────────────────────────────────────────── */
.eb-badge {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 20px;
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.eb-badge--active {
	background: #d1fae5;
	color: #065f46;
}

.eb-badge--cancelled {
	background: #fee2e2;
	color: #7f1d1d;
}

/* ── Ticket code ─────────────────────────────────────────────────────────── */
.eb-bookings-table code {
	background: var(--eb-grey-light);
	border: 1px solid var(--eb-grey-mid);
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 0.83rem;
	letter-spacing: 0.03em;
	color: #1a1a2e;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.eb-btn {
	display: inline-block;
	padding: 7px 14px;
	border: none;
	border-radius: var(--eb-radius);
	cursor: pointer;
	font-family: var(--eb-font);
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition: background 0.15s, box-shadow 0.15s;
}

.eb-btn--register {
	background: #36384C;
	color: #E9DCCD;
	border: 1px solid #36384C;
}

.eb-btn--register:hover {
	background: #2a2c3c;
	border-color: #2a2c3c;
	color: #E9DCCD;
	box-shadow: 0 2px 6px rgba(54,56,76,.25);
}

.eb-btn--login {
	background: transparent;
	color: #36384C;
	border: 1px solid #748398;
}

.eb-btn--login:hover {
	background: #748398;
	border-color: #748398;
	color: #E9DCCD;
}

.eb-btn--cancel {
	background: transparent;
	color: #9e4a4a;
	border: 1px solid #9e4a4a;
}

.eb-btn--cancel:hover {
	background: #9e4a4a;
	color: #E9DCCD;
	box-shadow: 0 2px 6px rgba(158,74,74,.25);
}

/* ── Inline cancel labels ────────────────────────────────────────────────── */
.eb-cancelled-label,
.eb-no-cancel {
	font-size: 0.83rem;
	color: #888;
	font-style: italic;
}

.eb-no-cancel {
	cursor: help;
	border-bottom: 1px dashed #bbb;
}

/* ── Cancel form spacing ─────────────────────────────────────────────────── */
.eb-cancel-form {
	margin: 0;
}

/* ── Credit balance box ──────────────────────────────────────────────────── */
.eb-credit-balance {
	padding: 14px 18px;
	border-left: 4px solid var(--eb-success);
	background: #f0fdf4;
	border-radius: var(--eb-radius);
	margin: 0 0 20px;
	font-family: var(--eb-font);
	color: #166534;
	font-size: 0.95rem;
}

.eb-credit-balance strong {
	font-weight: 700;
}

/* ── Login notice (product page) ─────────────────────────────────────────── */
.eb-login-notice {
	margin-top: 12px;
}

/* ── Low availability warning ─────────────────────────────────────────────── */
.eb-spots-warning {
	font-weight: 700;
	color: var(--eb-danger);
	font-size: 0.85rem;
}

/* ── Past events accordion ───────────────────────────────────────────────── */
.eb-past-accordion {
	margin-top: 28px;
}

.eb-past-accordion > summary.eb-section-title {
	cursor: pointer;
	list-style: none;
	user-select: none;
	margin-bottom: 0;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--eb-grey-mid);
	position: relative;
}

.eb-past-accordion > summary.eb-section-title::-webkit-details-marker {
	display: none;
}

.eb-past-accordion > summary.eb-section-title::after {
	content: '▸';
	position: absolute;
	right: 4px;
	top: 0;
	font-size: 1rem;
	transition: transform 0.2s;
}

.eb-past-accordion[open] > summary.eb-section-title::after {
	transform: rotate(90deg);
}

.eb-past-accordion[open] > summary.eb-section-title {
	margin-bottom: 12px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media screen and (max-width: 600px) {
	.eb-bookings-table th:nth-child(4),
	.eb-bookings-table td:nth-child(4) {
		display: none; /* Hide Order column on very small screens */
	}

	.eb-btn {
		padding: 9px 12px;
	}
}
