/* The Shed Events: booking form, events grid and manage-booking page.
   Colours follow theshedatmwnt.co.uk: coral accents, warm neutrals, Open Sans UI. */

.shed-scope {
	--shed-accent: #c0504c;        /* buttons & interactive text (AA contrast on white) */
	--shed-accent-hover: #a8433f;
	--shed-accent-soft: #e87e7a;   /* site coral, decorative */
	--shed-tint: #fdf1f0;
	--shed-ink: #3f3a3a;
	--shed-text: #5b5b5b;
	--shed-muted: #7a7270;
	--shed-line: #ebe4e1;
	--shed-soft: #faf6f4;
	--shed-card: #ffffff;
	--shed-success: #2f7d4f;
	--shed-radius: 12px;
	--shed-font: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-family: var(--shed-font);
	color: var(--shed-text);
	line-height: 1.5;
}
.shed-scope *, .shed-scope *::before, .shed-scope *::after { box-sizing: border-box; }
.shed-scope [hidden] { display: none !important; }

/* ---------- Buttons ---------- */
.shed-scope .shed-btn,
.shed-scope .shed-btn.button,
.shed-booking .single_add_to_cart_button.shed-submit {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 12px 26px;
	font-family: var(--shed-font); font-size: 13px; font-weight: 600; line-height: 1.2;
	letter-spacing: 1px; text-transform: uppercase; text-decoration: none;
	color: #fff; background: var(--shed-accent);
	border: 0; border-radius: 4px; box-shadow: 0 1px 4px rgba(198, 106, 103, .35);
	cursor: pointer; transition: background-color .15s ease, transform .15s ease, opacity .15s ease;
}
.shed-scope .shed-btn:hover,
.shed-booking .single_add_to_cart_button.shed-submit:hover { background: var(--shed-accent-hover); color: #fff; }
.shed-scope .shed-btn:focus-visible,
.shed-booking .single_add_to_cart_button.shed-submit:focus-visible { outline: 3px solid var(--shed-accent-soft); outline-offset: 2px; }
.shed-booking .single_add_to_cart_button.shed-submit:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ---------- Booking form ---------- */
.shed-booking { display: block; margin: 24px 0; max-width: 720px; }
.shed-booking.cart { display: block; } /* override WooCommerce's flex on form.cart */

.shed-event-bar {
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px;
	padding: 14px 18px; margin-bottom: 18px;
	background: var(--shed-soft); border: 1px solid var(--shed-line); border-radius: var(--shed-radius);
	color: var(--shed-ink); font-size: 15px;
}
.shed-event-bar > div { display: flex; align-items: center; gap: 8px; }
.shed-event-bar svg { color: var(--shed-accent-soft); flex: none; }

.shed-places {
	margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
	padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
	color: var(--shed-success); background: #eaf5ee; white-space: nowrap;
}
.shed-places::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.shed-places[data-state="low"] { color: #9a5b00; background: #fdf3e2; }
.shed-places[data-state="closed"], .shed-places[data-state="soldout"] { color: var(--shed-accent); background: var(--shed-tint); }
.shed-places--small { margin-left: 0; font-size: 12px; padding: 4px 10px; }

.shed-closed { padding: 14px 18px; border-radius: var(--shed-radius); background: var(--shed-tint); color: var(--shed-accent); font-weight: 600; }

.shed-section {
	padding: 22px; margin-bottom: 16px;
	background: var(--shed-card); border: 1px solid var(--shed-line); border-radius: var(--shed-radius);
}
.shed-section__title {
	display: flex; align-items: center; gap: 12px; margin: 0 0 16px;
	font-family: var(--shed-font); font-size: 16px; font-weight: 700; letter-spacing: .5px;
	text-transform: uppercase; color: var(--shed-ink);
}
.shed-section__num {
	display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none;
	border-radius: 50%; background: var(--shed-accent-soft); color: #fff; font-size: 14px;
}
.shed-hint { margin: 10px 0 0; font-size: 13px; color: var(--shed-muted); }
.shed-hint--center { text-align: center; }

/* Ticket rows */
.shed-tickets { display: grid; gap: 10px; }
.shed-ticket {
	display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px;
	padding: 12px 14px; border: 1px solid var(--shed-line); border-radius: 10px; background: var(--shed-soft);
}
.shed-ticket__label { display: block; font-weight: 700; color: var(--shed-ink); }
.shed-ticket__note { display: block; font-size: 13px; color: var(--shed-muted); }
.shed-ticket__price { font-weight: 600; color: var(--shed-ink); white-space: nowrap; }

.shed-stepper { display: inline-flex; align-items: center; border: 1px solid var(--shed-line); border-radius: 999px; background: #fff; }
.shed-scope .shed-stepper__btn {
	width: 40px; height: 40px; padding: 0; margin: 0; border: 0; border-radius: 50%;
	background: transparent; color: var(--shed-accent); font-size: 22px; line-height: 1; font-weight: 400;
	cursor: pointer; box-shadow: none;
}
.shed-scope .shed-stepper__btn:hover { background: var(--shed-tint); color: var(--shed-accent); }
.shed-scope .shed-stepper__btn:disabled { color: var(--shed-line); background: transparent; cursor: default; }
.shed-scope .shed-stepper__input {
	width: 44px; height: 40px; padding: 0; margin: 0; border: 0; background: transparent; box-shadow: none;
	text-align: center; font: 700 17px/1 var(--shed-font); color: var(--shed-ink); -moz-appearance: textfield;
}
.shed-stepper__input::-webkit-outer-spin-button, .shed-stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Guest cards */
.shed-guests { display: grid; gap: 12px; }
.shed-guest {
	margin: 0; padding: 16px; min-width: 0;
	border: 1px solid var(--shed-line); border-radius: 10px; background: var(--shed-soft);
}
.shed-guest__legend { display: flex; align-items: center; gap: 10px; padding: 0 6px; font-weight: 700; color: var(--shed-ink); }
.shed-guest__badge {
	padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
	color: var(--shed-accent); background: var(--shed-tint);
}
.shed-guest__badge--child { color: #2c6a8a; background: #e6f2f8; }
.shed-guest__badge--infant { color: #6b5a8e; background: #efebf6; }
.shed-guest__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-top: 6px; }
.shed-guest__wide { grid-column: 1 / -1; }

.shed-field { display: flex; flex-direction: column; gap: 5px; margin: 0; }
.shed-section > .shed-field + .shed-field, .shed-group + .shed-field { margin-top: 14px; }
.shed-field label, .shed-label { font-size: 13px; font-weight: 600; color: var(--shed-ink); }
.shed-scope .shed-field input[type="text"],
.shed-scope .shed-field select,
.shed-scope .shed-field textarea {
	width: 100%; min-height: 44px; padding: 10px 12px; margin: 0;
	font: 15px/1.4 var(--shed-font); color: var(--shed-ink);
	background: #fff; border: 1px solid #d9d0cc; border-radius: 8px; box-shadow: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.shed-scope .shed-field textarea { min-height: 88px; resize: vertical; }
.shed-scope .shed-field input:focus, .shed-scope .shed-field select:focus, .shed-scope .shed-field textarea:focus {
	outline: none; border-color: var(--shed-accent-soft); box-shadow: 0 0 0 3px rgba(232, 126, 122, .25);
}
.shed-scope .shed-field.is-invalid select, .shed-scope .shed-field.is-invalid input { border-color: var(--shed-accent); box-shadow: 0 0 0 3px rgba(192, 80, 76, .15); }
.shed-static { padding: 10px 0; color: var(--shed-muted); }
.shed-dish-desc { font-size: 12px; color: var(--shed-muted); }

.shed-check { display: flex; align-items: flex-start; gap: 10px; margin: 0; cursor: pointer; font-size: 15px; color: var(--shed-ink); }
.shed-check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--shed-accent); flex: none; }
.shed-check small { color: var(--shed-muted); }
.shed-group { margin-top: 14px; padding-left: 28px; }

/* Summary */
.shed-summary {
	padding: 18px 22px; border-radius: var(--shed-radius);
	background: var(--shed-card); border: 1px solid var(--shed-line); box-shadow: 0 6px 24px rgba(63, 58, 58, .06);
}
.shed-summary__lines { display: grid; gap: 4px; font-size: 14px; color: var(--shed-text); }
.shed-summary__lines:empty { display: none; }
.shed-summary__line { display: flex; justify-content: space-between; gap: 12px; }
.shed-summary__total {
	display: flex; justify-content: space-between; align-items: baseline; margin: 10px 0 14px; padding-top: 10px;
	border-top: 1px solid var(--shed-line); font-size: 15px; font-weight: 600; color: var(--shed-ink);
}
.shed-summary__total strong { font-size: 24px; }
.shed-summary .shed-submit { width: 100%; }
.shed-error { margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: var(--shed-tint); color: var(--shed-accent); font-weight: 600; font-size: 14px; }

/* Price HTML on product pages and cards */
.shed-price-part small { font-size: .75em; font-weight: 400; color: var(--shed-muted, #7a7270); }
.shed-price-sep { color: #c9bfbb; }

@media (max-width: 600px) {
	.shed-section { padding: 16px; }
	.shed-ticket { grid-template-columns: 1fr auto; }
	.shed-ticket__price { grid-column: 1; grid-row: 2; font-size: 14px; }
	.shed-ticket .shed-stepper { grid-column: 2; grid-row: 1 / span 2; }
	.shed-guest__grid { grid-template-columns: 1fr; }
	.shed-places { margin-left: 0; }
	.shed-summary { padding: 14px 16px; }
}

/* ---------- Events grid ---------- */
.shed-events { display: grid; gap: 28px; }
.shed-events--grid {
	--shed-gap: 28px;
	grid-template-columns: repeat(auto-fill, minmax(max(260px, calc((100% - (var(--shed-cols, 3) - 1) * var(--shed-gap)) / var(--shed-cols, 3))), 1fr));
	gap: var(--shed-gap);
}
.shed-event-card {
	display: flex; flex-direction: column; overflow: hidden;
	background: var(--shed-card); border: 1px solid var(--shed-line); border-radius: var(--shed-radius);
	box-shadow: 0 2px 10px rgba(63, 58, 58, .05); transition: transform .2s ease, box-shadow .2s ease;
}
.shed-event-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(63, 58, 58, .1); }
.shed-event-card__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--shed-soft); }
.shed-event-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.shed-event-card:hover .shed-event-card__media img { transform: scale(1.04); }
.shed-event-card__placeholder { position: absolute; inset: 0; background: linear-gradient(135deg, var(--shed-soft), var(--shed-tint)); }
.shed-event-card__date {
	position: absolute; top: 14px; left: 14px; display: grid; place-items: center; min-width: 58px; padding: 8px 6px 6px;
	background: #fff; border-radius: 10px; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); color: var(--shed-ink); line-height: 1;
}
.shed-event-card__day { font-size: 24px; font-weight: 700; }
.shed-event-card__month { margin-top: 3px; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--shed-accent); }
.shed-event-card__body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 20px 22px 22px; }
.shed-event-card__when { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--shed-accent); }
.shed-event-card__title { margin: 0; font-family: var(--shed-font); font-size: 21px; font-weight: 700; line-height: 1.25; color: var(--shed-ink); }
.shed-event-card__title a { color: inherit; text-decoration: none; }
.shed-event-card__title a:hover { color: var(--shed-accent); }
.shed-event-card__excerpt { margin: 0; font-size: 14px; color: var(--shed-muted); }
.shed-event-card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; }
.shed-event-card__price { font-size: 15px; font-weight: 600; color: var(--shed-ink); }
.shed-event-card__price .amount { color: var(--shed-ink); }
.shed-scope .shed-event-card__btn { margin-top: 6px; width: 100%; }
.shed-event-card.is-sold-out .shed-event-card__media img { filter: grayscale(.6); opacity: .85; }
.shed-event-card.is-sold-out .shed-event-card__btn { background: var(--shed-ink); }

.shed-events--list { grid-template-columns: 1fr; gap: 18px; }
.shed-events--list .shed-event-card { flex-direction: row; }
.shed-events--list .shed-event-card__media { flex: 0 0 min(38%, 340px); aspect-ratio: auto; min-height: 220px; }
.shed-events--list .shed-event-card__btn { width: auto; align-self: flex-start; }
@media (max-width: 680px) {
	.shed-events--list .shed-event-card { flex-direction: column; }
	.shed-events--list .shed-event-card__media { flex: none; aspect-ratio: 4 / 3; min-height: 0; }
	.shed-events--list .shed-event-card__btn { width: 100%; }
}
.shed-events-empty { padding: 28px; text-align: center; border: 1px dashed var(--shed-line); border-radius: var(--shed-radius); color: var(--shed-muted); }

/* ---------- Manage booking ---------- */
.shed-manage { display: grid; gap: 20px; max-width: 760px; margin: 0 auto; }
.shed-card { padding: 22px; background: var(--shed-card); border: 1px solid var(--shed-line); border-radius: var(--shed-radius); }
.shed-manage__intro { margin: 0; color: var(--shed-muted); }
.shed-manage__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.shed-manage__title { margin: 0; font-family: var(--shed-font); font-size: 22px; font-weight: 700; color: var(--shed-ink); }
.shed-manage__meta { margin: 2px 0 0; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; font-weight: 600; color: var(--shed-accent); }
.shed-manage__form { display: grid; gap: 16px; margin-top: 14px; }
.shed-manage__form .shed-btn { justify-self: start; }
.shed-pill { padding: 5px 12px; border-radius: 999px; background: var(--shed-tint); color: var(--shed-accent); font-size: 13px; font-weight: 600; }
.shed-notice { padding: 12px 16px; border-radius: 8px; font-weight: 600; }
.shed-notice--success { background: #eaf5ee; color: var(--shed-success); }
.shed-notice--error { background: var(--shed-tint); color: var(--shed-accent); }
.shed-summary-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0; }
.shed-summary-list dt { font-weight: 600; color: var(--shed-ink); }
.shed-summary-list dd { margin: 0; }
.shed-link-list { margin: 8px 0 0; padding-left: 18px; }

.shed-manage-callout {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
	margin: 20px 0; padding: 16px 20px; border-radius: var(--shed-radius);
	background: var(--shed-soft); border: 1px solid var(--shed-line); border-left: 4px solid var(--shed-accent-soft);
}
.shed-manage-callout strong { display: block; color: var(--shed-ink); }
.shed-manage-callout span { font-size: 14px; color: var(--shed-muted); }
