/* Harkomal's Tiffin — ordering form
   Palette matches the site: ivory, deep green, gold, serif headings. */

.ht-order {
	--ht-ivory: #fbf7ef;
	--ht-card: #ffffff;
	--ht-green: #1f4034;
	--ht-green-dark: #143026;
	--ht-gold: #c9a24a;
	--ht-ink: #23201b;
	--ht-muted: #6d6457;
	--ht-line: #e7dfd0;
	--ht-serif: Georgia, "Times New Roman", serif;

	max-width: 780px;
	margin: 0 auto;
	color: var(--ht-ink);
	font-size: 16px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

.ht-order *,
.ht-order *::before,
.ht-order *::after {
	box-sizing: border-box;
}

.ht-order__form {
	background: var(--ht-card);
	border: 1px solid var(--ht-line);
	border-radius: 18px;
	padding: 34px 32px 0;
	box-shadow: 0 18px 44px -28px rgba(31, 64, 52, 0.4);
	overflow: hidden;
}

/* Header ------------------------------------------------------------- */

.ht-order__header {
	text-align: center;
	padding-bottom: 6px;
}

.ht-order__eyebrow {
	margin: 0 0 8px;
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ht-gold);
	font-weight: 700;
}

.ht-order__title {
	font-family: var(--ht-serif);
	font-size: clamp(27px, 4.6vw, 36px);
	line-height: 1.15;
	margin: 0 0 10px;
	color: var(--ht-green);
	font-weight: 400;
}

.ht-order__lede {
	margin: 0 auto;
	max-width: 46ch;
	color: var(--ht-muted);
	font-size: 15px;
}

/* Step rail ---------------------------------------------------------- */

.ht-order__steps {
	display: flex;
	gap: 4px;
	list-style: none;
	margin: 26px -4px 4px;
	padding: 0 0 20px;
	border-bottom: 1px solid var(--ht-line);
	overflow-x: auto;
	scrollbar-width: none;
}

.ht-order__steps::-webkit-scrollbar {
	display: none;
}

.ht-order__steps li {
	display: flex;
	align-items: center;
	gap: 7px;
	flex: 0 0 auto;
	padding: 0 8px;
	font-size: 12px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ht-muted);
	opacity: 0.55;
	transition: opacity 0.2s ease;
}

.ht-order__steps li span {
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--ht-ivory);
	border: 1px solid var(--ht-line);
	font-size: 11px;
	font-weight: 700;
	color: var(--ht-muted);
}

.ht-order__steps li.is-active {
	opacity: 1;
	color: var(--ht-green);
	font-weight: 700;
}

.ht-order__steps li.is-active span {
	background: var(--ht-green);
	border-color: var(--ht-green);
	color: #fff;
}

.ht-order__steps li.is-done {
	opacity: 1;
}

.ht-order__steps li.is-done span {
	background: var(--ht-gold);
	border-color: var(--ht-gold);
	color: #fff;
}

/* Steps -------------------------------------------------------------- */

.ht-step {
	display: none;
	padding: 28px 0 24px;
	animation: ht-fade 0.28s ease both;
}

.ht-step.is-active {
	display: block;
}

@keyframes ht-fade {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ht-step {
		animation: none;
	}
}

.ht-step__q {
	font-family: var(--ht-serif);
	font-size: clamp(20px, 3vw, 25px);
	line-height: 1.3;
	font-weight: 400;
	color: var(--ht-green);
	margin: 0 0 6px;
}

.ht-step__hint {
	margin: 0 0 20px;
	font-size: 14px;
	color: var(--ht-muted);
}

.ht-step__hint--green {
	color: var(--ht-green);
	font-weight: 600;
}

/* Tiffin type cards -------------------------------------------------- */

.ht-cards {
	display: grid;
	gap: 14px;
	margin-top: 20px;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.ht-card {
	position: relative;
	cursor: pointer;
}

.ht-card input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.ht-card__body {
	display: block;
	height: 100%;
	padding: 22px 20px;
	background: var(--ht-ivory);
	border: 1.5px solid var(--ht-line);
	border-radius: 14px;
	transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.ht-card:hover .ht-card__body {
	border-color: var(--ht-gold);
}

.ht-card input:checked + .ht-card__body {
	border-color: var(--ht-green);
	background: #f3f7f4;
	box-shadow: inset 0 0 0 1px var(--ht-green);
}

.ht-card input:focus-visible + .ht-card__body {
	outline: 2px solid var(--ht-gold);
	outline-offset: 2px;
}

.ht-card__flag {
	display: inline-block;
	margin-bottom: 8px;
	padding: 2px 9px;
	border-radius: 999px;
	background: var(--ht-green);
	color: #fff;
	font-size: 10px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-weight: 700;
}

.ht-card__name {
	display: block;
	font-family: var(--ht-serif);
	font-size: 20px;
	color: var(--ht-green);
	margin-bottom: 6px;
}

.ht-card__desc {
	display: block;
	font-size: 14px;
	color: var(--ht-muted);
	margin-bottom: 12px;
}

.ht-card__price {
	display: block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.03em;
	color: var(--ht-gold);
	text-transform: uppercase;
}

/* Chips -------------------------------------------------------------- */

.ht-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ht-chip {
	cursor: pointer;
	position: relative;
}

.ht-chip input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}

.ht-chip > span {
	display: grid;
	place-items: center;
	min-width: 60px;
	padding: 13px 16px;
	background: var(--ht-ivory);
	border: 1.5px solid var(--ht-line);
	border-radius: 11px;
	font-weight: 600;
	font-size: 16px;
	color: var(--ht-ink);
	transition: all 0.16s ease;
}

.ht-chip:hover > span {
	border-color: var(--ht-gold);
}

.ht-chip input:checked + span {
	background: var(--ht-green);
	border-color: var(--ht-green);
	color: #fff;
}

.ht-chip input:focus-visible + span {
	outline: 2px solid var(--ht-gold);
	outline-offset: 2px;
}

.ht-chip--wide > span {
	min-width: 140px;
	justify-items: start;
	text-align: left;
}

.ht-chip > span em {
	display: block;
	font-style: normal;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ht-muted);
	margin-top: 3px;
}

.ht-chip input:checked + span em {
	color: rgba(255, 255, 255, 0.75);
}

/* Fields ------------------------------------------------------------- */

.ht-fields {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	margin-top: 20px;
}

.ht-field {
	display: block;
}

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

.ht-field__label {
	display: block;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--ht-muted);
	margin-bottom: 7px;
}

.ht-field__label b {
	color: var(--ht-gold);
}

.ht-order input[type="text"],
.ht-order input[type="tel"],
.ht-order input[type="email"],
.ht-order input[type="date"],
.ht-order select,
.ht-order textarea {
	width: 100%;
	padding: 12px 14px;
	font-size: 16px;
	font-family: inherit;
	color: var(--ht-ink);
	background: var(--ht-ivory);
	border: 1.5px solid var(--ht-line);
	border-radius: 10px;
	transition: border-color 0.16s ease, background 0.16s ease;
}

.ht-order textarea {
	resize: vertical;
}

.ht-order input:focus,
.ht-order select:focus,
.ht-order textarea:focus {
	outline: none;
	background: #fff;
	border-color: var(--ht-green);
}

.ht-order .ht-invalid {
	border-color: #c0392b;
	background: #fdf4f3;
}

.ht-order__finefine {
	margin: 20px 0 0;
	font-size: 13px;
	color: var(--ht-muted);
}

.ht-order__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.ht-order__error {
	margin: 0 0 14px;
	padding: 12px 15px;
	border-radius: 10px;
	background: #fdf4f3;
	border: 1px solid #e8c4bf;
	color: #96251c;
	font-size: 14px;
}

/* Sticky bar --------------------------------------------------------- */

.ht-order__bar {
	position: sticky;
	bottom: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: center;
	justify-content: space-between;
	margin: 0 -32px;
	padding: 18px 32px;
	background: var(--ht-green);
	color: #fff;
}

.ht-order__summary {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-wrap: wrap;
}

.ht-order__summary-label {
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.66);
}

.ht-order__total {
	font-family: var(--ht-serif);
	font-size: 29px;
	line-height: 1;
	color: #fff;
}

.ht-order__total::after {
	content: " /mo";
	font-size: 13px;
	font-family: inherit;
	color: rgba(255, 255, 255, 0.66);
}

.ht-order__breakdown-toggle {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-size: 12px;
	color: var(--ht-gold);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.ht-order__actions {
	display: flex;
	gap: 10px;
	margin-left: auto;
}

.ht-btn {
	appearance: none;
	font: inherit;
	font-weight: 700;
	font-size: 15px;
	padding: 13px 26px;
	border-radius: 999px;
	border: 1.5px solid transparent;
	cursor: pointer;
	transition: all 0.16s ease;
}

.ht-btn--primary {
	background: var(--ht-gold);
	color: var(--ht-green-dark);
}

.ht-btn--primary:hover {
	background: #d9b55f;
}

.ht-btn--ghost {
	background: transparent;
	border-color: rgba(255, 255, 255, 0.4);
	color: #fff;
}

.ht-btn--ghost:hover {
	border-color: #fff;
}

.ht-btn:disabled {
	opacity: 0.6;
	cursor: progress;
}

.ht-btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* Breakdown ---------------------------------------------------------- */

.ht-order__breakdown {
	list-style: none;
	margin: 0 -32px;
	padding: 16px 32px;
	background: var(--ht-green-dark);
	color: rgba(255, 255, 255, 0.86);
	font-size: 14px;
}

.ht-order__breakdown li {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 5px 0;
}

.ht-order__breakdown li.is-total {
	margin-top: 6px;
	padding-top: 11px;
	border-top: 1px solid rgba(255, 255, 255, 0.2);
	font-weight: 700;
	color: #fff;
}

/* Confirmation ------------------------------------------------------- */

.ht-order__done {
	background: var(--ht-card);
	border: 1px solid var(--ht-line);
	border-radius: 18px;
	padding: 48px 32px;
	text-align: center;
	box-shadow: 0 18px 44px -28px rgba(31, 64, 52, 0.4);
}

.ht-order__done-mark {
	width: 58px;
	height: 58px;
	margin: 0 auto 18px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: #e6efe9;
	color: var(--ht-green);
	font-size: 27px;
}

.ht-order__done h2 {
	font-family: var(--ht-serif);
	font-weight: 400;
	font-size: 30px;
	color: var(--ht-green);
	margin: 0 0 10px;
}

.ht-order__done p {
	margin: 0 auto;
	max-width: 44ch;
	color: var(--ht-muted);
}

.ht-order__receipt {
	display: grid;
	grid-template-columns: auto auto;
	gap: 8px 20px;
	justify-content: center;
	margin: 26px auto 0;
	padding-top: 22px;
	border-top: 1px solid var(--ht-line);
	font-size: 14px;
	text-align: left;
}

.ht-order__receipt dt {
	color: var(--ht-muted);
}

.ht-order__receipt dd {
	margin: 0;
	font-weight: 700;
}

/* Small screens ------------------------------------------------------ */

@media (max-width: 600px) {
	.ht-order__form {
		padding: 26px 20px 0;
		border-radius: 14px;
	}

	.ht-order__bar,
	.ht-order__breakdown {
		margin: 0 -20px;
		padding-left: 20px;
		padding-right: 20px;
	}

	.ht-order__bar {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
	}

	.ht-order__actions {
		margin-left: 0;
	}

	.ht-btn {
		flex: 1;
		padding: 14px 18px;
	}

	.ht-order__steps li {
		font-size: 0;
		gap: 0;
		padding: 0 5px;
	}

	.ht-order__steps li span {
		font-size: 11px;
	}
}
