/*
Theme Name:  Esplori Demo
Template:    twentytwentyfive
Description: Demo rental site for the Esplori Booking plugin. Child of Twenty Twenty-Five: colours, type and layout live in theme.json; this file maps the theme onto the plugin's tokens and adds what theme.json can't express. Look: white page frame on grey, photo heroes with pins, outlined section labels, black pill buttons.
Author:      Esplori Studio
Version:     0.3.0
Requires at least: 6.6
Text Domain: esplori-demo
*/

/* ============================================================ frame
   All white. The 10px padding is the inset every full-width photo (hero, feature, footer)
   keeps from the window's edge, so their rounded corners show. */
.wp-site-blocks {
	position: relative;
	padding: 10px;
	background: var(--wp--preset--color--base);
	overflow: clip;
}
.wp-site-blocks > main { margin-block-start: 0; }
.alignfull.wp-block-cover,
.alignfull.demo-dark { border-radius: 20px; }

/* ============================================================ header */
.demo-logo { display: block; line-height: 0; }
.demo-logo img { width: auto; height: 56px; }
.demo-logo__light,
.home .demo-logo__dark { display: none; }
.home .demo-logo__light { display: block; }
@media (max-width: 781px) { .demo-logo img { height: 44px; } }
.demo-header .wp-block-navigation a:hover { text-decoration: none; opacity: .7; }
.demo-header .wp-block-button.is-style-outline .wp-block-button__link {
	border: 1px solid currentColor;
	background: transparent;
	color: inherit;
	padding: 8px 20px;
}
/* On the home page the header sits on the hero photo, in white. */
.home .demo-header {
	position: absolute;
	inset: 10px 10px auto;
	z-index: 20;
	color: var(--wp--preset--color--base);
}
.home .demo-header .wp-block-navigation__responsive-container-open { color: var(--wp--preset--color--base); }

/* ============================================================ shared pieces */

/* Outlined label above a section title ("About", "FAQ"). */
.demo-label {
	width: fit-content;
	padding: 3px 12px;
	border: 1px solid var(--wp--preset--color--contrast);
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	line-height: 1.6;
	text-transform: uppercase;
}
.has-text-align-center.demo-label { margin-left: auto; margin-right: auto; }
.demo-dark .demo-label { border-color: rgba(255, 255, 255, .5); }

/* The quieter second half of a two-tone headline. */
.demo-dim { opacity: .45; }

/* A white pill with a dot, pinned onto a photo. Decorative, hidden on phones. */
.demo-pin {
	position: absolute;
	z-index: 2;
	margin: 0 !important;
	padding: 4px 12px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
}
.demo-pin::after {
	content: "";
	position: absolute;
	top: 50%;
	right: -18px;
	width: 8px;
	height: 8px;
	margin-top: -4px;
	background: var(--wp--preset--color--contrast);
	border-radius: 50%;
	box-shadow: 0 0 0 3px var(--wp--preset--color--base);
}
.demo-pin.is-dot-left::after { right: auto; left: -18px; }
.demo-pin a { text-decoration: none; }
/* Where the pins sit, per section (p1, p2, p3 in source order). */
.demo-hero .demo-pin.p1 { top: 64%; right: 30%; }
.demo-hero .demo-pin.p2 { top: 52%; left: 9%; }
.demo-hero .demo-pin.p3 { top: 47%; right: 8%; }
.demo-feature .demo-pin.p1 { top: 12%; left: 36%; }
.demo-feature .demo-pin.p2 { top: 30%; right: 12%; }
.demo-wordmark .demo-pin.p1 { top: 62%; left: 20%; }
.demo-wordmark .demo-pin.p2 { top: 78%; right: 16%; }
@media (max-width: 781px) { .demo-pin { display: none; } }

/* Black pill buttons get an arrow. */
.demo-arrow .wp-block-button__link::after,
.esb-search__submit::after { content: "\2197"; margin-left: 8px; font-weight: 400; }

/* ============================================================ hero */
.demo-hero { min-height: min(820px, 96vh) !important; }
.demo-hero .wp-block-cover__inner-container { position: relative; }
.demo-hero h1, .demo-hero p:not(.demo-pin) { text-shadow: 0 1px 16px rgba(0, 0, 0, .35); }
/* Darken only the top, where the text sits; the sky and road below stay bright. */
.demo-hero .wp-block-cover__background { opacity: 1 !important; background: linear-gradient(180deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, 0) 55%) !important; }
.demo-hero .esb-search { max-width: 1120px; margin-inline: auto; }

/* ============================================================ plugin: search */
body .esb-search {
	--esb-primary: var(--wp--preset--color--contrast);
	--esb-text: var(--wp--preset--color--contrast);
	--esb-muted: var(--wp--preset--color--muted);
	--esb-border: var(--wp--preset--color--border);
	--esb-font: var(--wp--preset--font-family--urbanist);
	gap: 16px;
	padding: 20px;
	border-radius: 18px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, .12);
	text-align: left;
}
body .esb-search__field { padding: 0; background: none; gap: 6px; }
body .esb-search__field:focus-within { outline: none; }
body .esb-search__field span { font-size: 12px; font-weight: 500; color: var(--wp--preset--color--muted); }
body .esb-search__field input,
body .esb-search__field select {
	height: 44px;
	padding: 0 12px;
	font-size: 15px;
	font-weight: 500;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
	background: var(--wp--preset--color--base);
}
body .esb-search__field input:focus,
body .esb-search__field select:focus { border-color: var(--wp--preset--color--contrast); }
body .esb-search__submit { align-self: end; min-height: 44px; border-radius: 10px; font-size: 14px; }
@media (min-width: 900px) { body .esb-search { grid-template-columns: 1fr 1fr 180px; } }

/* ============================================================ plugin: fleet, as photo cards */
body .esb-fleet-wrap,
body .esb {
	--esb-primary: var(--wp--preset--color--contrast);
	--esb-primary-text: var(--wp--preset--color--base);
	--esb-text: var(--wp--preset--color--contrast);
	--esb-muted: var(--wp--preset--color--muted);
	--esb-faint: var(--wp--preset--color--faint);
	--esb-border: var(--wp--preset--color--border);
	--esb-fill: var(--wp--preset--color--soft);
	--esb-panel: transparent;
	--esb-icon: var(--wp--preset--color--muted);
	--esb-radius: 10px;
	--esb-shadow: none;
	--esb-font: var(--wp--preset--font-family--urbanist);
}
body .esb-fleet-wrap { padding: 0; gap: 16px; font-size: 14px; }
body .esb-filter__box { background: var(--wp--preset--color--soft); border-radius: 18px; }
body .esb-fleet { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 16px; min-width: 0; }

/* Photo fills the card; name and price sit on a white panel inset at the bottom. */
body .esb-car {
	position: relative;
	display: grid;
	grid-template-rows: 1fr auto auto;
	gap: 0;
	min-height: 300px;
	padding: 0;
	overflow: hidden;
	border-radius: 18px;
	background: var(--wp--preset--color--soft);
}
body .esb-car:hover { transform: none; box-shadow: none; }
body .esb-car:hover .esb-car__media img { transform: scale(1.04); }
body .esb-car__media { position: absolute; inset: 0; display: block; aspect-ratio: auto; }
body .esb-car__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; border-radius: 0; transition: transform .4s ease; }
body .esb-car__head,
body .esb-car__foot { position: relative; z-index: 1; margin: 0 8px; background: var(--wp--preset--color--base); }
body .esb-car__head { grid-row: 2; padding: 12px 14px 2px; border-radius: 12px 12px 0 0; }
body .esb-car__foot { grid-row: 3; margin-bottom: 8px; padding: 6px 14px 12px; border-radius: 0 0 12px 12px; }
body .esb-car__name { font-size: 15px; font-weight: 600; }
body .esb-car__price { font-size: 16px; font-weight: 700; }
body .esb-car::after {
	content: "\2197";
	position: absolute;
	z-index: 1;
	top: 10px;
	right: 10px;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	background: var(--wp--preset--color--base);
	border-radius: 999px;
	font-size: 14px;
}

/* ============================================================ plugin: booking form */
body .esb { border: 1px solid var(--wp--preset--color--border); border-radius: 20px; }
body .esb-btn { border-radius: 999px; }

/* ============================================================ sections */

/* Feature photo: a white info card in the bottom-left corner. */
.demo-card {
	max-width: 340px;
	padding: 18px !important;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	border-radius: 16px;
}
.demo-card > * { margin-block: 0; }
.demo-card > * + * { margin-block-start: 8px; }

/* How it works: numbered steps, the first one in full colour. */
.demo-steps > .wp-block-group { padding: 18px 0; }
.demo-steps > .wp-block-group + .wp-block-group { border-top: 1px solid var(--wp--preset--color--border); }
.demo-steps > .wp-block-group:not(:first-child) { color: var(--wp--preset--color--faint); }
.demo-steps > .wp-block-group > * { margin-block: 0; }
.demo-steps > .wp-block-group > * + * { margin-block-start: 6px; }
.demo-shot { overflow: hidden; padding: 20px 0 0 20px !important; background: var(--wp--preset--color--soft); border-radius: 20px; }
.demo-shot img { display: block; border-radius: 14px 0 0 0; box-shadow: 0 10px 40px rgba(0, 0, 0, .08); }

/* FAQ: rows with a square chevron. */
.demo-faq details { border-bottom: 1px solid var(--wp--preset--color--border); padding: 18px 0; }
.demo-faq summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}
.demo-faq summary::-webkit-details-marker { display: none; }
.demo-faq summary::after {
	content: "";
	flex: none;
	width: 28px;
	height: 28px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	background: no-repeat center / 10px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23141414' stroke-width='1.5'/%3E%3C/svg%3E");
	transition: transform .2s;
}
.demo-faq details[open] summary::after { transform: rotate(180deg); }
.demo-faq details > :not(summary) { margin-top: 10px; color: var(--wp--preset--color--muted); }

/* Contact: dark block with a white card. */
.demo-dark { color: var(--wp--preset--color--base); }
.demo-contact-card { background: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast); border-radius: 16px; }
.demo-contact-card .wp-block-button { width: 100%; }
.demo-contact-card .wp-block-button__link { width: 100%; border-radius: 10px; }
.demo-contact-row { padding: 10px 14px; border: 1px solid var(--wp--preset--color--border); border-radius: 10px; }
.demo-contact-row > * { margin: 0; }

/* Footer: the wordmark over a photo. */
.demo-wordmark .wp-block-cover__inner-container,
.demo-feature .wp-block-cover__inner-container { position: static; }
.demo-wordmark h2 {
	margin: 0;
	font-size: 23vw;
	font-weight: 600;
	line-height: .8;
	letter-spacing: -.04em;
	text-align: center;
}
.demo-footer-links a { text-decoration: none; }
.demo-footer-links a:hover { text-decoration: underline; }
