/**
 * MLS Genie — Open House sidebar widget.
 * Ships its own complete look using its own CSS variables — never a
 * theme's (Houzez's or any other's). High-specificity selectors so this
 * always wins over a host theme's generic sidebar/.widget styling,
 * whichever theme that is — the widget looks the same everywhere.
 */

/**
 * The outer <div class="widget ..."> wrapper is generated by the host
 * theme's own sidebar registration (before_widget/after_widget), so its
 * padding/margin varies theme to theme — Houzez's own wrapper happens to
 * add Bootstrap-style p-4/mb-4 utility classes, themselves !important.
 * A single-class selector with !important is a coin flip against another
 * single-class !important rule — whichever loads last on the page wins,
 * not whichever "should". Combining both classes on one selector
 * (.widget.widget_mlsg_open_house_widget) has higher specificity than
 * Houzez's single-class .p-4/.mb-4 rules, so it wins regardless of load
 * order — not by luck. `.widget_mlsg_open_house_widget` itself is NOT
 * Houzez-specific — WordPress core appends `widget_{id_base}` to that
 * wrapper for every widget, on every theme; only `.widget` (the generic
 * half of the combined selector) is a normal, near-universal WP theme
 * convention, not something specific to Houzez.
 */
.widget.widget_mlsg_open_house_widget {
	padding: 0 !important;
	margin: 0 0 20px !important;
}

.mlsg-oh-widget-wrap {
	--mlsg-oh-accent: #9a2f2f;
	--mlsg-oh-accent-text: #ffffff;
	--mlsg-oh-radius: 6px;
	--mlsg-oh-border: #e2e2e2;
	--mlsg-oh-text: #1f2328;
	--mlsg-oh-muted: #6b7280;

	display: block !important;
	background: #ffffff !important;
	border-radius: var(--mlsg-oh-radius) !important;
	overflow: hidden;
	padding: 0 !important;
	font-family: inherit;
}
.mlsg-oh-widget-wrap--square {
	--mlsg-oh-radius: 0px;
}

aside#sidebar .mlsg-oh-widget-wrap {
	border-radius: inherit !important;
	color: var(--mlsg-oh-border) !important;
}

.mlsg-oh-widget-wrap .mlsg-oh-widget__header {
	display: flex !important;
	align-items: center !important;
	background: var(--mlsg-oh-accent) !important;
	color: var(--mlsg-oh-accent-text) !important;
	font-size: 1.05em !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	padding: 14px 18px !important;
	margin: 0 !important;
}

.mlsg-oh-widget-wrap .mlsg-oh-widget__body {
	padding: 16px 18px !important;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.mlsg-oh-widget-wrap .mlsg-oh-widget__event {
	padding-bottom: 14px;
	border-bottom: 1px solid var(--mlsg-oh-border);
}
.mlsg-oh-widget-wrap .mlsg-oh-widget__event:last-child {
	padding-bottom: 0;
	border-bottom: none;
}

.mlsg-oh-widget-wrap .mlsg-oh-widget__link {
	display: block !important;
	font-weight: 600;
	color: var(--mlsg-oh-text) !important;
	text-decoration: none !important;
	margin-bottom: 6px !important;
}
.mlsg-oh-widget-wrap .mlsg-oh-widget__link:hover {
	text-decoration: underline !important;
}

.mlsg-oh-widget-wrap .mlsg-oh-widget__row {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 10px;
}

.mlsg-oh-widget-wrap .mlsg-oh-widget__when {
	font-weight: 500;
	color: var(--mlsg-oh-text);
    line-height: 1.2;
    padding-top: 8px;
}

/* Date on its own line, time range on the next. */
.mlsg-oh-widget-wrap .mlsg-oh-widget__date,
.mlsg-oh-widget-wrap .mlsg-oh-widget__time {
	display: block !important;
}
.mlsg-oh-widget-wrap .mlsg-oh-widget__time {
	font-weight: 500 !important;
	color: var(--mlsg-oh-muted) !important;
}

.mlsg-oh-widget-wrap .mlsg-oh-widget__cal-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 30px !important;
	height: 30px !important;
	border-radius: 50% !important;
	background: #f3f4f6 !important;
	color: var(--mlsg-oh-accent) !important;
	text-decoration: none !important;
	font-size: 13px !important;
	border: 1px solid var(--mlsg-oh-border) !important;
	transition: background .15s, color .15s;
	flex-shrink: 0;
	margin-left: auto;
}
.mlsg-oh-widget-wrap .mlsg-oh-widget__cal-btn:hover {
	background: var(--mlsg-oh-accent) !important;
	color: var(--mlsg-oh-accent-text) !important;
}

/* v1.9.208 — site-wide list as media cards (Recently Viewed style) */
.mlsg-oh-widget__event--card {
	display: flex;
	gap: 0.875rem;
	padding: 0.875rem 0;
	border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
}
.mlsg-oh-widget__event--card:last-child {
	border-bottom: 0;
}
.mlsg-oh-widget__thumb-img {
	width: 100px;
	height: stretch;
	object-fit: cover;
	border-radius: 4px;
	display: block;
}
.mlsg-oh-widget__event--card .mlsg-oh-widget__link {
	line-height: 1.33;
	text-decoration: none;
}
.mlsg-oh-widget__price {
    font-size: 1rem;
	color: #111827;
    line-height: 1.2;
}

/* v1.9.211 — optional "view all" footer link (site-wide list) */
.mlsg-oh-widget-wrap .mlsg-oh-widget__view-all {
	display: block;
	padding-top: 0.25rem;
	font-weight: 600;
	color: var(--mlsg-oh-accent);
	text-decoration: none;
}
.mlsg-oh-widget-wrap .mlsg-oh-widget__view-all:hover {
	text-decoration: underline;
}
.mlsg-oh-widget-wrap .mlsg-oh-widget__view-all i {
	font-size: 0.8125rem;
	margin-left: 0.25rem;
}
