/* Sewa Rent — search by dates (TRACKER 2.50): the "Dates" field, the archive dates pill and the picker dialog.
 * Hero layout (field widths on phones) lives in listeo-child/style-home.css. */

/* ---------- Field (sidebar form and generic) ---------- */
.sewa-dates-field { position: relative; }
.sewa-dates-trigger {
	display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; margin: 0; padding: 0 16px;
	background: #fff; border: 1px solid #dbdbdb; border-radius: 6px; box-shadow: none; cursor: pointer;
	font: inherit; font-size: 15px; line-height: 1.2; color: var(--sewa-muted); text-align: left;
	-webkit-tap-highlight-color: transparent;
}
.sewa-dates-trigger.has-value { color: var(--sewa-text); font-weight: 500; }
.sewa-dates-trigger .sewa-dates-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sewa-dates-trigger .fa { flex: 0 0 auto; color: #999; font-size: 15px; }
.sewa-dates-trigger:focus-visible { outline: 2px solid var(--sewa-accent); outline-offset: 2px; }
.listeo-form-sidebar_search .sewa-dates-field { margin-bottom: 15px; }

/* ---------- Archive pill ---------- */
.sewa-dates-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 18px; }
.sewa-dates-bar .sewa-dates-pill {
	width: auto; max-width: 100%; min-height: 44px; padding: 0 18px; border-radius: var(--sewa-radius-pill);
	border-color: var(--sewa-line); box-shadow: 0 2px 8px rgba(0, 0, 0, .06); color: var(--sewa-text); font-weight: 500;
}
.sewa-dates-bar .sewa-dates-pill .fa { order: -1; color: var(--sewa-accent); }
.sewa-dates-bar .sewa-dates-pill.has-value { border-color: var(--sewa-accent); background: #fff5f7; }
.sewa-dates-clear {
	display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: 0 0 0 -6px; padding: 0;
	background: transparent; border: 0; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--sewa-muted); cursor: pointer;
}
.sewa-dates-clear:hover, .sewa-dates-clear:focus-visible { background: var(--sewa-bg-soft); color: var(--sewa-text); }
.sewa-dates-clear[hidden], .sewa-dates-note[hidden] { display: none; }
.sewa-dates-note { font-size: var(--sewa-font-size-sm); color: var(--sewa-muted); }

/* ---------- Dialog ---------- */
.sewa-dp[hidden] { display: none; }
.sewa-dp { position: fixed; inset: 0; z-index: 100000; }
.sewa-dp-backdrop { position: absolute; inset: 0; background: transparent; }
.sewa-dp-panel {
	position: fixed; width: 680px; max-width: calc(100vw - 24px); padding: 18px 20px 16px; background: #fff;
	border-radius: 18px; box-shadow: var(--sewa-shadow-lg); color: var(--sewa-text); text-align: left;
	max-height: calc(100vh - 16px); overflow-y: auto;
}
.sewa-dp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sewa-dp-title { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 600; color: var(--sewa-text); }
.sewa-dp-x {
	display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -8px -10px -8px 0; padding: 0;
	background: transparent; border: 0; border-radius: 50%; font-size: 26px; line-height: 1; color: var(--sewa-text); cursor: pointer;
}
.sewa-dp-x:hover, .sewa-dp-x:focus-visible { background: var(--sewa-bg-soft); }
.sewa-dp-hint { margin: 2px 0 10px; font-size: var(--sewa-font-size-sm); color: var(--sewa-muted); min-height: 20px; line-height: 20px; }
.sewa-dp-body { position: relative; }
.sewa-dp-months { display: flex; gap: 28px; }
.sewa-dp-month { flex: 1 1 0; min-width: 0; }
.sewa-dp-mtitle { height: 44px; line-height: 44px; text-align: center; font-weight: 600; font-size: 16px; text-transform: capitalize; }
.sewa-dp-nav {
	position: absolute; top: 0; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
	background: transparent; border: 0; border-radius: 50%; font-size: 28px; line-height: 1; color: var(--sewa-text); cursor: pointer;
}
.sewa-dp-prev { left: -6px; }
.sewa-dp-next { right: -6px; }
.sewa-dp-nav:hover:not(:disabled), .sewa-dp-nav:focus-visible { background: var(--sewa-bg-soft); }
.sewa-dp-nav:disabled { opacity: .25; cursor: default; }
.sewa-dp-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.sewa-dp-wdc { height: 28px; line-height: 28px; text-align: center; font-size: 12px; font-weight: 600; color: var(--sewa-muted); text-transform: uppercase; }
.sewa-dp-cell { position: relative; height: 46px; display: flex; align-items: center; justify-content: center; }
.sewa-dp-cell.has-band::before { content: ""; position: absolute; top: 2px; bottom: 2px; left: 0; right: 0; background: #ffe8ed; }
.sewa-dp-cell.band-start::before { left: 50%; }
.sewa-dp-cell.band-end::before { right: 50%; }
.sewa-dp-day {
	position: relative; width: 44px; height: 44px; margin: 0; padding: 0; background: transparent; border: 0; border-radius: 50%;
	font: inherit; font-size: 15px; font-weight: 500; color: var(--sewa-text); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.sewa-dp-day:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--sewa-text); }
.sewa-dp-day:focus-visible { outline: 2px solid var(--sewa-navy); outline-offset: 1px; }
.sewa-dp-day.is-today { text-decoration: underline; text-underline-offset: 3px; }
.sewa-dp-day:disabled { color: #c4c4c4; text-decoration: line-through; cursor: default; }
.sewa-dp-day.in-range { color: var(--sewa-text); }
.sewa-dp-day.is-start, .sewa-dp-day.is-end { background: var(--sewa-accent); color: #fff; }
.sewa-dp-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--sewa-line); }
.sewa-dp-clear {
	min-height: 44px; padding: 0 6px; background: transparent; border: 0; font: inherit; font-weight: 600; font-size: 15px;
	color: var(--sewa-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.sewa-dp-sum { flex: 1 1 auto; min-width: 0; text-align: center; font-size: var(--sewa-font-size-sm); color: var(--sewa-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sewa-dp .sewa-dp-done { min-height: 44px; margin: 0; padding: 0 26px; border-radius: var(--sewa-radius-pill); font-size: 15px; line-height: 44px; }

/* Phones: bottom sheet, one month, page scroll locked while open. */
.sewa-dp.is-sheet .sewa-dp-backdrop { background: rgba(15, 23, 42, .45); }
.sewa-dp.is-sheet .sewa-dp-panel {
	left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; max-height: 92vh; overflow-y: auto;
	padding: 16px 12px calc(12px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; overscroll-behavior: contain;
}
.sewa-dp.is-sheet .sewa-dp-head, .sewa-dp.is-sheet .sewa-dp-hint { padding: 0 4px; }
.sewa-dp.is-sheet .sewa-dp-prev { left: 0; }
.sewa-dp.is-sheet .sewa-dp-next { right: 0; }
.sewa-dp.is-sheet .sewa-dp-foot { position: sticky; bottom: calc(-12px - env(safe-area-inset-bottom)); background: #fff; padding-bottom: 4px; }
html.sewa-dp-lock, html.sewa-dp-lock body { overflow: hidden; }
@media (max-width: 767px) {
	.sewa-dates-bar { margin-bottom: 14px; }
}
@media (prefers-reduced-motion: no-preference) {
	.sewa-dp.is-sheet .sewa-dp-panel { animation: sewa-dp-up .18s ease-out; }
	@keyframes sewa-dp-up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
}

/* Listeo's daterangepicker (booking widget) on phones — visual review N6: the selected range on its own row, then
   Cancel and Apply side by side (Listeo's inline-block row wrapped "Apply" alone onto a second line). */
@media (max-width: 767px) {
	.daterangepicker.show-calendar:not(.auto-apply) .drp-buttons {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: center;
		gap: 8px;
		line-height: 1.3;
	}
	.daterangepicker.show-calendar:not(.auto-apply) .drp-buttons .drp-selected {
		flex: 1 0 100%;
		padding: 0;
		text-align: center;
	}
	.daterangepicker.show-calendar:not(.auto-apply) .drp-buttons button.applyBtn,
	.daterangepicker.show-calendar:not(.auto-apply) .drp-buttons button.cancelBtn {
		flex: 1 1 0;
		max-width: 180px;
		min-height: 44px;
		margin: 0;
	}
}
