/* 0.15.12 redesign: Home: hero search bar (also used on /search/), How it works, home guides, header/footer, owner app footer. Brand tokens come from theme.json (var(--wp--preset--color--*)). */

/*
 * Owner of this file: the "home" agent (qa/redesign_0512/home/PROGRESS.md).
 * Sections:
 *   1. Shared search bar (.dl-sbar): home hero + top of /search/
 *   2. Bar popovers: Where suggestions, date calendar, guests
 *   3. Home "How it works" (.dl-how)
 *   4. Home guide cards (every card has a picture)
 *   5. Standard footer on owner and checkout pages
 * Phone layout at 781px and below (WordPress' breakpoint, same as theme.css).
 */

/* ------------------------------------------------------------------ */
/* 1. Shared search bar                                                 */
/* ------------------------------------------------------------------ */
.dl-sbar {
	--sb-radius: 10px;
	--sb-h: 76px;
	position: relative;
	width: 100%;
	font-family: var(--dl-sans);
	color: var(--dl-navy);
	text-align: left;
}
.dl-hero .dl-search--hero { margin-top: 44px; width: min(1080px, 100%); }

/* The white bar: four parts in one row, thin dividers between them. */
.dl-sbar__bar {
	position: relative; /* popovers are placed against the bar */
	display: grid;
	grid-template-columns: minmax(0, 1.45fr) minmax(0, 1.15fr) minmax(0, 1fr) auto;
	align-items: stretch;
	min-height: var(--sb-h);
	padding: 8px;
	background: #fff;
	border-radius: var(--sb-radius);
}
/* On the home photo: a strong, soft shadow so the bar sits above the picture. */
.dl-sbar--home .dl-sbar__bar {
	box-shadow: 0 28px 64px rgba(10, 20, 40, .42), 0 6px 16px rgba(10, 20, 40, .22);
}
/* On /search/: a quieter bar with a border. */
.dl-sbar--search .dl-sbar__bar {
	border: 1px solid var(--dl-line);
	box-shadow: 0 8px 24px rgba(28, 43, 69, .08);
}

.dl-sbar__seg {
	position: static;
	display: flex; flex-direction: column; justify-content: center; gap: 3px;
	min-width: 0;
	padding: 8px 20px;
	border-radius: 6px;
	cursor: text;
}
/* Dividers: a short vertical line on the left of every part but the first
   (drawn as a background, so it hides while a part is hovered or open). */
.dl-sbar__seg + .dl-sbar__seg {
	background: linear-gradient(var(--dl-line), var(--dl-line)) left center / 1px 40px no-repeat;
}
.dl-sbar__seg:hover { background: var(--dl-mist); }
.dl-sbar__seg:focus-within,
.dl-sbar__seg.is-open { background: var(--dl-mist); box-shadow: inset 0 0 0 2px var(--dl-lake); }

.dl-sbar__label {
	display: block;
	margin: 0;
	font-size: 13px; font-weight: 600; line-height: 1.2; letter-spacing: .02em;
	color: var(--dl-navy);
}
/* The value line: the Where text box, or the Dates / Guests buttons. */
.dl-sbar__input,
.dl-sbar__trigger,
.dl-sbar__select {
	display: block;
	width: 100%;
	min-height: 28px;
	margin: 0; padding: 0;
	background: transparent;
	border: 0; border-radius: 0;
	font: inherit; font-size: 16px; line-height: 1.4;
	color: var(--dl-navy);
	text-align: left;
	box-shadow: none;
	-webkit-appearance: none; appearance: none;
}
.dl-sbar__input::placeholder { color: var(--dl-muted); opacity: 1; }
.dl-sbar__input:focus,
.dl-sbar__trigger:focus,
.dl-sbar__select:focus { outline: none; } /* the whole part shows the focus ring */
.dl-sbar__trigger { cursor: pointer; }
.dl-sbar__trigger[hidden] { display: none; }
/* The whole Dates or Guests part opens its popover (search-bar.js). */
.dl-sbar.is-js .dl-sbar__seg--dates,
.dl-sbar.is-js .dl-sbar__seg--guests { cursor: pointer; }
.dl-sbar__value { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dl-sbar__value.is-empty { color: var(--dl-muted); }

.dl-sbar__submit {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	min-width: 148px;
	margin: 0; padding: 0 28px;
	background: var(--dl-lake);
	border: 0; border-radius: 8px;
	font: inherit; font-size: 17px; font-weight: 600;
	color: #fff;
	cursor: pointer;
	transition: background-color .15s ease;
}
.dl-sbar__submit:hover { background: #3A6180; }
.dl-sbar__submit:focus-visible { outline: 3px solid var(--dl-navy); outline-offset: 2px; }
.dl-sbar__submit svg { flex: none; }

.dl-sbar__extra { margin-top: 16px; }

/* Phone: a card. Where on its own row, Dates and Guests side by side,
   Search full width. Dividers become horizontal lines. */
@media (max-width: 781px) {
	.dl-hero .dl-search--hero { margin-top: auto; padding-top: 28px; width: 100%; }
	.dl-sbar { --sb-h: auto; }
	.dl-sbar__bar {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 0;
		padding: 6px;
	}
	.dl-sbar__seg { padding: 10px 14px; min-height: 64px; }
	.dl-sbar__seg--where { grid-column: 1 / -1; }
	.dl-sbar__seg + .dl-sbar__seg { background: none; }
	.dl-sbar__seg--dates { border-top: 1px solid var(--dl-line); border-radius: 0 0 0 6px; }
	.dl-sbar__seg--guests { border-top: 1px solid var(--dl-line); border-left: 1px solid var(--dl-line); border-radius: 0 0 6px 0; }
	.dl-sbar__submit { grid-column: 1 / -1; min-height: 52px; margin-top: 6px; }
	.dl-sbar__label { font-size: 12px; }
	.dl-sbar__input, .dl-sbar__trigger, .dl-sbar__select { font-size: 16px; } /* 16px stops iOS zoom */
}

/* ------------------------------------------------------------------ */
/* 2. Popovers                                                          */
/* ------------------------------------------------------------------ */
.dl-sbar__pop {
	position: absolute;
	top: calc(100% + 10px);
	z-index: 60;
	margin: 0;
	background: #fff;
	border: 1px solid var(--dl-line);
	border-radius: 12px;
	box-shadow: 0 24px 56px rgba(10, 20, 40, .22), 0 4px 12px rgba(10, 20, 40, .10);
	color: var(--dl-navy);
	cursor: default;
}
.dl-sbar__pop[hidden] { display: none; }

/* Where suggestions */
.dl-sbar__suggest {
	left: 0;
	width: min(440px, 100%);
	max-height: 360px;
	overflow-y: auto;
	padding: 8px;
	list-style: none;
}
.dl-sbar__opt {
	display: flex; justify-content: space-between; align-items: center; gap: 16px;
	min-height: 44px;
	padding: 8px 12px;
	border-radius: 8px;
	cursor: pointer;
}
.dl-sbar__opt:hover,
.dl-sbar__opt[aria-selected="true"] { background: var(--dl-mist); }
.dl-sbar__opt[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--dl-lake); }
.dl-sbar__optname { font-size: 16px; font-weight: 500; }
.dl-sbar__optkind { flex: none; font-size: 13px; color: var(--dl-muted); }

/* Shared popover footer: summary + Clear + Apply */
.dl-sbar__popfoot {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 14px 20px;
	border-top: 1px solid var(--dl-line);
}
.dl-sbar__popacts { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.dl-sbar__link {
	min-height: 44px; padding: 0 12px;
	background: none; border: 0;
	font: inherit; font-size: 15px; font-weight: 600;
	color: var(--dl-navy); text-decoration: underline; text-underline-offset: 3px;
	cursor: pointer;
}
.dl-sbar__apply {
	min-height: 44px; padding: 0 22px;
	background: var(--dl-navy); color: #fff;
	border: 0; border-radius: 8px;
	font: inherit; font-size: 15px; font-weight: 600;
	cursor: pointer;
}
.dl-sbar__apply:hover { background: var(--dl-navy-2); }
.dl-sbar__pop button:focus-visible { outline: 2px solid var(--dl-lake); outline-offset: 2px; }

/* Date calendar */
.dl-sbar__cal {
	left: 50%; transform: translateX(-50%);
	width: min(760px, calc(100vw - 32px));
}
.dl-cal__tabs {
	display: flex; justify-content: center; gap: 4px;
	width: max-content;
	margin: 18px auto 0; padding: 4px;
	background: var(--dl-mist);
	border-radius: 8px;
}
.dl-cal__tab {
	min-height: 40px; padding: 0 20px;
	background: none; border: 0; border-radius: 6px;
	font: inherit; font-size: 15px; font-weight: 600; color: var(--dl-muted);
	cursor: pointer;
}
.dl-cal__tab.is-on { background: #fff; color: var(--dl-navy); box-shadow: 0 1px 3px rgba(28, 43, 69, .16); }
.dl-cal__body { position: relative; padding: 16px 28px 20px; }
.dl-cal__nav {
	position: absolute; left: 20px; right: 20px; top: 12px;
	display: flex; justify-content: space-between;
	pointer-events: none;
}
.dl-cal__arrow {
	display: inline-flex; align-items: center; justify-content: center;
	width: 40px; height: 40px;
	background: #fff; border: 1px solid var(--dl-line); border-radius: 50%;
	color: var(--dl-navy);
	cursor: pointer; pointer-events: auto;
}
.dl-cal__arrow:hover { background: var(--dl-mist); }
.dl-cal__arrow:disabled { opacity: .35; cursor: default; }
.dl-cal__months { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.dl-cal__title { margin: 8px 0 14px; font-size: 16px; font-weight: 600; text-align: center; line-height: 24px; }
.dl-cal__grid { display: flex; flex-direction: column; gap: 2px; }
.dl-cal__row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dl-cal__dow { padding-bottom: 6px; font-size: 12px; font-weight: 600; color: var(--dl-muted); text-align: center; }
.dl-cal__cell { position: relative; display: flex; justify-content: center; }
/* Range band behind the days between check-in and check-out. */
.dl-cal__cell.is-range::before {
	content: ""; position: absolute; inset: 2px 0;
	background: #E4EDF5;
	z-index: 0;
}
.dl-cal__cell.is-start::before { left: 50%; }
.dl-cal__cell.is-end::before { right: 50%; }
.dl-cal__cell.is-start.is-end::before { display: none; }
.dl-cal__day {
	position: relative; z-index: 1;
	width: 44px; height: 44px;
	padding: 0;
	background: none; border: 0; border-radius: 8px;
	font: inherit; font-size: 15px; font-variant-numeric: tabular-nums;
	color: var(--dl-navy);
	cursor: pointer;
}
.dl-cal__day:hover:not(.is-off) { box-shadow: inset 0 0 0 1.5px var(--dl-navy); }
.dl-cal__day.is-off { color: #9AA6B5; cursor: default; }
.dl-cal__day.is-start,
.dl-cal__day.is-end { background: var(--dl-navy); color: #fff; font-weight: 600; }
.dl-cal__summary { margin: 0; font-size: 15px; color: var(--dl-muted); }

/* Flexible: month buttons */
.dl-cal__intro { margin: 4px 0 16px; font-size: 15px; color: var(--dl-muted); text-align: center; }
.dl-cal__monthchips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dl-cal__mchip {
	display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
	min-height: 64px; padding: 10px 14px;
	background: #fff; border: 1px solid var(--dl-line); border-radius: 8px;
	font: inherit; color: var(--dl-navy); text-align: left;
	cursor: pointer;
}
.dl-cal__mchip:hover { border-color: var(--dl-navy); }
.dl-cal__mchip.is-on { border-color: var(--dl-navy); box-shadow: inset 0 0 0 1px var(--dl-navy); background: var(--dl-mist); }
.dl-cal__mname { font-size: 15px; font-weight: 600; }
.dl-cal__myear { font-size: 13px; color: var(--dl-muted); }

/* Guests */
.dl-sbar__guestpop { right: 8px; width: min(380px, calc(100vw - 32px)); }
.dl-sbar__row {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 16px 20px;
}
.dl-sbar__row + .dl-sbar__row { border-top: 1px solid var(--dl-line); }
.dl-sbar__rowtext { display: flex; flex-direction: column; gap: 2px; }
.dl-sbar__rowtitle { font-size: 16px; font-weight: 600; }
.dl-sbar__rowhint { font-size: 13px; line-height: 1.4; color: var(--dl-muted); }
.dl-sbar__step { display: flex; align-items: center; gap: 10px; flex: none; }
.dl-sbar__stepbtn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px;
	padding: 0;
	background: #fff; border: 1px solid #8D99AB; border-radius: 50%;
	font: inherit; font-size: 20px; line-height: 1; color: var(--dl-navy);
	cursor: pointer;
}
.dl-sbar__stepbtn:hover:not(:disabled) { border-color: var(--dl-navy); }
.dl-sbar__stepbtn:disabled { border-color: var(--dl-line); color: #9AA6B5; cursor: default; }
.dl-sbar__count { min-width: 22px; font-size: 16px; font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; }

@media (max-width: 781px) {
	.dl-sbar__pop { left: 0; right: 0; width: auto; transform: none; }
	.dl-sbar__suggest { width: auto; }
	.dl-cal__body { padding: 14px 12px 16px; }
	.dl-cal__nav { left: 10px; right: 10px; top: 10px; }
	.dl-cal__months { grid-template-columns: minmax(0, 1fr); }
	.dl-cal__day { width: 100%; max-width: 46px; }
	.dl-cal__monthchips { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
	.dl-cal__mchip { padding: 8px 10px; min-height: 56px; }
	.dl-sbar__popfoot { flex-wrap: wrap; padding: 12px 14px; }
	.dl-cal__summary { flex-basis: 100%; }
	.dl-sbar__row { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	.dl-sbar__submit, .dl-sbar__apply { transition: none; }
}

/* ------------------------------------------------------------------ */
/* 3. Home "How it works"                                               */
/* ------------------------------------------------------------------ */
.dl-how { background: var(--dl-mist); }
.dl-how .dl-eyebrow { color: var(--dl-gold-dark); } /* 4.5:1 on mist */
.dl-how__grid {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	align-items: center;
	gap: 80px;
}
.dl-how__media { position: relative; margin: 0; }
.dl-how__media img {
	display: block;
	width: 100%; aspect-ratio: 6 / 5; height: auto;
	object-fit: cover; object-position: 62% center;
	border-radius: 12px;
	box-shadow: 0 24px 48px rgba(28, 43, 69, .18);
}
/* A navy frame offset behind the photo: the one decorative touch. */
.dl-how__media::before {
	content: "";
	position: absolute; inset: 20px -20px -20px 20px;
	border: 1.5px solid var(--dl-navy);
	border-radius: 12px;
	z-index: -1;
	opacity: .18;
}
.dl-how__media { isolation: isolate; }
.dl-how__content { display: flex; flex-direction: column; gap: 0; }
.dl-how__title { margin-bottom: 36px !important; font-size: 40px !important; line-height: 1.1 !important; max-width: 16ch; }
.dl-how__steps { display: flex; flex-direction: column; gap: 0; margin: 0; }
.dl-how__step {
	position: relative;
	display: grid;
	grid-template-columns: 60px minmax(0, 1fr);
	column-gap: 24px;
	padding-bottom: 32px;
}
.dl-how__step:last-child { padding-bottom: 0; }
/* The thin line that joins one step's circle to the next. */
.dl-how__step:not(:last-child)::before {
	content: "";
	position: absolute;
	left: 30px; top: 64px; bottom: 4px;
	width: 1px;
	background: #C5D2DE;
}
.dl-how__mark {
	position: relative;
	display: flex; align-items: center; justify-content: center;
	width: 60px; height: 60px;
	background: #fff;
	border: 1px solid var(--dl-line);
	border-radius: 50%;
	color: var(--dl-navy);
	box-shadow: 0 4px 12px rgba(28, 43, 69, .08);
}
.dl-how__num {
	position: absolute; top: -4px; right: -6px;
	display: flex; align-items: center; justify-content: center;
	width: 24px; height: 24px;
	background: var(--dl-navy); color: #fff;
	border: 2px solid var(--dl-mist);
	border-radius: 50%;
	font-family: var(--dl-serif); font-size: 14px; line-height: 1;
}
.dl-how__body { display: flex; flex-direction: column; gap: 6px; padding-top: 6px; }
.dl-how .dl-how__steptitle { margin: 0; font-family: var(--dl-sans); font-size: 20px; font-weight: 600; line-height: 1.3; letter-spacing: 0; color: var(--dl-navy); }
.dl-how__text { margin: 0; max-width: 46ch; font-size: 16px; line-height: 1.6; color: var(--dl-muted); }
.dl-how__cta { margin: 40px 0 0 84px; }

@media (max-width: 1024px) {
	.dl-how__grid { gap: 48px; }
	.dl-how__title { font-size: 34px !important; }
}
@media (max-width: 781px) {
	.dl-how__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.dl-how__media img { aspect-ratio: 16 / 10; object-position: center 60%; }
	.dl-how__media::before { display: none; }
	.dl-how__title { font-size: 28px !important; margin-bottom: 24px !important; }
	.dl-how__step { grid-template-columns: 48px minmax(0, 1fr); column-gap: 16px; padding-bottom: 24px; }
	.dl-how__step:not(:last-child)::before { left: 24px; top: 52px; }
	.dl-how__mark { width: 48px; height: 48px; }
	.dl-how__mark svg { width: 22px; height: 22px; }
	.dl-how__num { width: 22px; height: 22px; font-size: 13px; }
	.dl-how__body { padding-top: 2px; }
	.dl-how .dl-how__steptitle { font-size: 17px; }
	.dl-how__text { font-size: 15px; }
	.dl-how__cta { margin: 28px 0 0; }
	.dl-how__cta .dl-btn { width: 100%; min-height: 48px; }
}

/* ------------------------------------------------------------------ */
/* 4. Home guide cards: every card has a picture                        */
/* ------------------------------------------------------------------ */
.dl-guidecard__media img,
.dl-guidecard__media .dl-photo { display: block; width: 100%; height: 100%; object-fit: cover; }
.dl-guides .dl-guides__credit {
	grid-column: 1 / -1;
	margin: -8px 0 0;
	font-size: 13px;
	text-align: right;
}
.dl-guides__credit a { color: var(--dl-muted); text-underline-offset: 3px; }
@media (max-width: 781px) {
	.dl-guides .dl-guides__credit { margin: 0; text-align: left; }
}

/* ------------------------------------------------------------------ */
/* 5. Standard footer on owner, sign-up, listing-step and checkout pages */
/* ------------------------------------------------------------------ */
/* The owner app pages fill the window; the footer sits after the content
   with clear space above it (nothing touches the footer). */
.dl-main--dash,
.dl-main--wizard,
.dl-main--signup,
.dl-main--checkout { padding-bottom: 72px; }
@media (max-width: 781px) {
	.dl-main--dash,
	.dl-main--wizard,
	.dl-main--signup,
	.dl-main--checkout { padding-bottom: 40px; }
}

/* The hero clips its photo; while a search popover is open the hero lets it
   hang below the photo, above the next section. */
.dl-hero:has(.dl-sbar .is-open) { overflow: visible; z-index: 5; }
.dl-hero__media { overflow: hidden; }
