/* ==========================================================================
   components.css: reusable pieces (buttons, etc.)
   ========================================================================== */

/* ---------- Buttons: Figma "Button" component, 4 variants ----------
   Size: 52px high, padding 16/24, radius 10, 2px border.
   Label: DM Sans Bold 13/16, +2% spacing, uppercase.
   Hover/press motion comes from the prototype (Figma has no hover states). */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 52px;
	padding: 16px 24px;
	border: 2px solid var(--color-navy);
	border-radius: var(--radius-10);
	font-family: var(--font-body);
	font-size: 13px;
	font-weight: 700;
	line-height: 16px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	transition: transform 150ms var(--ease-out);
}

.btn:hover {
	transform: translateY(-2px);
}

.btn:active {
	transform: translateY(0) scale(0.97);
	transition-duration: 80ms;
}

.btn--primary {
	background: var(--color-blue);
	color: var(--color-white);
}

.btn--yellow {
	background: var(--color-yellow);
	color: var(--color-navy);
}

.btn--outline-white {
	background: transparent;
	border-color: var(--color-white);
	color: var(--color-white);
}

.btn--outline-dark {
	background: transparent;
	color: var(--color-navy);
}

.btn--block {
	width: 100%;
}


/* ---------- Section heading ----------
   Figma: Lilita One 56/60, words 14px apart, centered. */
.title {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	column-gap: 14px;
	margin: 0;
	font-family: var(--font-display);
	font-size: 56px;
	font-weight: 400;
	line-height: 60px;
	letter-spacing: 0.01em;
	text-align: center;
	color: var(--color-navy);
}

.title--left {
	display: block;
	text-align: left;
}

/* ---------- Eyebrow label ----------
   Figma: yellow, radius 6, padding 4/12, DM Sans Bold 12/16 uppercase. */
.eyebrow {
	display: inline-flex;
	align-self: center;
	padding: 4px 12px;
	background: var(--color-yellow);
	color: var(--color-navy);
	border-radius: var(--radius-6);
	font-size: 12px;
	font-weight: 700;
	line-height: 16px;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

/* ---------- Pill badges ----------
   Figma: radius 99, padding 6/14, DM Sans Bold 13/16. */
.pill {
	display: inline-flex;
	padding: 6px 14px;
	background: var(--color-yellow);
	color: var(--color-navy);
	border-radius: var(--radius-pill);
	font-size: 13px;
	font-weight: 700;
	line-height: 16px;
	letter-spacing: 0.02em;
}

.pill--blue { background: var(--color-blue); color: var(--color-white); }
.pill--navy { background: var(--color-navy); color: var(--color-white); }

/* ---------- Form fields ----------
   Figma: 56 high, white, 2px navy border, radius 10, padding 13/14, DM Sans 16/26. */
.field {
	display: block;
	width: 100%;
	height: 56px;
	padding: 13px 14px;
	background: var(--color-white);
	color: var(--color-navy);
	border: var(--border);
	border-radius: var(--radius-10);
	font-size: 16px;
	line-height: 26px;
	-webkit-appearance: none;
	appearance: none;
}

.field::placeholder {
	color: var(--color-muted);
	opacity: 1;
}

.field:focus {
	outline: none;
	box-shadow: 0 0 0 3px var(--color-yellow);
}

textarea.field {
	height: 120px;
	resize: vertical;
}

/* Select with the Figma "▾" arrow. */
.field--select,
select.field {
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%230b1a5c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	cursor: pointer;
}

/* Date fields: placeholder color until a date is chosen. */
input[type="date"].field:invalid {
	color: var(--color-muted);
}

.field--small {
	height: 40px;
	padding: 7px 36px 7px 12px;
	font-size: 14px;
	line-height: 22px;
}

/* Two fields side by side, 12px apart (Figma form rows). */
.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.form-stack {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* White form card. Figma: padding 24, radius 22, 2px navy border. */
.form-card {
	padding: 24px;
	background: var(--color-white);
	border: var(--border);
	border-radius: var(--radius-22);
}

/* ---------- Contact Form 7 ---------- */

/* CF7 puts its hidden fields in a <fieldset>; without this its default border shows as a small box. */
.wpcf7 .hidden-fields-container {
	display: none;
}

.wpcf7-form-control-wrap {
	display: block;
}

.wpcf7-not-valid.field {
	border-color: #c0392b;
}

.wpcf7-not-valid-tip {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	line-height: 16px;
	color: #c0392b;
}

.section--navy .wpcf7-not-valid-tip {
	color: var(--color-yellow);
}

.wpcf7-response-output {
	margin: 12px 0 0;
	padding: 12px 14px;
	border: var(--border);
	border-radius: var(--radius-10);
	background: var(--color-tint);
	color: var(--color-navy);
	font-size: 14px;
	line-height: 20px;
}

.wpcf7-response-output:empty {
	display: none;
}

.wpcf7 form.sent .wpcf7-response-output {
	background: var(--color-yellow);
}

.wpcf7-spinner {
	display: none;
}

.wpcf7 form.submitting [type="submit"] {
	opacity: 0.7;
	pointer-events: none;
}

.form-setup-hint {
	padding: 12px 14px;
	border: 2px dashed currentColor;
	border-radius: var(--radius-10);
	font-size: 14px;
}

/* ---------- Alert (restaurant closed) ----------
   Figma: yellow, 2px navy border, radius 14, shadow 3/3, padding 14/18, gap 12. */
.alert {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	column-gap: 12px;
	padding: 14px 18px;
	background: var(--color-yellow);
	color: var(--color-navy);
	border: var(--border);
	border-radius: var(--radius-14);
	box-shadow: var(--shadow-sm);
	text-align: left;
}

.alert[hidden] {
	display: none;
}

.alert__title {
	font-family: var(--font-display);
	font-size: 24px;
	font-weight: 400;
	line-height: 28px;
	letter-spacing: 0.01em;
}

.alert__text {
	font-size: 16px;
	line-height: 26px;
}

/* ---------- Floating cart bar ----------
   Figma: yellow, 2px navy border, radius 14, padding 12/18, gap 16. */
.cart-bar {
	position: fixed;
	left: 50%;
	bottom: 14px;
	z-index: 40;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 12px 18px;
	background: var(--color-yellow);
	color: var(--color-navy);
	border: var(--border);
	border-radius: var(--radius-14);
	font-size: 13px;
	font-weight: 700;
	line-height: 16px;
	white-space: nowrap;
	transform: translateX(-50%);
	transition: transform 300ms var(--ease-out), visibility 300ms;
}

.cart-bar.is-empty {
	visibility: hidden;
	transform: translate(-50%, calc(100% + 20px));
}

.cart-bar__btn {
	display: inline-flex;
	align-items: center;
	height: 48px;
	padding: 14px 22px;
	background: var(--color-blue);
	color: var(--color-white);
	border-radius: var(--radius-10);
	font-weight: 700;
	transition: transform 150ms var(--ease-out);
}

.cart-bar__btn:hover {
	transform: translateY(-2px);
}

/* ---------- Dialogs (popup + lightbox) ---------- */
dialog {
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
}

dialog::backdrop {
	background: rgba(8, 16, 70, 0.75); /* prototype overlay */
}

/* ---------- Scroll reveal (prototype: fade in, 14px up) ---------- */
.js [data-reveal] {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}

.js [data-reveal].is-in {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.js [data-reveal] {
		opacity: 1;
		transform: none;
	}
}

/* ---------- Shared responsive ---------- */
@media (max-width: 1024px) {
	.title {
		font-size: 48px;
		line-height: 52px;
	}
}

@media (max-width: 767px) {
	.title {
		font-size: 40px;
		line-height: 44px;
		column-gap: 10px;
	}

	.form-row {
		grid-template-columns: 1fr;
	}

	.form-card {
		padding: 20px;
	}

	.cart-bar {
		width: calc(100% - 40px);
		justify-content: space-between;
	}
}



/* ---------- Button variants ---------- */
.btn--pill  { border-radius: var(--radius-pill); }               /* Figma "ORDER NOW" */
.btn--small { min-height: 48px; padding: 14px 22px; }             /* Figma "Browse menu", 160 × 48 */

.text-link {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.text-link:hover {
	color: var(--color-blue);
}

/* ---------- "Get it delivered!" popup ----------
   Figma "Popup": overlay #081046 at 80%; card 460 wide, blue, 3px navy border, radius 26,
   padding 34/34/38/34, gap 11, shadow 0 20 60 (-20) black 50%. */
.delivery-popup {
	max-width: calc(100% - 40px);
}

.delivery-popup::backdrop {
	background: rgba(8, 16, 70, 0.8);
}

.delivery-popup[open] {
	animation: kababish-pop 300ms var(--ease-out);
}

.delivery-popup__box {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 11px;
	width: 460px;
	max-width: 100%;
	padding: 34px 34px 38px;
	background: var(--color-blue);
	color: var(--color-white);
	border: 3px solid var(--color-navy);
	border-radius: 26px;
	box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.5);
	text-align: center;
}

/* Close: 36 × 36, radius 18, "×" 30px white; 15px from the top, 19px from the right. */
.delivery-popup__close {
	position: absolute;
	top: 15px;
	right: 19px;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0 0 4px;
	background: none;
	border: 0;
	border-radius: 18px;
	color: var(--color-white);
	font-family: Arial, sans-serif;
	font-size: 30px;
	line-height: 1;
	transition: background-color 150ms;
}

.delivery-popup__close:hover {
	background: rgba(255, 255, 255, 0.15);
}

.delivery-popup__badge {
	padding: 6px 14px;
	background: var(--color-white);
	color: var(--color-navy);
	border-radius: var(--radius-pill);
	font-size: 13px;
	font-weight: 700;
	line-height: 17px;
	text-transform: uppercase;
}

.delivery-popup__title {
	padding-top: 6px;
	font-family: var(--font-display);
	font-size: 44px;
	font-weight: 400;
	line-height: 46px;
	letter-spacing: 0.01em;
	color: var(--color-yellow);
}

.delivery-popup__text {
	max-width: 386px;
	font-size: 15px;
	line-height: 23px;
	opacity: 0.9;
}

/* Partner buttons: 300 × 64, white, radius 10, 12 apart. */
.delivery-popup__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 300px;
	max-width: 100%;
	margin: 0;
	padding: 9px 0 0;
	list-style: none;
}

.delivery-popup__link {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 64px;
	padding: 0 24px;
	background: var(--color-white);
	border: 2px solid var(--color-white);
	border-radius: var(--radius-10);
	transition: transform 150ms var(--ease-out), box-shadow 150ms;
}

.delivery-popup__link:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-sm);
}

.delivery-popup__link img {
	width: auto;
	max-width: 100%;
}

/* Logo heights from Figma: Uber Eats 26, Grubhub 41, DoorDash 20. */
.delivery-popup__link.is-ubereats img { height: 26px; }
.delivery-popup__link.is-grubhub img  { height: 41px; }
.delivery-popup__link.is-doordash img { height: 20px; }

@keyframes kababish-pop {
	from { opacity: 0; transform: scale(0.94); }
	to   { opacity: 1; transform: none; }
}

@media (max-width: 767px) {
	.delivery-popup__box {
		padding: 44px 20px 28px;
	}

	.delivery-popup__title {
		font-size: 36px;
		line-height: 40px;
	}
}

/* ---------- Color utilities (two-color headings) ----------
   Kept at the end of the file so they always win over component colors
   (e.g. ".title" is navy by default; "title u-white" makes it white). */
.u-white  { color: var(--color-white); }
.u-yellow { color: var(--color-yellow); }
.u-blue   { color: var(--color-blue); }
