/**
 * Art & Souls Booth Booking - frontend styles.
 *
 * Mobile-first. Scoped under .asbb-app so it does not leak into themes.
 */

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

.asbb-app {
	max-width: 72rem;
	margin: 0 auto;
	font-size: 1rem;
	line-height: 1.5;
	color: #222;
}

/* The [hidden] attribute must win over flex/grid display rules below. */
.asbb-app [hidden] {
	display: none !important;
}

body.asbb-no-scroll {
	overflow: hidden;
}

.asbb-section-title {
	font-size: 1.2rem;
	margin: 1.75rem 0 0.75rem;
}

.asbb-notice {
	background: #f6f4ee;
	border: 1px solid #ddd6c4;
	border-radius: 0.5rem;
	padding: 1rem 1.25rem;
}

.asbb-admin-note {
	background: #fff8e1;
	border: 1px dashed #c9a227;
	border-radius: 0.5rem;
	padding: 0.75rem 1rem;
	font-size: 0.9rem;
}

.asbb-event-meta {
	color: #555;
	margin-top: -0.5rem;
}

/* Visible keyboard focus everywhere inside the app. */
.asbb-app button:focus-visible,
.asbb-app input:focus-visible,
.asbb-app textarea:focus-visible,
.asbb-app a:focus-visible {
	outline: 3px solid #1a73e8;
	outline-offset: 2px;
}

/* ------------------------------- map ----------------------------------- */

.asbb-map-section {
	margin: 1rem 0;
}

.asbb-map-hint {
	display: none;
	font-size: 0.9rem;
	color: #555;
	margin: 0 0 0.5rem;
}

.asbb-map-wrap {
	overflow-x: auto;
	border: 1px solid #d8d2c2;
	border-radius: 0.5rem;
	background: #f7f5ef;
}

.asbb-map {
	position: relative;
	min-width: 620px; /* keeps booths tappable on small screens */
}

.asbb-map img {
	display: block;
	width: 100%;
	height: auto;
}

/* Booth buttons: positioned by PHP with inline percentage styles. */
.asbb-booth {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem; /* 40px tap target */
	min-height: 2.5rem;
	padding: 0.15rem;
	border: 2px solid rgba(255, 255, 255, 0.9);
	border-radius: 0.35rem;
	font-weight: 700;
	font-size: 0.85rem;
	line-height: 1;
	cursor: pointer;
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.asbb-booth:hover {
	transform: scale(1.07);
	z-index: 3;
}

.asbb-booth-number {
	pointer-events: none; /* clicks land on the button, not the span */
}

/* Display-status colors. */
.asbb-status-available { background: rgba(46, 158, 91, 0.93); }
.asbb-status-pending   { background: rgba(217, 154, 22, 0.93); color: #222; text-shadow: none; }
.asbb-status-approved  { background: rgba(224, 123, 36, 0.93); }
.asbb-status-paid      { background: rgba(192, 57, 43, 0.93); }

.asbb-status-pending,
.asbb-status-approved,
.asbb-status-paid {
	cursor: not-allowed;
}

/* Selected booths get a dark ring plus a check badge. */
.asbb-booth.asbb-selected {
	outline: 3px solid #1a1a1a;
	outline-offset: 1px;
}

.asbb-booth.asbb-selected::after {
	content: "\2713";
	position: absolute;
	top: -0.65rem;
	right: -0.65rem;
	width: 1.3rem;
	height: 1.3rem;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #1a1a1a;
	color: #fff;
	border-radius: 50%;
	font-size: 0.8rem;
	text-shadow: none;
}

/* Booths that were taken while the vendor was choosing. */
.asbb-booth.asbb-just-taken {
	outline: 3px dashed #c0392b;
	outline-offset: 2px;
	animation: asbb-pulse 1s ease 3;
}

@keyframes asbb-pulse {
	50% { opacity: 0.55; }
}

/* -------------------------------- legend -------------------------------- */

.asbb-legend {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	padding: 0;
	margin: 0.9rem 0 0;
	font-size: 0.9rem;
}

.asbb-legend li {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.asbb-swatch {
	display: inline-block;
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 0.25rem;
	border: 1px solid rgba(0, 0, 0, 0.25);
	flex: none;
}

.asbb-swatch.asbb-status-selected {
	background: transparent;
	border: 3px solid #1a1a1a;
}

.asbb-map-note {
	background: #eef4ff;
	border: 1px solid #bcd2f5;
	border-radius: 0.5rem;
	padding: 0.6rem 0.9rem;
	font-size: 0.92rem;
	margin: 0.9rem 0 0;
}

/* -------------------------------- popup --------------------------------- */

.asbb-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	z-index: 9999;
}

.asbb-popup {
	position: relative;
	background: #fff;
	border-radius: 0.75rem;
	padding: 1.5rem;
	width: 100%;
	max-width: 22rem;
	box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
}

.asbb-popup h3 {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
}

.asbb-popup-close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	width: 2.5rem;
	height: 2.5rem;
	border: none;
	border-radius: 50%;
	background: #f0ede4;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
}

.asbb-popup-price {
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0.25rem 0;
}

.asbb-popup-tier {
	display: inline-block;
	background: #f0ede4;
	border-radius: 999px;
	padding: 0.2rem 0.8rem;
	font-size: 0.85rem;
	margin: 0 0 0.75rem;
}

.asbb-popup-rental {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	background: #f7f5ef;
	border: 1px solid #e2dccb;
	border-radius: 0.5rem;
	padding: 0.7rem 0.9rem;
	margin: 0 0 1rem;
	cursor: pointer;
	font-size: 0.95rem;
}

.asbb-popup-rental input {
	width: 1.25rem;
	height: 1.25rem;
	flex: none;
	margin-top: 0.15rem;
	accent-color: #2e9e5b;
}

/* -------------------------------- buttons -------------------------------- */

.asbb-btn {
	display: inline-block;
	width: 100%;
	padding: 0.85rem 1.25rem;
	min-height: 3rem;
	border: none;
	border-radius: 0.5rem;
	background: #2e9e5b;
	color: #fff;
	font-size: 1.05rem;
	font-weight: 700;
	cursor: pointer;
}

.asbb-btn:hover {
	background: #26854c;
}

.asbb-btn:disabled {
	background: #9db3a6;
	cursor: wait;
}

.asbb-btn-secondary {
	background: #6b6b6b;
}

.asbb-btn-secondary:hover {
	background: #555;
}

/* -------------------------------- summary -------------------------------- */

.asbb-summary {
	background: #f7f5ef;
	border: 1px solid #e2dccb;
	border-radius: 0.5rem;
	padding: 1rem 1.25rem;
	margin: 1rem 0;
}

.asbb-summary .asbb-section-title {
	margin-top: 0;
}

.asbb-selected-empty {
	color: #555;
	margin: 0.5rem 0;
}

.asbb-selected-list {
	list-style: none;
	padding: 0;
	margin: 0.5rem 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.asbb-selected-item {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1rem;
	background: #fff;
	border: 1px solid #e2dccb;
	border-radius: 0.5rem;
	padding: 0.6rem 0.9rem;
}

.asbb-selected-info {
	font-weight: 600;
	flex: 1 1 10rem;
}

.asbb-selected-rental {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	font-size: 0.9rem;
	cursor: pointer;
}

.asbb-selected-rental input {
	width: 1.25rem;
	height: 1.25rem;
	accent-color: #2e9e5b;
}

.asbb-remove-booth {
	border: 1px solid #c9c2ae;
	background: #fff;
	border-radius: 0.4rem;
	padding: 0.5rem 0.8rem;
	min-height: 2.75rem;
	cursor: pointer;
	font-size: 0.9rem;
}

.asbb-remove-booth:hover {
	background: #fbe9e7;
	border-color: #c0392b;
	color: #c0392b;
}

.asbb-total {
	font-size: 1.1rem;
	margin: 0.75rem 0 0;
	text-align: right;
}

.asbb-total-amount {
	font-size: 1.35rem;
}

/* --------------------------------- form ---------------------------------- */

.asbb-form {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	margin: 1rem 0 2rem;
}

.asbb-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.3rem;
}

.asbb-required {
	color: #c0392b;
}

.asbb-field input[type="text"],
.asbb-field input[type="email"],
.asbb-field input[type="tel"],
.asbb-field input[type="url"],
.asbb-field textarea {
	width: 100%;
	padding: 0.7rem 0.85rem;
	min-height: 3rem;
	border: 1px solid #b9b2a0;
	border-radius: 0.4rem;
	font-size: 1rem;
	font-family: inherit;
	background: #fff;
}

.asbb-field textarea {
	min-height: 5.5rem;
	resize: vertical;
}

.asbb-form-error {
	background: #fdecea;
	border: 1px solid #e5a49e;
	color: #8f2b25;
	border-radius: 0.5rem;
	padding: 0.8rem 1rem;
}

/* -------------------------------- result --------------------------------- */

.asbb-result {
	background: #eef7f0;
	border: 1px solid #a9d3b6;
	border-radius: 0.5rem;
	padding: 1.5rem;
	margin: 1.5rem 0;
}

.asbb-result h3 {
	margin-top: 0;
	color: #1e6b3a;
}

/* ------------------------------ responsive ------------------------------- */

@media (min-width: 640px) {
	.asbb-form {
		grid-template-columns: 1fr 1fr;
	}

	.asbb-field-full {
		grid-column: 1 / -1;
	}
}

@media (max-width: 699px) {
	.asbb-map-hint {
		display: block;
	}
}
