/* Home Valuation Tool – frontend styles
   Scoped under .hvt-wrap so nothing leaks into the surrounding theme.
   Uses CSS var --hvt-primary set inline by the shortcode. */

.hvt-wrap {
    --hvt-primary: #0b6efd;
    --hvt-text: #1a1a1a;
    --hvt-muted: #6b7280;
    --hvt-border: #e5e7eb;
    --hvt-bg-soft: #f8fafc;
    --hvt-radius: 12px;
    color: var(--hvt-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.5;
}

.hvt-wrap *,
.hvt-wrap *::before,
.hvt-wrap *::after {
    box-sizing: border-box;
}

.hvt-card {
    background: #fff;
    border: 1px solid var(--hvt-border);
    border-radius: var(--hvt-radius);
    padding: 28px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    margin: 24px 0;
}

.hvt-logo {
    max-height: 56px;
    margin-bottom: 16px;
    display: block;
}

.hvt-title {
    font-size: 26px;
    margin: 0 0 8px;
    line-height: 1.2;
}

.hvt-sub {
    color: var(--hvt-muted);
    margin: 0 0 24px;
}

/* Form */
.hvt-form .hvt-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 520px) {
    .hvt-form .hvt-row { grid-template-columns: 1fr; }
}

.hvt-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
}

.hvt-field label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.hvt-field input {
    padding: 11px 12px;
    border: 1px solid var(--hvt-border);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: #fff;
    color: var(--hvt-text);
}

.hvt-field input:focus {
    outline: none;
    border-color: var(--hvt-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hvt-primary) 25%, transparent);
}

.hvt-submit {
    width: 100%;
    padding: 14px 18px;
    background: var(--hvt-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.15s, transform 0.05s;
}
.hvt-submit:hover { filter: brightness(0.95); }
.hvt-submit:active { transform: translateY(1px); }
.hvt-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.hvt-disclaimer,
.hvt-disclosure {
    font-size: 12px;
    color: var(--hvt-muted);
    margin: 12px 0 0;
}

.hvt-hp { position: absolute; left: -10000px; height: 0; width: 0; overflow: hidden; }

.hvt-error {
    margin-top: 12px;
    padding: 10px 12px;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-size: 14px;
}

/* Report */
.hvt-greeting {
    color: var(--hvt-muted);
    margin: 0 0 4px;
    font-size: 14px;
}

.hvt-headline {
    margin: 18px 0 28px;
    padding: 22px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--hvt-primary) 12%, #fff), #fff);
    border: 1px solid color-mix(in srgb, var(--hvt-primary) 25%, var(--hvt-border));
    border-radius: var(--hvt-radius);
    text-align: center;
}

.hvt-headline-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hvt-muted);
    margin-bottom: 8px;
}

.hvt-headline-range {
    font-size: 32px;
    font-weight: 700;
}

.hvt-headline-range .hvt-sep {
    margin: 0 8px;
    color: var(--hvt-muted);
}

.hvt-headline-mid {
    margin-top: 6px;
    color: var(--hvt-muted);
    font-size: 14px;
}

.hvt-headline-confidence {
    margin-top: 12px;
    font-size: 13px;
    color: var(--hvt-muted);
}

.hvt-section-title {
    margin: 28px 0 12px;
    font-size: 18px;
}

.hvt-estimates {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
@media (max-width: 640px) {
    .hvt-estimates { grid-template-columns: 1fr; }
}

.hvt-est-card {
    padding: 16px;
    border: 1px solid var(--hvt-border);
    border-radius: 10px;
    background: var(--hvt-bg-soft);
}

.hvt-est-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hvt-muted);
    margin-bottom: 4px;
}

.hvt-est-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--hvt-primary);
    margin-bottom: 6px;
}

.hvt-est-source {
    font-size: 12px;
    color: var(--hvt-muted);
}

.hvt-est-range {
    font-size: 12px;
    color: var(--hvt-muted);
    margin-bottom: 6px;
}

.hvt-est-note {
    margin-top: 6px;
    font-size: 12px;
    color: var(--hvt-muted);
    font-style: italic;
}

/* Rent card */
.hvt-rent-card {
    margin-top: 16px;
    padding: 18px;
    border: 1px solid var(--hvt-border);
    border-radius: 10px;
    background: linear-gradient(135deg, #f0fdf4, #fff);
    text-align: center;
}
.hvt-rent-card .hvt-est-value {
    color: #047857;
    font-size: 22px;
    margin: 4px 0;
}
.hvt-rent-card .hvt-est-source {
    margin-top: 4px;
}

/* Features grid */
.hvt-subsection-title {
    margin: 22px 0 10px;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hvt-muted);
}
.hvt-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 16px;
}
@media (max-width: 520px) {
    .hvt-features { grid-template-columns: 1fr; }
}
.hvt-features > div {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--hvt-bg-soft);
    border-radius: 8px;
    font-size: 14px;
}
.hvt-feat-label { color: var(--hvt-muted); }
.hvt-feat-value { font-weight: 600; }

/* Schools */
.hvt-schools {
    overflow-x: auto;
}
.hvt-schools table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.hvt-schools th,
.hvt-schools td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--hvt-border);
    vertical-align: top;
}
.hvt-schools th {
    font-weight: 600;
    color: var(--hvt-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.hvt-school-district {
    font-size: 12px;
    color: var(--hvt-muted);
    margin-top: 2px;
}
.hvt-rating-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: #fee2e2;
    color: #991b1b;
}
.hvt-rating-pill[data-r="6"],
.hvt-rating-pill[data-r="7"] { background: #fef3c7; color: #92400e; }
.hvt-rating-pill[data-r="8"],
.hvt-rating-pill[data-r="9"],
.hvt-rating-pill[data-r="10"] { background: #d1fae5; color: #065f46; }

/* Source tag on comp rows */
.hvt-source-tag {
    display: inline-block;
    padding: 2px 8px;
    background: var(--hvt-bg-soft);
    border-radius: 10px;
    font-size: 11px;
    color: var(--hvt-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hvt-facts,
.hvt-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
@media (max-width: 640px) {
    .hvt-facts,
    .hvt-stats { grid-template-columns: repeat(2, 1fr); }
}

.hvt-facts > div,
.hvt-stats > div {
    padding: 12px;
    background: var(--hvt-bg-soft);
    border-radius: 8px;
    font-size: 14px;
}

.hvt-stats > div {
    display: flex;
    flex-direction: column;
}
.hvt-stat-label {
    font-size: 12px;
    color: var(--hvt-muted);
}
.hvt-stat-value {
    font-size: 16px;
    font-weight: 600;
    margin-top: 2px;
}

.hvt-comps {
    overflow-x: auto;
}
.hvt-comps table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.hvt-comps th,
.hvt-comps td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--hvt-border);
}
.hvt-comps th {
    font-weight: 600;
    color: var(--hvt-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.hvt-comps tbody tr:hover {
    background: var(--hvt-bg-soft);
}

.hvt-no-match {
    padding: 18px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    margin: 20px 0;
}

.hvt-cta {
    margin-top: 28px;
    padding: 20px;
    background: var(--hvt-bg-soft);
    border-radius: 10px;
    text-align: center;
}
.hvt-cta h3 { margin: 0 0 6px; }
.hvt-cta p { margin: 0 0 10px; color: var(--hvt-muted); font-size: 14px; }
.hvt-agent { font-size: 15px; }
.hvt-agent a { color: var(--hvt-primary); text-decoration: none; }
.hvt-agent a:hover { text-decoration: underline; }
.hvt-print { margin-top: 12px; font-size: 13px; }
.hvt-print a { color: var(--hvt-muted); }

@media print {
    .hvt-form-card,
    .hvt-print { display: none !important; }
    .hvt-card { box-shadow: none; border: none; }
}
