/* Open House front-end: Add-OH modal + listing notification bar. */

/* ---------- modal shell ---------- */
.hd-oh-overlay[hidden],
.hd-oh-daycard[hidden] {
	display: none !important; /* author display rules beat the hidden attr */
}
.hd-oh-overlay {
	position: fixed;
	inset: 0;
	z-index: 99990;
	background: rgba(16, 28, 34, 0.55);
	backdrop-filter: blur(3px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.hd-oh-modal {
	position: relative;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 24px 80px rgba(10, 20, 26, 0.45);
	width: min(760px, 100%);
	max-height: 92vh;
	overflow: auto;
	padding: 26px 30px 22px;
	font-family: inherit;
}
.hd-oh-close {
	position: absolute;
	top: 10px;
	right: 14px;
	border: 0;
	background: none;
	font-size: 30px;
	line-height: 1;
	color: #7a878d;
	cursor: pointer;
}
.hd-oh-close:hover { color: #263238; }
#hd-oh-title {
	margin: 0 0 24px;
	font-size: 30px;
	font-weight: 600;
	color: #263238;
	text-align: center;
}
.hd-oh-title__text {
	position: relative;
	display: inline-block;
	padding-bottom: 6px;
}
.hd-oh-title__line {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 4px;
	border-radius: 2px;
	background: linear-gradient(90deg, #16add0, #27c4e5);
	transform: scaleX(0);
	transform-origin: left center;
}
.hd-oh-overlay.hd-oh-open .hd-oh-title__line {
	animation: hd-oh-underline 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}
@keyframes hd-oh-underline {
	to { transform: scaleX(1); }
}
.hd-oh-cols {
	display: flex;
	gap: 34px;
	align-items: flex-start;
}
.hd-oh-left { flex: 0 0 300px; }
.hd-oh-right {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-self: stretch;
}
.hd-oh-slider-block { width: 100%; }
@media (max-width: 700px) {
	.hd-oh-cols { flex-direction: column; }
	.hd-oh-left { flex-basis: auto; width: 100%; }
	.hd-oh-right { width: 100%; }
}

/* ---------- calendar ---------- */
.hd-oh-cal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}
.hd-oh-cal-title { font-weight: 600; color: #263238; }
.hd-oh-nav {
	border: 1px solid #dfe6e9;
	background: #fff;
	border-radius: 8px;
	width: 30px;
	height: 30px;
	font-size: 18px;
	line-height: 1;
	color: #16add0;
	cursor: pointer;
	transition: background 0.15s;
}
.hd-oh-nav:hover { background: #eaf7fb; }
.hd-oh-cal-dow,
.hd-oh-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}
.hd-oh-cal-dow span {
	text-align: center;
	font-size: 11px;
	font-weight: 600;
	color: #90a0a7;
	padding: 3px 0 5px;
}
.hd-oh-day {
	position: relative;
	aspect-ratio: 1;
	border: 1px solid #eef2f4;
	border-radius: 8px;
	background: #fff;
	font-size: 13px;
	color: #37474f;
	cursor: pointer;
	transition: background 0.12s, border-color 0.12s, transform 0.12s;
	padding: 0;
}
.hd-oh-day:hover { background: #eaf7fb; border-color: #9fdcee; }
.hd-oh-day--out { opacity: 0.32; }
.hd-oh-day--past { opacity: 0.35; cursor: not-allowed; }
.hd-oh-day--today {
	background: #eaf7fb;
	border-color: #16add0;
	font-weight: 700;
	color: #0d7d99;
}
.hd-oh-day--sel {
	background: #16add0;
	border-color: #16add0;
	color: #fff;
	font-weight: 700;
	transform: scale(1.05);
}
.hd-oh-day__count {
	position: absolute;
	top: -5px;
	right: -5px;
	min-width: 17px;
	height: 17px;
	border-radius: 9px;
	background: #dc1c2e;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 17px;
	padding: 0 4px;
	box-shadow: 0 1px 4px rgba(220, 28, 46, 0.5);
}
.hd-oh-selected { margin-top: 14px; font-size: 13px; }
.hd-oh-selected__label { font-weight: 600; color: #263238; }
.hd-oh-selected__list { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.hd-oh-selected__list em { color: #90a0a7; font-size: 12px; }
.hd-oh-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #eaf7fb;
	border: 1px solid #bfe6f2;
	color: #0d7d99;
	border-radius: 20px;
	padding: 3px 10px;
	font-size: 12px;
	font-weight: 600;
}
.hd-oh-chip button {
	border: 0;
	background: none;
	color: #0d7d99;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	padding: 0;
}

/* ---------- hover day card (inherits sidebar OH card styling) ---------- */
.hd-oh-daycard {
	position: fixed;
	z-index: 99995;
	width: 262px;
	background: transparent;
	padding: 0;
	border: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.hd-oh-daycard[hidden] { display: none !important; }
.hd-oh-cardlink { border-radius: 8px; overflow: hidden; }
.hd-oh-cardlink {
	position: relative;
	display: block;
	text-decoration: none !important;
	cursor: pointer;
}
.hd-oh-cardlink::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0);
	transition: background 0.15s ease;
}
.hd-oh-cardlink:hover::after { background: rgba(255, 255, 255, 0.14); }
.hd-oh-daycard .es-listing { margin: 0; }
.hd-oh-daycard .es-listing__image { position: relative; }
.hd-oh-daycard .es-listing__image img {
	display: block;
	width: 100%;
	height: 168px;
	object-fit: cover;
}
.hd-oh-daycard .hd-oh-cardlink {
	box-shadow: 0 12px 36px rgba(10, 20, 26, 0.4);
}
.hd-oh-daycard .es-listing__content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 20px 12px 10px;
	background: none;
}
.hd-oh-daycard .es-listing__content h3,
.hd-oh-daycard .es-listing__content h3 a,
.hd-oh-daycard .hd-oh-when {
	text-shadow: 0 2px 8px rgba(10, 20, 26, 0.85), 0 1px 2px rgba(10, 20, 26, 0.7);
}
.hd-oh-daycard .es-listing__content h3 {
	margin: 0 0 3px;
	font-size: 14px;
	line-height: 1.35;
	font-weight: 700;
	color: #ffffff;
}
.hd-oh-daycard .hd-oh-when {
	color: #ffffff;
	font-size: 12.5px;
	font-weight: 500;
	opacity: 0.92;
}
.hd-oh-daycard .hd-oh-more {
	align-self: center;
	font-size: 11px;
	font-weight: 700;
	color: #fff;
	background: rgba(16, 28, 34, 0.72);
	border-radius: 12px;
	padding: 3px 12px;
}

/* ---------- time slider ---------- */
.hd-oh-time-label {
	display: block;
	text-align: center;
	font-weight: 600;
	color: #263238;
	margin-bottom: 34px; /* room for the handle tips */
}
.hd-oh-slider {
	position: relative;
	height: 34px;
	margin: 0 12px;
}
.hd-oh-slider__track,
.hd-oh-slider__fill {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	height: 6px;
	border-radius: 3px;
}
.hd-oh-slider__track { left: 0; right: 0; background: #e4ebee; }
.hd-oh-slider__fill { background: linear-gradient(90deg, #16add0, #27c4e5); }
.hd-oh-handle {
	position: absolute;
	z-index: 2;
	top: 50%;
	width: 24px;
	height: 24px;
	margin: -12px 0 0 -12px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid #16add0;
	box-shadow: 0 2px 8px rgba(22, 173, 208, 0.4);
	cursor: grab;
	padding: 0;
	touch-action: none;
	transition: box-shadow 0.15s;
}
.hd-oh-handle:active { cursor: grabbing; box-shadow: 0 2px 14px rgba(22, 173, 208, 0.75); }
.hd-oh-handle__tip {
	position: absolute;
	bottom: calc(100% + 7px);
	left: 50%;
	transform: translateX(-50%);
	font-size: 10px;
	font-weight: 700;
	color: #0d7d99;
	background: #eaf7fb;
	border: 1px solid #bfe6f2;
	border-radius: 8px;
	padding: 1px 6px;
	white-space: nowrap;
	pointer-events: none;
}
.hd-oh-slider__scale {
	position: relative;
	height: 15px;
	margin: 12px 12px 0; /* mirror the track's side margins so labels center under the rings */
	font-size: 11px;
	font-weight: 600;
	color: #90a0a7;
}
.hd-oh-slider__scale span {
	position: absolute;
	top: 0;
	transform: translateX(-50%);
	white-space: nowrap;
}
.hd-oh-slider__scale span:first-child { left: 0; }
.hd-oh-slider__scale span:last-child { left: 100%; }
/* cosmetic end anchors: empty rings under the handles' travel extremes */
.hd-oh-slider__end {
	position: absolute;
	top: 50%;
	width: 16px;
	height: 16px;
	margin: -8px 0 0 -8px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid #c7d1d6;
	z-index: 1;
	pointer-events: none;
}
.hd-oh-slider__end--min { left: 0; }
.hd-oh-slider__end--max { left: 100%; }
/* faint tether from each ring down to its time label */
.hd-oh-slider__end::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	width: 1px;
	height: 15px;
	background: #d9e0e4;
}
.hd-oh-times {
	margin: 18px 0 22px;
	font-size: 14px;
	color: #546e7a;
}
.hd-oh-times b { color: #0d7d99; font-size: 15px; }

/* ---------- glowing submit ---------- */
.hd-oh-submit {
	display: inline-block;
	border: 0;
	border-radius: 10px;
	background: linear-gradient(135deg, #e0212f, #b30f24);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.3px;
	padding: 13px 26px;
	cursor: pointer;
	animation: hd-oh-glow 2.2s ease-in-out infinite;
	transition: transform 0.15s;
}
.hd-oh-submit:hover { transform: translateY(-1px); }
.hd-oh-submit:disabled { opacity: 0.55; animation: none; cursor: wait; }
@keyframes hd-oh-glow {
	0%, 100% { box-shadow: 0 0 6px rgba(220, 28, 46, 0.45), 0 0 18px rgba(220, 28, 46, 0.25); }
	50%      { box-shadow: 0 0 14px rgba(220, 28, 46, 0.85), 0 0 34px rgba(220, 28, 46, 0.45); }
}
.hd-oh-status { min-height: 0; margin: 8px 0 0; font-size: 13px; font-weight: 600; }
.hd-oh-status:empty { margin: 0; }
.hd-oh-status.ok { color: #2e7d32; }
.hd-oh-status.err { color: #c62828; }

/* ---------- notification bar ---------- */
#hd-oh-bars[hidden] { display: none !important; }
.hd-oh-bar {
	position: relative;
	overflow: hidden;
	background: linear-gradient(100deg, #e0212f 0%, #c8102e 55%, #9c0c21 100%);
	border-radius: 8px;
	margin: 0 0 12px;
	min-height: 46px;
	cursor: pointer;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.hd-oh-bar:hover,
.hd-oh-bar:focus-visible {
	box-shadow: 0 0 16px rgba(220, 28, 46, 0.55), 0 6px 28px rgba(220, 28, 46, 0.35);
	transform: translateY(-1px);
	outline: none;
}
.hd-oh-bar__fx {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}
.hd-oh-bar__inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 14px;
	padding: 11px 18px;
	color: #fff;
}
.hd-oh-bar__badge {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 1.2px;
	background: rgba(255, 255, 255, 0.18);
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 20px;
	padding: 3px 12px;
	backdrop-filter: blur(2px);
}
.hd-oh-bar__when {
	font-size: 15px;
	font-weight: 600;
	text-shadow: 0 1px 4px rgba(120, 20, 5, 0.5);
}
@media (prefers-reduced-motion: reduce) {
	.hd-oh-bar__fx { display: none; }
	.hd-oh-submit { animation: none; }
}

/* selected time block under the slider */
.hd-oh-selected--time { margin-top: 18px; margin-bottom: 20px; }
.hd-oh-selected--time .hd-oh-chip b { color: #0d7d99; font-weight: 700; }

/* picks row: selected dates (left) + selected time (right) on one line */
.hd-oh-picks {
	display: flex;
	gap: 34px;
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid #eef2f4;
}
.hd-oh-picks .hd-oh-selected { flex: 0 0 300px; margin-top: 0; }
.hd-oh-picks .hd-oh-selected--time { flex: 1 1 auto; margin: 0; }
@media (max-width: 700px) {
	.hd-oh-picks { flex-direction: column; gap: 14px; }
	.hd-oh-picks .hd-oh-selected { flex-basis: auto; }
}
.hd-oh-actions {
	text-align: center;
	margin-top: 44px; /* 2x the 22px below: btn -> modal edge */
}
.hd-oh-actions .hd-oh-status { text-align: center; }

/* symmetric breathing room: crumbs -> bars == bars -> gallery */
#hd-oh-bars {
	display: flow-root; /* contain child margins */
	margin: 0 0 22px; /* crumbs supply their own 22px above */
}
#hd-oh-bars .hd-oh-bar:last-child { margin-bottom: 0; }

/* admin close on alert bars */
.hd-oh-bar__close {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	right: 10px;
	z-index: 3;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.65);
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s;
	padding: 0;
}
.hd-oh-bar__close:hover { background: rgba(255, 255, 255, 0.38); }
.hd-oh-bar__inner { padding-right: 46px; }
