/*
 * HomePro modern presentation for RealesWP's six native widgets only.
 * Classes are injected only for registered widgets named "Reales WP …".
 * No third-party widget, shortcode, query, field, or theme template is changed.
 */
body.hprc-modern-reales-widgets {
    --hprc-widget-accent: #0eaaa6;
    --hprc-widget-accent-dark: #0a918e;
    --hprc-widget-ink: #1f3139;
    --hprc-widget-muted: #687982;
    --hprc-widget-line: #e1e9eb;
    --hprc-widget-soft: #f5f9f9;
    --hprc-widget-radius: 16px;
}

/* Sidebar treatment: calm cards with restrained depth. */
body.hprc-modern-reales-widgets .hprc-reales-native-widget.hprc-widget-sidebar {
    box-sizing: border-box;
    margin-bottom: 24px;
    padding: 22px;
    border: 1px solid var(--hprc-widget-line);
    border-radius: var(--hprc-widget-radius);
    background: #fff;
    box-shadow: 0 10px 28px rgba(24, 49, 61, .055);
    color: var(--hprc-widget-ink);
}
body.hprc-modern-reales-widgets .hprc-reales-native-widget.hprc-widget-sidebar > :first-child { margin-top: 0; }
body.hprc-modern-reales-widgets .hprc-reales-native-widget.hprc-widget-sidebar > :last-child { margin-bottom: 0; }

/* Footer widgets keep the theme footer surface; no white card is forced. */
body.hprc-modern-reales-widgets .hprc-reales-native-widget.hprc-widget-footer {
    box-sizing: border-box;
    margin-bottom: 22px;
}

/* Titles: clear hierarchy without oversized decorative styling. */
body.hprc-modern-reales-widgets .hprc-reales-native-widget :is(.widget-title, h3, h4):first-child {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 650;
    letter-spacing: -.01em;
}
body.hprc-modern-reales-widgets .hprc-widget-sidebar :is(.widget-title, h3, h4):first-child {
    color: var(--hprc-widget-ink);
}
body.hprc-modern-reales-widgets .hprc-widget-sidebar :is(.widget-title, h3, h4):first-child::after {
    content: '';
    display: block;
    width: 34px;
    height: 3px;
    margin-top: 10px;
    border-radius: 99px;
    background: var(--hprc-widget-accent);
}

/* Universal native-widget text/link rhythm. */
body.hprc-modern-reales-widgets .hprc-reales-native-widget :is(p, li, address) {
    line-height: 1.6;
}
body.hprc-modern-reales-widgets .hprc-widget-sidebar :is(p, li, address) {
    color: var(--hprc-widget-muted);
}
body.hprc-modern-reales-widgets .hprc-reales-native-widget a {
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
body.hprc-modern-reales-widgets .hprc-widget-sidebar a:not(.btn):not(.button) {
    color: var(--hprc-widget-ink);
}
body.hprc-modern-reales-widgets .hprc-widget-sidebar a:not(.btn):not(.button):hover,
body.hprc-modern-reales-widgets .hprc-widget-sidebar a:not(.btn):not(.button):focus-visible {
    color: var(--hprc-widget-accent-dark);
}

/* Property and agent list widgets: modern media rows, not nested cards. */
body.hprc-modern-reales-widgets :is(.hprc-widget-featured-properties, .hprc-widget-recent-properties, .hprc-widget-featured-agents) ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
body.hprc-modern-reales-widgets :is(.hprc-widget-featured-properties, .hprc-widget-recent-properties, .hprc-widget-featured-agents) li {
    box-sizing: border-box;
    min-width: 0;
    padding: 14px 0;
    border-bottom: 1px solid var(--hprc-widget-line);
}
body.hprc-modern-reales-widgets :is(.hprc-widget-featured-properties, .hprc-widget-recent-properties, .hprc-widget-featured-agents) li:first-child { padding-top: 0; }
body.hprc-modern-reales-widgets :is(.hprc-widget-featured-properties, .hprc-widget-recent-properties, .hprc-widget-featured-agents) li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}
body.hprc-modern-reales-widgets :is(.hprc-widget-featured-properties, .hprc-widget-recent-properties, .hprc-widget-featured-agents) img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
}
body.hprc-modern-reales-widgets :is(.hprc-widget-featured-properties, .hprc-widget-recent-properties) img {
    aspect-ratio: 4 / 3;
}
body.hprc-modern-reales-widgets .hprc-widget-featured-agents img {
    border-radius: 50%;
    aspect-ratio: 1;
}

/* Contact widget: readable rows and quiet icon containers. */
body.hprc-modern-reales-widgets .hprc-widget-contact :is(ul, address) {
    margin: 0;
    padding: 0;
}
body.hprc-modern-reales-widgets .hprc-widget-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 0;
}
body.hprc-modern-reales-widgets .hprc-widget-contact :is(.fa, [class^="icon-"], [class*=" icon-"]) {
    color: var(--hprc-widget-accent);
}

/* Social networks: consistent, touch-friendly controls. */
body.hprc-modern-reales-widgets .hprc-widget-social-networks :is(ul, ol) {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}
body.hprc-modern-reales-widgets .hprc-widget-social-networks li {
    float: none;
    margin: 0;
    padding: 0;
}
body.hprc-modern-reales-widgets .hprc-widget-social-networks a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    border: 1px solid var(--hprc-widget-line);
    border-radius: 50%;
    background: #fff;
    color: var(--hprc-widget-accent);
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
body.hprc-modern-reales-widgets .hprc-widget-social-networks a:hover,
body.hprc-modern-reales-widgets .hprc-widget-social-networks a:focus-visible {
    transform: translateY(-1px);
    border-color: var(--hprc-widget-accent);
    background: #edf9f8;
}

/* Property search widget: refresh controls while preserving names/IDs/AJAX behavior. */
body.hprc-modern-reales-widgets .hprc-widget-property-search :is(input[type="text"], input[type="search"], input[type="number"], select, textarea) {
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid #cbd8dc;
    border-radius: 10px;
    background: #fff;
    color: var(--hprc-widget-ink);
    font-size: 15px;
    box-shadow: none;
}
body.hprc-modern-reales-widgets .hprc-widget-property-search :is(input, select, textarea):focus {
    border-color: var(--hprc-widget-accent);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(14, 170, 166, .12);
}
body.hprc-modern-reales-widgets .hprc-widget-property-search :is(button, input[type="submit"], .btn, .button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 16px;
    border: 1px solid var(--hprc-widget-accent);
    border-radius: 10px;
    background: var(--hprc-widget-accent);
    color: #fff;
    font-weight: 650;
    text-decoration: none;
    box-shadow: none;
}
body.hprc-modern-reales-widgets .hprc-widget-property-search :is(button, input[type="submit"], .btn, .button):hover,
body.hprc-modern-reales-widgets .hprc-widget-property-search :is(button, input[type="submit"], .btn, .button):focus-visible {
    border-color: var(--hprc-widget-accent-dark);
    background: var(--hprc-widget-accent-dark);
    color: #fff;
}
body.hprc-modern-reales-widgets .hprc-widget-property-search :is(input[type="checkbox"], input[type="radio"]) {
    accent-color: var(--hprc-widget-accent);
}

/* Keyboard accessibility without changing native interactions. */
body.hprc-modern-reales-widgets .hprc-reales-native-widget a:focus-visible,
body.hprc-modern-reales-widgets .hprc-reales-native-widget button:focus-visible,
body.hprc-modern-reales-widgets .hprc-reales-native-widget input:focus-visible,
body.hprc-modern-reales-widgets .hprc-reales-native-widget select:focus-visible,
body.hprc-modern-reales-widgets .hprc-reales-native-widget textarea:focus-visible {
    outline: 2px solid var(--hprc-widget-accent);
    outline-offset: 2px;
}

@media (max-width: 767px) {
    body.hprc-modern-reales-widgets .hprc-reales-native-widget.hprc-widget-sidebar {
        margin-bottom: 18px;
        padding: 18px 16px;
        border-radius: 14px;
        box-shadow: 0 7px 20px rgba(24, 49, 61, .045);
    }
    body.hprc-modern-reales-widgets .hprc-widget-property-search :is(button, input[type="submit"], .btn, .button) {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.hprc-modern-reales-widgets .hprc-reales-native-widget * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
