/* MLS Genie Market Data Frontend Styles */

:root {
	--mlsg-white:        #ffffff;
	--mlsg-bg-bare:      #fafafa;
	--mlsg-wp-border-lt: #ccd0d4;
}

.mlsg-wrap.wrap .mlsg-card {
    width: stretch;
    width: -webkit-fill-available;
    padding: 20px;
}

/* Universal width containment. Previously the card was only capped under
   .mlsg-wrap.wrap (admin) or .mlsg-async-block (front-end async). In the
   Elementor editor the chart renders synchronously with neither wrapper, so
   the fixed-width chart SVG escaped its container. Cap the card and let the
   scroll wrapper handle wide charts in every context. */
.mlsg-card {
    max-width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--mlsg-wp-border-lt);
    background: var(--mlsg-white);
    padding: 12px;
    border-radius: 8px;
    overflow: visible;
}

.mlsg-md-chart-scroll {
    max-width: 100%;
    overflow-x: auto;
}

.mlsg-card-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.mlsg-report-scope {
    flex-basis: 100%;
    margin: 0 0 5px 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: #64748b;
}

.mlsg-report-scope strong {
    color: #475569;
}

svg.mlsg-chart {
    min-width: stretch;
    min-width: -webkit-fill-available;
}

.mlsg-async-block .mlsg-card {
	border: 1px solid var(--mlsg-wp-border-lt);
	background: var(--mlsg-white);
	padding: 12px;
	border-radius: 8px;
	width: -webkit-fill-available;
	overflow: visible;
}

.mlsg-card-title {
    position: sticky;
    left: 0;
    font-size: 18px;
	font-weight: 600;
	margin: 0 0 8px 0;
}

.mlsg-card-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 8px 0;
	font-size:0.875em;
	color: #50575e;
}

.mlsg-card-legend .mlsg-card-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.mlsg-market-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px 0;
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
}
.mlsg-market-badge__detail {
	font-weight: 400;
	opacity: 0.85;
}
.mlsg-market-badge--buyer {
	background: #fef3c7;
	color: #92400e;
}
.mlsg-market-badge--seller {
	background: #dcfce7;
	color: #166534;
}
.mlsg-market-badge--balanced {
	background: #e0f2fe;
	color: #075985;
}

.mlsg-card .mlsg-logo-small,
.mlsg-report .mlsg-logo-small {
	height: 15px;
	width: auto;
}




/******************************
***** TABLES ******************
******************************/

.mlsg-series-wrap {
	width: -webkit-fill-available;
	padding: 20px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

table.mlsg-series-table {
	border-spacing: 0;
	background: var(--mlsg-white);
	border: 1px solid #d9d9d9;
	border-radius: 8px;
	overflow: hidden;
	width: stretch;
	width: -webkit-fill-available;
	min-width: 900px;
}

table.mlsg-series-table thead th {
	background: #000000;
	color: var(--mlsg-white);
	font-weight: 700;
	font-size:1em;
	padding: 15px 20px !important;
	text-align: left;
	border-bottom: 1px solid #000000;
	white-space: nowrap;
}

.mlsg-series-title {
	text-transform: capitalize;
	font-size: larger;
	position: sticky;
	left: 0;
}

table.mlsg-series-table tbody td {
	padding: 12px 20px !important;
	font-size:1em;
	font-weight: 500;
	color: #1f1f1f;
	border-top: 1px solid #e6e6e6;
	vertical-align: middle;
	white-space: nowrap;
	transition: 250ms;
}

table.mlsg-series-table thead th + th,
table.mlsg-series-table tbody td + td {
	border-left: 1px solid #d9d9d9;
}

table.mlsg-series-table tbody tr:nth-child(even) td {
	background: #fbfbfb;
}

table.mlsg-series-table tbody tr:hover td {
	background: #E4E4E4;
	font-size: 1.1rem;
	padding: 12px 1rem !important;
}

table.mlsg-series-table thead th:not(:first-child),
table.mlsg-series-table tbody td:not(:first-child) {
	text-align: right;
}




/****************************
***** REPORTS ***************
****************************/

.mlsg-report {
	display: flex;
	flex-direction: column;
	width: stretch;
	width: -webkit-fill-available;
	border: 1px solid var(--mlsg-wp-border-lt);
	background: var(--mlsg-white);
	border-radius: 10px;
	padding: 18px;
	text-align: left;
}

.mlsg-report .mlsg-title-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mlsg-report .mlsg-title-box .mlsg-report-title {
	margin: 0;
	font-size: 30px;
	line-height: 1.1;
	font-weight: 700;
}

.mlsg-report .mlsg-report-subtitle {
	font-size:1em;
	line-height: normal;
}

.mlsg-report-list {
	display: flex;
	flex-direction: column;
}

.mlsg-report-row {
	display: flex;
	gap: 10px;
	width: stretch;
	width: -webkit-fill-available;
	border-bottom: 1px dotted lightgray;
	align-items: center;
	padding: 8px 12px;
	transition: 250ms;
}

.mlsg-report-row:first-child {
	border-top: 1px dotted lightgray;
}

.mlsg-report-row:hover {
	background: #f2f2f2 !important;
	margin-top: -1px;
	padding-top: 9px;
}

.mlsg-report-value {
	display: flex;
	font-size: 20px;
	font-weight: 700;
	max-height: 33px;
	min-width: 140px;
	white-space: nowrap;
	align-content: center;
	align-items: center;
}

.mlsg-report-value span {
	justify-content: flex-start;
	font-size: inherit;
	font-weight: inherit;
}

.mlsg-report-label {
	font-size: 18px;
	line-height: 1.25;
	color: #30363c;
	flex: auto;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.mlsg-report-label__name {
	display: block;
	font-weight: 500;
}

/* v1.8.298 — always-visible explainer sub-line (replaces tooltips on report
   items so nothing blocks taps on mobile). 0.75em of the 18px label = 13.5px.
   #586069 on #fff ≈ 6.0:1, on the #f2f2f2 hover state ≈ 5.6:1 — both pass
   WCAG 2.1 AA for normal text. */
.mlsg-report-label__desc {
	display: block;
	font-size: 0.75em;
	line-height: 1.35;
	color: #586069;
	font-weight: 400;
}

.mlsg-report p.mlsg-report-summary-text {
	font-size: 18px;
	line-height: 1.5 !important;
	margin-bottom: 0;
    padding: 15px 0;
}

.mlsg-report-summary button {
    border-radius: 3px;
    padding: 5px 12px;
    border-width: 1px;
}

.mlsg-report-summary a:hover button {
    background: black;
    color: white;
}

label.mlsg-report-date {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 5px;
	font-size:0.875em;
	font-weight: normal;
    color:#555
}




/************************
***** SHARED FOOTER *****
************************/

.mlsg-shared-footer {
	position: sticky;
	left: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: space-between;
	font-size:0.875em;
	padding: 15px 0 5px;
	border-top: 1px dotted silver;
}

.mlsg-footer-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    font-size: 1rem;
    line-height: 1.25;
}

.mlsg-presented-by {
    display: flex;
    align-items: center;
    gap: 5px;
}

img.mlsg-presented-by-icon {
    height: 16px;
    width: auto;
}

.mlsg-credit span {
	display: flex;
}

.mlsg-credit {
	display: flex;
	gap: 5px;
	font-size:0.875em;
	align-items: baseline;
	transition: 250ms;
}

.mlsg-credit a {
	display: flex;
}

img.mlsg-logo-small {
	height: 15px;
	width: auto;
	filter: grayscale(100);
}

img.mlsg-logo-small:hover {
	filter: grayscale(0) !important;
}

.mlsg-data-disclaimer {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px;
    line-height: 1.5;
    font-size:0.65em;
    opacity: .65;
}




/**************************
**** HOME VALUE BADGE *****
**************************/

#mlsg-median-home-value {
    background: black;
    color: white;
    font-size:1em;
    text-align: center;
    border-radius: 5px;
}

#mlsg-median-home-value span.mlsg-async-load { justify-content: center; font-size: 1.4em; font-weight: 600; transform: translate(0,-4px); }

#mlsg-median-home-value small {
    display: block;
    font-size:0.75em;
    margin-top: -10px;
}

@media screen and (max-width: 620px) {

    span.mlsg-clear.center {
        display: flex;
        flex-direction: column;
        justify-content: center;
        font-size:1em
    }

}


body.custom-market-report-page div#roxxi_footer {
    display: none;
}

body.custom-market-report-page button#AccessWidget {
    display: none;
}




/*****************************
***** TOOLTIPS ***************
*****************************/

.mlsg-market-trend-badge {
	background: var(--mlsg-bg-bare);
	color: black;
	font-size:0.875em;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-align: center;
	margin-top: 5px;
	padding: 4px 8px;
	border-radius: 4px;
}




/*****************************
***** MEDIA QUERIES **********
*****************************/

@media (max-width: 767px) {
	table.mlsg-series-table thead th,
	table.mlsg-series-table tbody td {
		padding: 12px 14px;
	}
}

@media screen and (max-width: 480px) {
    
    .mlsg-report-row {
        flex-direction: column;
        align-items: flex-start;;
        gap: 0;
        line-height: normal;
        padding: 20px 10px;
    }

    .mlsg-report-row:hover {
    	background: #f2f2f2 !important;
    	margin-top: -1px;
    	padding-top: 21px;
    }

}
/* =========================================================================
 * Chart Narratives (v1.8.285) — AI-generated descriptive paragraph that
 * appears below [mls_market_card] charts when narrative="1" is set.
 * ========================================================================= */

.mlsg-chart-narrative {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 20px 15px;
    flex: 1 1 100%;
    align-self: stretch;
    clear: both;
    line-height: 1.55;
    color: inherit;
    text-align: left;
}

.mlsg-chart-narrative__body p {
    margin: 0 0 0.625rem 0;
}

.mlsg-chart-narrative__body p:last-child {
    margin-bottom: 0;
}

.mlsg-chart-narrative__disclaimer {
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.4;
}

.mlsg-chart-narrative__disclaimer i {
    margin-right: 0.25rem;
    color: #94a3b8;
}

.mlsg-chart-narrative--pending .mlsg-chart-narrative__body em {
    font-style: italic;
    color: #64748b;
}
