/* Simple Property Data Lookup — frontend styles */

.spdl-lookup {
	max-width: 720px;
	margin: 0 auto;
}

.spdl-form-row {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

/* Explicit light background + dark text so the form stays readable on
   dark theme rows. */
.spdl-address-input,
.spdl-password-input,
.spdl-email-input {
	flex: 1 1 260px;
	padding: 10px 12px;
	font-size: 17px;
	border: 1px solid var(--border-default, #dcdcdc);
	border-radius: 4px;
	min-width: 0;
	background: #ffffff;
	color: var(--md-text-high, rgba(8, 8, 8, 0.87));
}

.spdl-address-input::placeholder,
.spdl-password-input::placeholder,
.spdl-email-input::placeholder {
	color: var(--text-muted, rgba(8, 8, 8, 0.6));
}

.spdl-address-input:focus,
.spdl-password-input:focus,
.spdl-email-input:focus {
	/* Portal/property parity (v2.6.2): inset rust is the focus indicator. */
	outline: none;
	border-color: var(--md-primary, #a85f2e);
	box-shadow: inset 0 0 0 1px var(--md-primary, #a85f2e);
}

.spdl-button {
	padding: 10px 20px;
	font-size: 17px;
	border: 0;
	border-radius: 4px;
	/* rust-700 for text-bearing filled buttons (portal design rule). */
	background: var(--md-primary, #a85f2e);
	color: var(--md-on-primary, #ffffff);
	cursor: pointer;
}

.spdl-button:hover,
.spdl-button:focus {
	background: var(--md-primary-variant, #8a4d25);
	color: var(--md-on-primary, #ffffff);
}

.spdl-button:disabled {
	opacity: 0.6;
	cursor: default;
}

.spdl-gate-intro,
.spdl-email-intro {
	margin: 0 0 8px;
}

/* The gate sits directly on the page (dark-blue theme background). */
.spdl-gate-intro {
	color: var(--text-on-dark, rgba(255, 255, 255, 1));
}

.spdl-message {
	margin-top: 12px;
	padding: 10px 12px;
	border-radius: 4px;
	background: #eef6ee;
	border: 1px solid #9dc79d;
	color: var(--md-text-high, rgba(8, 8, 8, 0.87));
}

.spdl-message--error {
	background: #fbeaea;
	border-color: #d98b8b;
}

/* Solid white card so the data is readable regardless of the theme /
   row background behind it. */
.spdl-output {
	margin-top: 20px;
}

.spdl-results {
	background: var(--md-background, #fcfefe);
	color: var(--md-text-high, rgba(8, 8, 8, 0.87));
	padding: 16px 20px;
	border-radius: 6px;
	max-width: 100%;
	overflow-x: hidden;
}

.spdl-results-address {
	margin: 0 0 12px;
	color: var(--md-text-high, rgba(8, 8, 8, 0.87));
}

/* Always-visible blocks: Summary Items, Property Links. */
.spdl-block {
	margin-bottom: 18px;
}

.spdl-block-title {
	margin: 0 0 6px;
	padding-bottom: 4px;
	font-size: 18px;
	font-weight: 700;
	color: var(--md-text-high, rgba(8, 8, 8, 0.87));
	border-bottom: 2px solid var(--md-primary, #D2793D);
}

.spdl-links-row {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
	padding-top: 4px;
}

/* Rust action language (v2.6.2) — the last sky-blue link path after the
   portal/builder rust pass in v2.6.1. !important beats theme a/a:visited. */
.spdl-link {
	color: var(--md-primary, #a85f2e) !important;
	text-decoration: underline;
	font-size: 16px;
	line-height: 1.5;
	background: none;
}

.spdl-link:hover,
.spdl-link:focus {
	color: var(--md-primary-variant, #8a4d25) !important;
	text-decoration: underline;
}

/* Accordion sections (native <details>, closed by default). */
.spdl-section {
	margin-bottom: 10px;
	border-bottom: 1px solid var(--border-default, #dcdcdc);
}

.spdl-section-title {
	margin: 0;
	padding: 8px 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--md-text-high, rgba(8, 8, 8, 0.87));
	cursor: pointer;
	list-style: none;
	position: relative;
	padding-right: 28px;
}

.spdl-section-title::-webkit-details-marker {
	display: none;
}

.spdl-section-title::after {
	content: "+";
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--md-primary, #D2793D);
	font-size: 20px;
	font-weight: 700;
	line-height: 1;
}

details[open] > .spdl-section-title::after {
	content: "\2212"; /* − */
}

.spdl-section-title:hover::after {
	color: var(--md-primary-variant, #a85f2e);
}

.spdl-section-body {
	padding: 2px 0 12px;
}

.spdl-results-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 16px;
	background: transparent;
}

.spdl-results-table th,
.spdl-results-table td {
	text-align: left;
	padding: 6px 14px 6px 0;
	border-bottom: 1px solid var(--border-default, #dcdcdc);
	vertical-align: top;
	color: var(--md-text-high, rgba(8, 8, 8, 0.87));
	background: transparent;
}

.spdl-results-table th {
	font-weight: 600;
	white-space: normal;
	overflow-wrap: break-word;
	width: 40%;
}

.spdl-results tr:last-child th,
.spdl-results tr:last-child td {
	border-bottom: 0;
}

.spdl-rc-calc {
	white-space: nowrap;
	color: var(--color-charcoal-700, #434343);
}

/* High specificity + !important: themes commonly strip borders on
   number inputs, which made this invisible as a fillable field. */
.spdl-results input.spdl-rc-rate {
	width: 80px;
	padding: 2px 6px;
	font-size: 15px;
	border: 2px solid var(--md-secondary, #15445D) !important;
	border-radius: 4px;
	background: var(--color-sky-100, #e3f1fa) !important;
	box-shadow: none !important;
	color: var(--md-text-high, rgba(8, 8, 8, 0.87)) !important;
	margin: 0 2px;
}

.spdl-results input.spdl-rc-rate:focus {
	border-color: var(--md-primary, #a85f2e) !important;
	outline: none;
	box-shadow: inset 0 0 0 1px var(--md-primary, #a85f2e) !important;
}

.spdl-hint {
	display: block;
	color: var(--text-muted, rgba(8, 8, 8, 0.6));
	font-size: 14px;
	margin-top: 2px;
}

.spdl-item-label {
	margin: 10px 0 2px;
	font-weight: 700;
	color: var(--md-text-high, rgba(8, 8, 8, 0.87));
}

.spdl-list {
	color: var(--md-text-high, rgba(8, 8, 8, 0.87));
}

.spdl-nested {
	margin: 0 0 6px 14px;
}

.spdl-email-form {
	margin-top: 20px;
	padding: 14px;
	background: var(--surface-sunken, #ececec);
	border-radius: 4px;
	color: var(--md-text-high, rgba(8, 8, 8, 0.87));
}

/* Narrow screens: let labels and the RC math wrap instead of forcing
   the tables wider than the viewport (iPhone Safari bleed). */
@media (max-width: 600px) {
	.spdl-results {
		padding: 12px 14px;
	}

	.spdl-results-table {
		table-layout: fixed;
	}

	.spdl-results-table th {
		white-space: normal;
		width: 42%;
		overflow-wrap: break-word;
	}

	.spdl-results-table td {
		overflow-wrap: anywhere;
	}

	/* The editable RC math drops to its own line under the estimate. */
	.spdl-rc-calc {
		display: block;
		white-space: normal;
		margin-top: 4px;
	}

	.spdl-rc-rate {
		width: 70px;
	}
}

/* Keep Google's suggestion dropdown above theme elements. */
.pac-container {
	z-index: 100000;
}

/* REAPI suggestion dropdown (used only when no Google Maps key is
   configured). The wrapper replaces the input as the flex child, so it
   inherits the input's flex sizing. */
.spdl-suggest {
	position: relative;
	flex: 1 1 260px;
	min-width: 0;
}

.spdl-suggest .spdl-address-input {
	width: 100%;
	flex: none;
}

.spdl-suggest-list {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 100000;
	margin: 2px 0 0;
	padding: 0;
	list-style: none;
	background: #ffffff;
	border: 1px solid var(--border-default, #dcdcdc);
	border-radius: 4px;
	box-shadow: var(--elevation-4, 0 2px 4px -1px rgba(8, 8, 8, 0.2), 0 4px 5px 0 rgba(8, 8, 8, 0.14), 0 1px 10px 0 rgba(8, 8, 8, 0.12));
	max-height: 280px;
	overflow-y: auto;
}

.spdl-suggest-list li {
	margin: 0;
	padding: 8px 12px;
	font-size: 16px;
	color: var(--md-text-high, rgba(8, 8, 8, 0.87));
	cursor: pointer;
}

.spdl-suggest-list li[aria-selected="true"],
.spdl-suggest-list li:hover {
	background: var(--color-sky-100, #e3f1fa);
}

