/**
 * eGate Booking — front-end form styles.
 * Self-contained; the accent colour is injected as --egb on the .egb wrapper.
 */

.egb {
	--egb: #79873a;
	--egb-ink: #23271a;
	--egb-muted: #6b7358;
	--egb-line: #e7e9dd;
	--egb-wash: #f6f8ee;
	--egb-radius: 16px;
	--egb-shadow: 0 12px 34px rgba(0, 0, 0, .07);
	max-width: 960px;
	margin: 0 auto;
	color: var(--egb-ink);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}
.egb *,
.egb *::before,
.egb *::after { box-sizing: border-box; }

/* ---- Progress -------------------------------------------------------- */
.egb-progress {
	display: flex;
	list-style: none;
	margin: 0 0 26px;
	padding: 0;
	counter-reset: egb;
	gap: 6px;
}
.egb-progress__item {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 7px;
	position: relative;
	color: var(--egb-muted);
	font-size: 13px;
	font-weight: 600;
	text-align: center;
}
.egb-progress__item::before {
	content: "";
	position: absolute;
	top: 15px;
	left: -50%;
	width: 100%;
	height: 2px;
	background: var(--egb-line);
	z-index: 0;
}
.egb-progress__item:first-child::before { display: none; }
.egb-progress__num {
	position: relative;
	z-index: 1;
	width: 32px;
	height: 32px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--egb-line);
	font-weight: 800;
	transition: all .25s ease;
}
.egb-progress__item.is-active .egb-progress__num,
.egb-progress__item.is-done .egb-progress__num {
	background: var(--egb);
	border-color: var(--egb);
	color: #fff;
}
.egb-progress__item.is-active { color: var(--egb-ink); }
.egb-progress__label { display: none; }
@media (min-width: 620px) { .egb-progress__label { display: block; } }

/* ---- Steps ----------------------------------------------------------- */
.egb-step { display: none; animation: egbFade .35s ease; }
.egb-step.is-active { display: block; }
@keyframes egbFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.egb-step__title { font-size: 20px; font-weight: 800; margin: 0 0 16px; }

/* ---- Category chips -------------------------------------------------- */
.egb-cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.egb-cat {
	border: 1px solid var(--egb-line);
	background: #fff;
	color: var(--egb-muted);
	padding: 8px 16px;
	border-radius: 999px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all .2s ease;
}
.egb-cat:hover { border-color: var(--egb); color: var(--egb-ink); }
.egb-cat.is-active { background: var(--egb); border-color: var(--egb); color: #fff; }

/* ---- Service cards --------------------------------------------------- */
.egb-services { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 620px) { .egb-services { grid-template-columns: 1fr 1fr; } }
.egb-service {
	display: flex;
	align-items: center;
	gap: 14px;
	text-align: left;
	padding: 14px;
	border: 1px solid var(--egb-line);
	border-radius: var(--egb-radius);
	background: #fff;
	cursor: pointer;
	font: inherit;
	color: inherit;
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.egb-service:hover { border-color: color-mix(in srgb, var(--egb) 55%, #fff); box-shadow: var(--egb-shadow); transform: translateY(-2px); }
.egb-service.is-selected { border-color: var(--egb); box-shadow: 0 0 0 2px color-mix(in srgb, var(--egb) 30%, transparent) inset; }
.egb-service__img {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	border-radius: 12px;
	background: var(--egb-wash) center/cover no-repeat;
	display: grid;
	place-items: center;
	color: var(--egb);
}
.egb-service__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.egb-service__name { font-weight: 700; }
.egb-service__desc { font-size: 13px; color: var(--egb-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.egb-service__meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--egb-muted); margin-top: 2px; }
.egb-service__dur { display: inline-flex; align-items: center; gap: 4px; }
.egb-service__price { font-weight: 800; color: var(--egb); }
.egb-service__pick {
	flex: 0 0 auto;
	width: 30px; height: 30px;
	border-radius: 50%;
	display: grid; place-items: center;
	background: var(--egb-wash);
	color: var(--egb);
	transition: all .2s ease;
}
.egb-service.is-selected .egb-service__pick { background: var(--egb); color: #fff; }
.egb-service__pick .egb-pick-check { display: none; }
.egb-service.is-selected .egb-service__pick .egb-pick-plus { display: none; }
.egb-service.is-selected .egb-service__pick .egb-pick-check { display: inline-flex; }

/* ---- Floating cart + popup ------------------------------------------- */
/* The display rules below would otherwise override the [hidden] attribute,
   leaving the cart + popup permanently visible — keep [hidden] authoritative. */
.egb-cart[hidden],
.egb-cart-pop[hidden] { display: none !important; }

.egb-cart {
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 40;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: 0;
	cursor: pointer;
	color: #fff;
	background: linear-gradient(135deg, var(--egb), color-mix(in srgb, var(--egb) 78%, #000));
	box-shadow: 0 14px 34px color-mix(in srgb, var(--egb) 45%, transparent);
	display: grid;
	place-items: center;
	animation: egbCartPop .3s ease;
}
@keyframes egbCartPop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.egb-cart:hover { transform: translateY(-2px); }
.egb-cart__badge {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: #fff;
	color: var(--egb-ink);
	font-size: 12px;
	font-weight: 800;
	display: grid;
	place-items: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}
.egb-cart-pop {
	position: fixed;
	inset: 0;
	z-index: 50;
	background: rgba(20, 22, 15, .5);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 0;
}
@media (min-width: 620px) { .egb-cart-pop { align-items: center; padding: 20px; } }
.egb-cart-pop__box {
	width: 100%;
	max-width: 460px;
	background: #fff;
	border-radius: 20px 20px 0 0;
	padding: 22px;
	max-height: 82vh;
	overflow: auto;
	animation: egbSheet .3s ease;
}
@media (min-width: 620px) { .egb-cart-pop__box { border-radius: 20px; } }
@keyframes egbSheet { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.egb-cart-pop__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; font-size: 17px; }
.egb-cart-pop__x { border: 0; background: none; cursor: pointer; color: var(--egb-muted); padding: 4px; }
.egb-cart-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--egb-line); }
.egb-cart-row__name { flex: 1 1 auto; font-weight: 600; }
.egb-cart-row__price { color: var(--egb); font-weight: 700; }
.egb-cart-row__x { border: 0; background: var(--egb-wash); color: var(--egb-muted); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 18px; line-height: 1; }
.egb-cart-row__x:hover { background: #fdecea; color: #b3261e; }
.egb-cart-pop__foot { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 16px; font-weight: 700; }
.egb-cart-pop__total { font-size: 20px; color: var(--egb); font-weight: 800; }

/* ---- Extras ---------------------------------------------------------- */
.egb-extras { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--egb-line); }
.egb-extras__title { font-size: 16px; font-weight: 800; margin: 0 0 12px; }
.egb-extras__list { display: grid; gap: 10px; }
.egb-extra {
	display: flex; align-items: center; gap: 12px;
	padding: 12px 14px;
	border: 1px solid var(--egb-line);
	border-radius: 12px;
	background: #fff;
}
.egb-extra.is-on { border-color: var(--egb); background: var(--egb-wash); }
.egb-extra__check { width: 20px; height: 20px; accent-color: var(--egb); }
.egb-extra__name { flex: 1 1 auto; font-weight: 600; }
.egb-extra__price { font-weight: 700; color: var(--egb); }
.egb-extra__qty { display: flex; align-items: center; gap: 6px; }
.egb-extra__qty button { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--egb-line); background: #fff; cursor: pointer; font-weight: 800; color: var(--egb); }
.egb-extra__qty span { min-width: 20px; text-align: center; font-weight: 700; }

/* ---- Agents ---------------------------------------------------------- */
.egb-agents { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 620px) { .egb-agents { grid-template-columns: repeat(3, 1fr); } }
.egb-agent {
	display: flex; flex-direction: column; align-items: center; gap: 10px;
	padding: 18px 14px;
	border: 1px solid var(--egb-line);
	border-radius: var(--egb-radius);
	background: #fff;
	cursor: pointer;
	text-align: center;
	transition: all .2s ease;
}
.egb-agent:hover { border-color: color-mix(in srgb, var(--egb) 55%, #fff); box-shadow: var(--egb-shadow); }
.egb-agent.is-selected { border-color: var(--egb); box-shadow: 0 0 0 2px color-mix(in srgb, var(--egb) 30%, transparent) inset; }
.egb-agent__avatar {
	width: 66px; height: 66px; border-radius: 50%;
	background: var(--egb-wash) center/cover no-repeat;
	display: grid; place-items: center;
	font-size: 24px; font-weight: 800; color: var(--egb);
}
.egb-agent__name { font-weight: 700; }
.egb-agent__bio { font-size: 13px; color: var(--egb-muted); }

/* ---- Calendar + slots ------------------------------------------------ */
.egb-dt { display: grid; grid-template-columns: 1fr; gap: 18px; min-width: 0; }
@media (min-width: 720px) { .egb-dt { grid-template-columns: 1.15fr 1fr; } }
/* Let grid tracks + cells shrink on narrow phones instead of forcing the whole
   datetime column wider than the screen (7 aspect-ratio day cells otherwise set a
   ~375px min-content floor that overflows and gets clipped). */
.egb-dt > *, .egb-cal__grid, .egb-slots__list { min-width: 0; }
.egb-cal { border: 1px solid var(--egb-line); border-radius: var(--egb-radius); padding: 16px; background: #fff; }
.egb-cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.egb-cal__title { font-weight: 800; text-transform: capitalize; }
.egb-cal__nav { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--egb-line); background: #fff; cursor: pointer; color: var(--egb); display: grid; place-items: center; }
.egb-cal__nav:hover { background: var(--egb-wash); }
.egb-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.egb-cal__dow { text-align: center; font-size: 12px; font-weight: 700; color: var(--egb-muted); padding: 4px 0; }
.egb-day {
	aspect-ratio: 1 / 1;
	min-width: 0;
	border: 0; background: transparent;
	border-radius: 10px;
	font: inherit; font-weight: 600;
	cursor: pointer;
	color: var(--egb-ink);
	position: relative;
}
.egb-day--empty { pointer-events: none; }
.egb-day--available:hover { background: var(--egb-wash); }
.egb-day--available::after { content: ""; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%; background: var(--egb); }
.egb-day--past, .egb-day--closed, .egb-day--full, .egb-day--leave { color: #c3c6b8; cursor: not-allowed; }
.egb-day--leave { text-decoration: line-through; }
.egb-day.is-selected { background: var(--egb); color: #fff; }
.egb-day.is-selected::after { background: #fff; }

.egb-slots__label { font-weight: 700; margin-bottom: 10px; }
.egb-slots__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.egb-slot {
	padding: 10px 6px; text-align: center;
	border: 1px solid var(--egb-line); border-radius: 10px;
	background: #fff; cursor: pointer; font: inherit; font-weight: 600;
	transition: all .15s ease;
}
.egb-slot:hover { border-color: var(--egb); color: var(--egb); }
.egb-slot.is-selected { background: var(--egb); border-color: var(--egb); color: #fff; }
.egb-hint { color: var(--egb-muted); font-size: 14px; }

/* ---- Details form ---------------------------------------------------- */
.egb-details { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 720px) { .egb-details { grid-template-columns: 1.4fr 1fr; } }
.egb-fields { display: grid; gap: 14px; align-content: start; }
.egb-field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.egb-field input,
.egb-field textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--egb-line);
	border-radius: 10px;
	font: inherit;
	background: #fff;
	color: var(--egb-ink);
	transition: border-color .2s ease, box-shadow .2s ease;
}
.egb-field input:focus,
.egb-field textarea:focus { outline: 0; border-color: var(--egb); box-shadow: 0 0 0 3px color-mix(in srgb, var(--egb) 16%, transparent); }
.egb-field input.egb-invalid,
.egb-field textarea.egb-invalid { border-color: #d9534f; }
.egb-pay { display: flex; flex-wrap: wrap; gap: 10px; }
.egb-pay__opt { flex: 1 1 auto; }
.egb-pay__opt input { position: absolute; opacity: 0; }
.egb-pay__opt span {
	display: flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px; border: 1px solid var(--egb-line); border-radius: 10px;
	font-weight: 600; cursor: pointer; transition: all .2s ease;
}
.egb-pay__opt input:checked + span { border-color: var(--egb); background: var(--egb-wash); color: var(--egb); }

/* ---- Summary --------------------------------------------------------- */
.egb-summary { background: var(--egb-wash); border: 1px solid var(--egb-line); border-radius: var(--egb-radius); padding: 18px; align-self: start; }
.egb-summary__title { font-weight: 800; text-transform: uppercase; letter-spacing: .5px; font-size: 12px; color: var(--egb); margin-bottom: 12px; }
.egb-summary__rows { margin: 0 0 12px; }
.egb-summary__rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 14px; }
.egb-summary__rows dt { color: var(--egb-muted); }
.egb-summary__rows dd { margin: 0; font-weight: 600; text-align: right; }
.egb-summary__total { display: flex; justify-content: space-between; align-items: baseline; border-top: 2px solid color-mix(in srgb, var(--egb) 35%, transparent); padding-top: 12px; margin-top: 8px; }
.egb-summary__amount { font-size: 20px; font-weight: 800; color: var(--egb); }
.egb-summary__vat { font-size: 12px; color: var(--egb-muted); margin: 6px 0 0; }

/* ---- Confirmation ---------------------------------------------------- */
.egb-confirm__inner { text-align: center; max-width: 520px; margin: 0 auto; padding: 10px 0; }
.egb-confirm__badge { width: 66px; height: 66px; border-radius: 50%; background: var(--egb); color: #fff; display: grid; place-items: center; margin: 0 auto 16px; box-shadow: 0 10px 26px color-mix(in srgb, var(--egb) 45%, transparent); }
.egb-confirm__title { font-size: 24px; font-weight: 800; margin: 0 0 6px; }
.egb-confirm__lead { color: var(--egb-muted); margin: 0 0 18px; }
.egb-confirm__key { display: inline-flex; align-items: center; gap: 8px; background: var(--egb-wash); border-radius: 999px; padding: 8px 18px; margin-bottom: 18px; }
.egb-confirm__key span { color: var(--egb-muted); font-size: 13px; }
.egb-confirm__key strong { color: var(--egb); letter-spacing: 1px; }
.egb-confirm__rows { text-align: left; border: 1px solid var(--egb-line); border-radius: var(--egb-radius); padding: 10px 18px; margin: 0 0 18px; }
.egb-confirm__rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--egb-line); }
.egb-confirm__rows > div:last-child { border-bottom: 0; }
.egb-confirm__rows dt { color: var(--egb-muted); margin: 0; }
.egb-confirm__rows dd { margin: 0; font-weight: 700; text-align: right; }
.egb-confirm__total dd { color: var(--egb); font-size: 18px; }
.egb-confirm__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---- Nav / buttons --------------------------------------------------- */
.egb-nav { display: flex; align-items: center; gap: 12px; margin-top: 26px; }
.egb-nav__spacer { flex: 1 1 auto; }
.egb-btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 13px 26px; border-radius: 999px; border: 0;
	font: inherit; font-weight: 700; cursor: pointer;
	text-decoration: none;
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
}
.egb-btn--primary { background: var(--egb); color: #fff; box-shadow: 0 10px 24px color-mix(in srgb, var(--egb) 32%, transparent); }
.egb-btn--primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 32px color-mix(in srgb, var(--egb) 42%, transparent); }
.egb-btn--primary:disabled { opacity: .45; cursor: not-allowed; }
.egb-btn--ghost { background: #fff; border: 1px solid var(--egb-line); color: var(--egb); }
.egb-btn--ghost:hover { background: var(--egb-wash); border-color: var(--egb); }

/* Keep the [hidden] attribute authoritative over the button display rules. */
.egb-btn[hidden], .egb-nav[hidden] { display: none !important; }

.egb-error { margin-top: 16px; padding: 12px 16px; border-radius: 10px; background: #fdecea; color: #b3261e; border: 1px solid #f5c6c2; font-size: 14px; }
.egb-empty { padding: 40px; text-align: center; color: #6b7358; background: #f6f8ee; border-radius: 16px; }

.egb-loading { position: relative; min-height: 90px; }
.egb-loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 30px; height: 30px; border: 3px solid var(--egb-line); border-top-color: var(--egb); border-radius: 50%; animation: egbSpin .8s linear infinite; }
@keyframes egbSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
	.egb-step, .egb-btn, .egb-service, .egb-agent { animation: none !important; transition: none !important; }
}
