/* ===========================================================================
   On-Site Parking Registration — MOBILE FIRST

   Everything down to the first @media is the phone stylesheet, because that is
   how every visitor actually arrives: a QR code on a sign at the barrier, a
   camera, one hand, a queue behind. There is no desktop layout being squeezed
   down here; there is a phone layout being widened at 640px and again at 1024px.

   Three deliberate phone choices, each of which fixes a real failure:
     - inputs are 16px, because iOS Safari zooms the whole page in when a focused
       input is smaller, and a zoomed page at a barrier is a stuck visitor;
     - controls are at least 48px tall, which is the smallest reliable thumb
       target;
     - the submit button is full width and stays at the end of a single column,
       so it can be reached without the hand leaving the phone.

   Colours come from the theme's own custom properties with literal fallbacks,
   so the Stage 3 repaint reaches this page without it being rewritten.
   =========================================================================== */

.idc-park {
	--park-gold: var(--gold, #D4AF37);
	--park-ink: var(--text, #F5F0E8);
	--park-muted: var(--muted, rgba(245, 240, 232, .66));
	--park-line: var(--border, rgba(212, 175, 55, .22));
	--park-panel: var(--bg-card, #14121c);
	--park-bad: #E5766F;
	--park-good: #6FD08C;

	padding: 0 0 56px;
	color: var(--park-ink);
}

.park-wrap {
	width: 100%;
	max-width: 560px;
	margin: 0 auto;
	padding: 0 16px;
}

/* ---------------------------------------------------------------- header -- */

.park-head {
	padding: 26px 0 22px;
	text-align: center;
	border-bottom: 1px solid var(--park-line);
}

.park-eyebrow {
	display: block;
	margin-bottom: 8px;
	color: var(--park-gold);
	font-size: .62rem;
	font-weight: 700;
	letter-spacing: .2em;
	text-transform: uppercase;
}

.park-title {
	margin: 0 0 8px;
	font-family: var(--font-heading, Georgia, serif);
	font-size: 1.75rem;
	line-height: 1.15;
	text-wrap: balance;
}

.park-sub {
	margin: 0 auto 14px;
	max-width: 40ch;
	color: var(--park-muted);
	font-size: .92rem;
	line-height: 1.55;
}

.park-date {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0 0 10px;
	color: var(--park-ink);
	font-size: .88rem;
	font-weight: 600;
}

.park-avail {
	display: inline-block;
	margin: 0;
	padding: 6px 14px;
	border: 1px solid var(--park-good);
	border-radius: 999px;
	color: var(--park-good);
	font-size: .78rem;
	font-weight: 700;
}

.park-avail.is-low {
	border-color: var(--park-bad);
	color: var(--park-bad);
}

.park-fee {
	font-weight: 600;
	opacity: .85;
}

/* ----------------------------------------------------------------- body --- */

.park-body { padding-top: 22px; }

.park-panel {
	margin: 0 0 18px;
	padding: 20px 16px;
	background: var(--park-panel);
	border: 1px solid var(--park-line);
	border-radius: 14px;
}

.park-panel h2 {
	margin: 0 0 12px;
	font-family: var(--font-heading, Georgia, serif);
	font-size: 1.15rem;
	line-height: 1.25;
}

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

.park-field { margin-bottom: 17px; }

.park-field > label,
.park-pay legend {
	display: block;
	margin-bottom: 6px;
	padding: 0;
	font-size: .82rem;
	font-weight: 700;
	letter-spacing: .02em;
}

.req { color: var(--park-gold); }

.park-field input[type="text"],
.park-field input[type="tel"],
.park-field select,
.park-other {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 12px 14px;
	background: rgba(255, 255, 255, .04);
	border: 1px solid var(--park-line);
	border-radius: 10px;
	color: var(--park-ink);
	/* 16px exactly: anything smaller makes iOS zoom the page on focus. */
	font-size: 16px;
	line-height: 1.3;
	appearance: none;
	-webkit-appearance: none;
}

.park-field select {
	background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
	                  linear-gradient(135deg, currentColor 50%, transparent 50%);
	background-position: calc(100% - 19px) 21px, calc(100% - 13px) 21px;
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
	padding-right: 40px;
}

/* The native dropdown list is drawn by the OS and does not inherit, so the
   options need their own colours or they render dark-on-dark. */
.park-field select option { background: #14121c; color: #F5F0E8; }

.park-field input:focus,
.park-field select:focus,
.park-other:focus {
	outline: 2px solid var(--park-gold);
	outline-offset: 1px;
	border-color: var(--park-gold);
}

.park-plate {
	text-transform: uppercase;
	letter-spacing: .09em;
	font-weight: 700;
}

.park-hint {
	margin: 6px 0 0;
	color: var(--park-muted);
	font-size: .76rem;
}

.park-other { margin-top: 9px; }

.park-err {
	margin: 6px 0 0;
	color: var(--park-bad);
	font-size: .78rem;
	min-height: 0;
}

.park-err:empty { display: none; }

.park-field.has-error input,
.park-field.has-error select { border-color: var(--park-bad); }

/* Honeypot: off-screen, not display:none — some bots skip hidden fields. */
.park-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* phone number, with a fixed country prefix */
.park-tel { display: flex; align-items: stretch; }

.park-tel-cc {
	display: flex;
	align-items: center;
	padding: 0 12px;
	background: rgba(255, 255, 255, .06);
	border: 1px solid var(--park-line);
	border-right: 0;
	border-radius: 10px 0 0 10px;
	color: var(--park-muted);
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
}

.park-tel input { border-radius: 0 10px 10px 0 !important; }

/* --------------------------------------------------------- payment cards -- */

.park-pay {
	margin: 0 0 18px;
	padding: 0;
	border: 0;
}

.park-pay-opt {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 56px;
	margin-bottom: 9px;
	padding: 12px 14px;
	border: 1px solid var(--park-line);
	border-radius: 12px;
	cursor: pointer;
}

.park-pay-opt input {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	accent-color: var(--park-gold);
}

.park-pay-txt { display: flex; flex-direction: column; gap: 1px; }
.park-pay-txt strong { font-size: .95rem; }
.park-pay-txt small { color: var(--park-muted); font-size: .78rem; }

.park-pay-opt:has(input:checked) {
	border-color: var(--park-gold);
	background: rgba(212, 175, 55, .08);
}

.park-pay-opt:focus-within { outline: 2px solid var(--park-gold); outline-offset: 2px; }

/* ---------------------------------------------------------------- button -- */

.park-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	min-height: 54px;
	padding: 15px 20px;
	border: 0;
	border-radius: 12px;
	background: var(--park-gold);
	color: #1a1508;
	font-size: 1rem;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

.park-btn--ghost {
	background: transparent;
	border: 1px solid var(--park-gold);
	color: var(--park-gold);
}

.park-btn[disabled],
.park-btn.is-busy { opacity: .6; cursor: progress; }

.park-privacy {
	margin: 0 0 16px;
	color: var(--park-muted);
	font-size: .76rem;
	line-height: 1.55;
}

.park-privacy a { color: var(--park-gold); }

.park-formerr {
	margin: 0 0 14px;
	padding: 11px 13px;
	background: rgba(229, 118, 111, .1);
	border: 1px solid var(--park-bad);
	border-radius: 10px;
	color: var(--park-bad);
	font-size: .85rem;
}

/* ----------------------------------------------------------- confirmation - */

.park-done { text-align: center; }

.park-done-tick {
	display: grid;
	place-items: center;
	width: 58px;
	height: 58px;
	margin: 0 auto 12px;
	border-radius: 50%;
	background: rgba(111, 208, 140, .14);
	color: var(--park-good);
}

.park-done-list {
	margin: 16px 0;
	padding: 0;
	text-align: left;
	border-top: 1px solid var(--park-line);
}

.park-done-list > div {
	display: flex;
	justify-content: space-between;
	gap: 14px;
	padding: 9px 0;
	border-bottom: 1px solid var(--park-line);
}

.park-done-list dt {
	color: var(--park-muted);
	font-size: .78rem;
	text-transform: uppercase;
	letter-spacing: .06em;
}

.park-done-list dd {
	margin: 0;
	font-size: .9rem;
	font-weight: 600;
	text-align: right;
}

.park-done-list dd[data-done="reference"] {
	font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
	letter-spacing: .06em;
	color: var(--park-gold);
}

.park-done-amount {
	margin: 0 0 6px;
	font-size: 1.15rem;
	font-weight: 700;
}

.park-done-note {
	margin: 0 0 16px;
	color: var(--park-muted);
	font-size: .84rem;
	line-height: 1.55;
}

.park-closed h2 { color: var(--park-gold); }
.park-closed p { color: var(--park-muted); margin-bottom: 16px; }

.park-info ul { margin: 0; padding-left: 19px; }
.park-info li { margin-bottom: 7px; color: var(--park-muted); font-size: .85rem; line-height: 1.5; }

@media (prefers-reduced-motion: reduce) {
	.idc-park * { transition: none !important; animation: none !important; }
}

/* ===========================================================================
   TABLET — 640px and up. The column gets wider and the pairs that genuinely
   belong side by side (brand with colour, the three payment cards) stop
   stacking. Nothing is rearranged; the phone order still reads top to bottom.
   =========================================================================== */

@media (min-width: 640px) {
	.park-wrap { max-width: 680px; padding: 0 24px; }
	.park-head { padding: 40px 0 30px; }
	.park-title { font-size: 2.15rem; }
	.park-panel { padding: 26px 24px; border-radius: 16px; }

	.park-row {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 0 16px;
	}

	.park-pay {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 10px;
	}

	.park-pay legend { grid-column: 1 / -1; }
	.park-pay .park-err { grid-column: 1 / -1; }

	.park-pay-opt {
		flex-direction: column;
		align-items: flex-start;
		justify-content: center;
		margin-bottom: 0;
		min-height: 88px;
	}

	.park-btn { width: auto; min-width: 260px; margin-inline: auto; }
}

/* ===========================================================================
   DESKTOP — 1024px and up. The important-information panel moves alongside the
   form instead of below it, because on a wide screen there is room to read both
   at once. The form itself keeps its comfortable measure rather than stretching
   across the window.
   =========================================================================== */

@media (min-width: 1024px) {
	.park-wrap { max-width: 1060px; }
	.park-head { padding: 52px 0 34px; }
	.park-title { font-size: 2.5rem; }

	.park-body {
		display: grid;
		grid-template-columns: minmax(0, 1.55fr) minmax(260px, .95fr);
		gap: 24px;
		align-items: start;
	}

	.park-form,
	.park-done,
	.park-closed { grid-column: 1; }

	.park-info {
		grid-column: 2;
		grid-row: 1;
		position: sticky;
		top: 96px;
	}
}


/* ---------------------------------------------------------------------------
   The Navadurga medallion.

   Nine portraits set around a coin. Each is placed by rotating it out to the
   rim and then counter-rotating it by the same angle, so it travels around the
   circle while staying upright — which is what keeps nine faces the right way
   up without nine sets of hand-written coordinates.

   --a is the only per-item value, written inline from PHP. Everything else is
   derived from --med-size, so one number resizes the whole disc.
   --------------------------------------------------------------------------- */
.idc-medallion {
	--med-size: 280px;
	--med-thumb: calc(var(--med-size) * .215);
	--med-radius: calc(var(--med-size) * .385);
	--med-gold: var(--gold, #D4AF37);

	position: relative;
	width: var(--med-size);
	height: var(--med-size);
	margin: 0 auto;
	flex: 0 0 auto;
}

/* The coin's edge: two rules, the way a struck coin has a rim inside its edge. */
.idc-medallion-rim {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	border: 1px solid color-mix(in srgb, var(--med-gold) 55%, transparent);
	box-shadow:
		inset 0 0 0 1px color-mix(in srgb, var(--med-gold) 16%, transparent),
		inset 0 0 calc(var(--med-size) * .09) color-mix(in srgb, var(--med-gold) 14%, transparent);
}

.idc-medallion-form {
	position: absolute;
	top: 50%;
	left: 50%;
	width: var(--med-thumb);
	height: var(--med-thumb);
	margin: calc(var(--med-thumb) / -2) 0 0 calc(var(--med-thumb) / -2);
	border-radius: 50%;
	overflow: hidden;
	border: 2px solid color-mix(in srgb, var(--med-gold) 62%, transparent);
	background: var(--bg-card, #14121c);
	box-shadow: 0 3px 10px -4px rgba(20, 14, 4, .6);
	transform:
		rotate(var(--a))
		translateY(calc(var(--med-radius) * -1))
		rotate(calc(var(--a) * -1));
	transition: border-color .25s ease;
}

.idc-medallion-form:hover { border-color: var(--med-gold); }

.idc-medallion-form img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
}

/* The struck centre. */
.idc-medallion-core {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	width: calc(var(--med-size) * .44);
	height: calc(var(--med-size) * .44);
	margin: calc(var(--med-size) * -.22) 0 0 calc(var(--med-size) * -.22);
	padding: 6px;
	border-radius: 50%;
	border: 1px solid color-mix(in srgb, var(--med-gold) 38%, transparent);
	background: radial-gradient(circle at 50% 38%,
		color-mix(in srgb, var(--med-gold) 14%, transparent),
		transparent 72%);
	text-align: center;
}

.idc-medallion-word {
	font-family: var(--font-heading, Georgia, serif);
	font-size: calc(var(--med-size) * .072);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: .04em;
	color: var(--med-gold);
}

.idc-medallion-caption {
	font-size: calc(var(--med-size) * .038);
	font-weight: 600;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: var(--muted, rgba(245, 240, 232, .6));
}

/* A phone gets a smaller coin, not a scrollbar. */
@media (max-width: 520px) {
	.idc-medallion { --med-size: 220px; }
}

/* The medallion sits above the wordmark on the parking header. */
.park-head .idc-medallion { margin-bottom: 16px; }


/* ---------------------------------------------------------------------------
   Navadurga strip — round portraits in a straight row.

   The cells were a 3:4 crop in a rounded rectangle. A circle is what reads as a
   set of portrait medals rather than a contact sheet, and object-position sits
   the crop near the top of the frame because these are portraits: centre a 3:4
   image in a circle and the circle takes the chest, not the face.
   --------------------------------------------------------------------------- */
.navadurga-strip {
	display: grid;
	grid-template-columns: repeat(9, 1fr);
	gap: 10px;
	margin: 8px 0;
	align-items: start;
}

.navadurga-cell { margin: 0; text-align: center; }

.navadurga-img {
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	overflow: hidden;
	border: 2px solid color-mix(in srgb, var(--gold, #D4AF37) 55%, transparent);
	background: var(--bg-card, #14121c);
	box-shadow: 0 4px 14px -8px rgba(20, 14, 4, .7);
	transition: border-color .25s ease;
}

.navadurga-cell:hover .navadurga-img { border-color: var(--gold, #D4AF37); }

.navadurga-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 18%;
	display: block;
	transition: transform .5s ease;
}

.navadurga-cell:hover .navadurga-img img { transform: scale(1.06); }

.navadurga-name {
	margin-top: 9px;
	font-family: var(--font-heading, Georgia, serif);
	color: var(--gold, #D4AF37);
	font-size: .8rem;
	letter-spacing: .02em;
	line-height: 1.25;
}

@media (max-width: 1100px) {
	.navadurga-strip { gap: 7px; }
	.navadurga-name { font-size: .68rem; }
}

/* ---- Phone: one at a time, cross-fading ---- */
@media (max-width: 768px) {
	.navadurga-strip {
		display: block;
		position: relative;
		height: 268px;
	}

	.navadurga-cell {
		position: absolute;
		inset: 0;
		margin: 0;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 14px;
		opacity: 0;
		transition: opacity .7s ease;
		pointer-events: none;
	}

	.navadurga-cell.is-active { opacity: 1; pointer-events: auto; }

	.navadurga-img { width: 190px; height: 190px; aspect-ratio: 1 / 1; }
	.navadurga-name { margin-top: 0; font-size: 1.05rem; }
}

/*
 * Asked for less motion: the cycler stops advancing, so show all nine as a
 * static wrap rather than leaving one frame frozen and eight invisible.
 */
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
	.navadurga-strip {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		height: auto;
		gap: 12px;
	}

	.navadurga-cell { position: static; opacity: 1; pointer-events: auto; gap: 8px; }
	.navadurga-img { width: 100%; height: auto; }
	.navadurga-name { font-size: .75rem; }
}
