/*
Theme Name: Salvador Molly's
Theme URI: https://salvadormollys.com/
Author: Friends of Salvador Molly's
Description: A block theme for Salvador Molly's in Portland, Oregon. Sunset stripes, lagoon teal and chunky retro type to match the new logo and menu. Every page, image and line of text can be edited in Appearance > Editor.
Version: 1.9.2
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: salvador-mollys
*/

/* ---------- Sunset stripes (the signature band from the menu header) ---------- */
.sm-stripes,
hr.wp-block-separator.is-style-sunset {
	--sm-band: 7px;
	display: block;
	height: calc(var(--sm-band) * 3) !important;
	/* !important: WordPress's own separator style shrinks separators to 100px wide. */
	width: 100% !important;
	max-width: none !important;
	border: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	margin-top: 0;
	margin-bottom: 0;
	opacity: 1;
	background: linear-gradient(
		to bottom,
		var(--wp--preset--color--sand) 0 33.33%,
		var(--wp--preset--color--marigold) 33.33% 66.66%,
		var(--wp--preset--color--sunset) 66.66% 100%
	);
}
hr.wp-block-separator.is-style-sunset.is-flipped,
.sm-stripes.is-flipped { transform: scaleY(-1); }

/* ---------- Star flourish around section headings (✦✦✦ Title ✦✦✦) ---------- */
.is-style-starred {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.45em;
	text-align: center;
}
.is-style-starred::before,
.is-style-starred::after {
	content: "\2726\2726\2726";
	flex: none;
	font-size: 0.55em;
	letter-spacing: 0.05em;
	background: linear-gradient(90deg, var(--wp--preset--color--sand), var(--wp--preset--color--marigold) 50%, var(--wp--preset--color--sunset));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.is-style-starred::after {
	background: linear-gradient(270deg, var(--wp--preset--color--sand), var(--wp--preset--color--marigold) 50%, var(--wp--preset--color--sunset));
	-webkit-background-clip: text;
	background-clip: text;
}
@media (max-width: 480px) {
	.is-style-starred::before,
	.is-style-starred::after { content: "\2726\2726"; }
}

/* ---------- Header ---------- */
.sm-header .wp-block-navigation a { text-decoration: none; }
/* Current page + hover. Extra-specific and !important because a site plugin (DesignSetGo)
   forces link colors with !important; this is only the menu link color. */
body .wp-site-blocks .sm-header .wp-block-navigation a:hover,
body .wp-site-blocks .sm-header .wp-block-navigation a[aria-current="page"] { color: var(--wp--preset--color--sunshine) !important; }
.sm-header .sm-header__logo { flex: none; margin: 0; }
.sm-header .sm-header__logo img { width: 92px; height: auto; }

/* The big logo is already on the home page, so the small one is hidden there. */
.home .sm-header .sm-header__logo { display: none; }

/* Full text menu: 2pt larger, centered in the space beside the logo. */
.sm-header .wp-block-navigation { flex: 1 1 auto; }
@media (min-width: 1080px) {
	.sm-header .wp-block-navigation {
		--navigation-layout-justify: center;
		justify-content: center;
		font-size: calc(1.125rem + 2pt);
	}
	.sm-header .wp-block-navigation__container { justify-content: center; gap: 0.5rem 1.4rem; }
}

/* Below 1080px the menu would wrap onto several lines, so use the hamburger. */
@media (min-width: 600px) and (max-width: 1079px) {
	.sm-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.sm-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
@media (max-width: 1079px) {
	.sm-header .wp-block-navigation { --navigation-layout-justify: flex-end; justify-content: flex-end; }
}
@media (max-width: 600px) {
	.sm-header .sm-header__logo img { width: 72px; }
	.sm-topbar { font-size: var(--wp--preset--font-size--small) !important; }
}
/* With no logo on the home page, keep the header from collapsing on phones. */
.home .sm-header { min-height: 64px; }

/* ---------- Hours list: day on the left, time on the right ---------- */
.sm-hours { list-style: none; padding: 0 !important; margin: 0; }
.sm-hours li {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.45rem 0;
	border-bottom: 2px dotted color-mix(in srgb, var(--wp--preset--color--lagoon) 30%, transparent);
}
.sm-hours li:last-child { border-bottom: 0; }
/* Line the first day up with the first line in the columns beside it (Find us, Email us). */
.wp-block-column > .sm-hours { margin-block-start: var(--wp--style--block-gap, 1.2rem); }
.sm-hours li:first-child { padding-top: 0; }
/* Contact page columns: more room between them, and the hours list doesn't stretch all the way
   to the next column. (The editor's column spacing setting was being overridden on this site.) */
.wp-block-columns:has(.sm-hours) { column-gap: clamp(2rem, 5vw, 5rem) !important; }
.wp-block-column > .sm-hours,
.wp-block-column:has(> .sm-hours) > p { max-width: 22rem; }
.sm-hours strong { font-weight: 700; }

/* ---------- Photos: rounded like a postcard ---------- */
.wp-block-image.sm-photo { width: 100%; }
.sm-photo img { border-radius: 14px; width: 100%; height: auto; object-fit: cover; display: block; }

/* ---------- Great Balls of Fire band ---------- */
.sm-fire .wp-block-heading { line-height: 1.05; }

/* ---------- Footer ---------- */
.sm-footer a { color: var(--wp--preset--color--sand); }
.sm-footer a:hover { color: #fff; }
.sm-footer .wp-block-social-links .wp-social-link { background: var(--wp--preset--color--sand) !important; color: var(--wp--preset--color--deep-lagoon) !important; }

/* ---------- Accessibility ---------- */
:where(a, button, .wp-element-button):focus-visible {
	outline: 3px solid var(--wp--preset--color--marigold);
	outline-offset: 3px;
	border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; animation: none !important; }
}

/* ---------- Plain link lists (footer) ---------- */
.sm-plain-list { list-style: none; padding-left: 0 !important; }
.sm-plain-list li { margin-bottom: 0.35rem; }

/* ---------- Hero ---------- */
.sm-hero { overflow: hidden; }

/* ---------- Hero sunburst behind the logo (echoes the rays in the logo) ---------- */
.sm-sunburst { position: relative; isolation: isolate; }
.sm-sunburst::before {
	content: "";
	position: absolute;
	inset: -12%;
	z-index: -1;
	background: repeating-conic-gradient(from 0deg at 50% 50%, var(--wp--preset--color--marigold) 0deg 7deg, transparent 7deg 15deg);
	-webkit-mask-image: radial-gradient(circle at 50% 50%, #000 0, #000 35%, transparent 75%);
	mask-image: radial-gradient(circle at 50% 50%, #000 0, #000 35%, transparent 75%);
	opacity: 0.5;
}
.sm-sunburst img { max-width: 440px; width: 100%; height: auto; margin-inline: auto; display: block; }

/* ---------- Menu items ---------- */
.sm-menu-item { margin-bottom: 1.6rem; }
.sm-menu-item > * { margin-top: 0 !important; margin-bottom: 0.25rem !important; }
.sm-menu-item h4 { font-size: 1.05rem; letter-spacing: 0.02em; color: var(--wp--preset--color--lagoon); }
.sm-menu-item h4 em {
	font-style: normal;
	font-family: var(--wp--preset--font-family--body);
	font-weight: 700;
	font-size: 0.85em;
	color: var(--wp--preset--color--sunset);
	margin-left: 0.25em;
}
.sm-price { font-weight: 700; color: var(--wp--preset--color--sunset); }
.sm-menu-sub {
	font-size: var(--wp--preset--font-size--medium) !important;
	color: var(--wp--preset--color--sunset) !important;
	margin-top: var(--wp--preset--spacing--50) !important;
}
.sm-legend { font-size: var(--wp--preset--font-size--small); opacity: 0.8; }

/* Featured menu item (Great Balls of Fire) */
.sm-menu-item.is-featured {
	background: var(--wp--preset--color--sand);
	border-top: 4px solid var(--wp--preset--color--marigold);
	border-bottom: 4px solid var(--wp--preset--color--marigold);
	padding: 1.25rem 1.5rem;
	text-align: center;
	border-radius: 6px;
}
.sm-menu-item.is-featured h4 { font-size: var(--wp--preset--font-size--large); }
.sm-region {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 700;
	font-size: 1.2em;
	letter-spacing: 0.01em;
	color: var(--wp--preset--color--sunset);
}

/* Compact price list (beverages, sides): name and price on one line */
.sm-menu-item.is-compact {
	display: grid;
	grid-template-columns: 1fr auto;
	column-gap: 1rem;
	align-items: baseline;
	margin-bottom: 0.9rem;
	padding-bottom: 0.6rem;
	border-bottom: 2px dotted color-mix(in srgb, var(--wp--preset--color--lagoon) 25%, transparent);
}
.sm-menu-item.is-compact .sm-price { grid-column: 2; grid-row: 1; }
.sm-menu-item.is-compact p:not(.sm-price) { grid-column: 1 / -1; font-size: var(--wp--preset--font-size--small); }

/* ---------- Embeds and map ---------- */
.sm-embed-slot:empty { display: none; }
.sm-map { display: block; width: 100%; height: clamp(280px, 45vw, 440px); border: 0; }
.sm-map-wrap { padding: 0 !important; }

/* ---------- Menu jump links ---------- */
.sm-jump .wp-block-button__link { padding: 0.45rem 1.1rem; font-size: 1rem; }
/* Section buttons: all 7 on one row on wide screens, 4 + 3 on tablets, 3 + 2 + 2 on phones,
   so no button sits alone on a row. Labels never break onto two lines.
   The rows are made with invisible line breaks (::before/::after) placed between buttons. */
.sm-jump .wp-block-buttons {
	display: flex !important;
	flex-wrap: wrap;
	justify-content: center !important;
	column-gap: 0.75rem;
	row-gap: 0;
	max-width: 1180px;
	margin-left: auto;
	margin-right: auto;
}
.sm-jump .wp-block-button { flex: 0 0 auto; width: auto !important; margin: 0.375rem 0 !important; }
.sm-jump .wp-block-button__link { white-space: nowrap; text-align: center; }
.sm-jump .wp-block-button:nth-child(1) { order: 2; }
.sm-jump .wp-block-button:nth-child(2) { order: 4; }
.sm-jump .wp-block-button:nth-child(3) { order: 6; }
.sm-jump .wp-block-button:nth-child(4) { order: 8; }
.sm-jump .wp-block-button:nth-child(5) { order: 10; }
.sm-jump .wp-block-button:nth-child(6) { order: 12; }
.sm-jump .wp-block-button:nth-child(7) { order: 14; }
.sm-jump .wp-block-buttons::before,
.sm-jump .wp-block-buttons::after { content: ""; flex-basis: 100%; height: 0; display: none; }
@media (max-width: 959px) {
	.sm-jump .wp-block-buttons::after { display: block; order: 9; }
}
@media (max-width: 560px) {
	.sm-jump .wp-block-buttons { column-gap: 0.5rem; }
	.sm-jump .wp-block-button__link { padding: 0.4rem 0.85rem; font-size: 0.95rem; }
	.sm-jump .wp-block-buttons::before { display: block; order: 7; }
	.sm-jump .wp-block-buttons::after { order: 11; }
}
@media (max-width: 380px) {
	.sm-jump .wp-block-buttons { column-gap: 0.35rem; }
	.sm-jump .wp-block-button__link { padding: 0.35rem 0.6rem; font-size: 0.875rem; }
}

/* ---------- Back to top / Go to bottom (long pages) ---------- */
.sm-scroll {
	position: fixed;
	right: clamp(12px, 3vw, 24px);
	bottom: clamp(12px, 3vw, 24px);
	z-index: 50;
	display: flex;
	flex-direction: column;
	gap: 10px;
	pointer-events: none;
}
.sm-scroll button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	min-width: 48px;
	height: 48px;
	padding: 0 1rem;
	border: 2px solid var(--wp--preset--color--sand);
	border-radius: 999px;
	background: var(--wp--preset--color--deep-lagoon);
	color: #fff;
	font: 700 1rem/1 var(--wp--preset--font-family--body);
	letter-spacing: 0.02em;
	box-shadow: 0 6px 18px rgba(22, 58, 67, 0.25);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s, transform 0.2s, visibility 0.2s, background-color 0.15s;
}
.sm-scroll button.is-visible { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.sm-scroll button:hover { background: var(--wp--preset--color--sunset); }
.sm-scroll svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 600px) {
	.sm-scroll button { padding: 0; width: 48px; }
	.sm-scroll .sm-scroll__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* ---------- Order page: order button area ---------- */
.sm-buy form { margin: 0; }
.sm-buy input[type="image"], .sm-buy img { max-width: 100%; height: auto; }
.sm-buy :is(button, input[type="submit"]) {
	background: var(--wp--preset--color--sunset);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 0.8rem 1.8rem;
	font: 700 1.125rem/1 var(--wp--preset--font-family--body);
	cursor: pointer;
}
