/*
Theme Name: RealHomes Child Theme
Theme URI: http://themeforest.net/item/real-homes-wordpress-real-estate-theme/5373914
Description: Child theme for Real Homes.
Author: Inspiry Themes
Author URI: https://www.inspirythemes.com/
Template: realhomes
Version: 1.4.2
*/

/**
 * RVR Additional Fees System Styling
 */

/* Submit Property Form - Additional Fees */
.rvr-fee-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-start;
}

.rvr-fee-field {
    flex: 1;
    min-width: 200px;
}

.rvr-fee-field label {
    font-size: 12px;
    font-weight: 500;
    color: #555;
    margin-bottom: 5px;
    display: block;
}

.rvr-fee-field input,
.rvr-fee-field select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
}

.rvr-fee-field input:focus,
.rvr-fee-field select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.rvr-fee-actions {
    flex-shrink: 0;
}

/* Half-Map thumb frame: siehe child-custom.css (4:3, contain, Weißrahmen) */

/* Property Detail View - Additional Fees */
.rh_property__rvr_additional_fees {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #007cba;
}

.rh_property__rvr_additional_fees .rh_property__heading {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.rh_property__fee_item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.rh_property__fee_item:last-child {
    border-bottom: none;
}

.rh_property__fee_item .fee_label {
    font-weight: 500;
    color: #333;
}

.rh_property__fee_item .fee_amount {
    font-weight: 600;
    color: #007cba;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rvr-fee-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .rvr-fee-field {
        min-width: auto;
    }
    
    .rvr-fee-actions {
        align-self: flex-end;
    }
    
    .rh_property__fee_item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/**
 * Half-Map Suche: Elementor-Formular außerhalb der per AJAX ersetzten .rh-ultra-list-box
 */
.rh-ultra-half-map-list .rh-ultra-half-map-search {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.rh-ultra-half-map-list .rh-ultra-half-map-search .rh-custom-search-form-wrapper {
    margin-left: auto;
    margin-right: auto;
}

/**
 * Advanced Search: Überkategorien als ausklappbare Panels (<details> / rudelurlaub_get_feature_categories)
 * Schrift: keine eigene font-family — übernimmt RealHomes/Theme (z. B. Montserrat, Open Sans o. ä.).
 */
.rudelurlaub-search-feature-groups {
    font-size: 14px;
}

.rudelurlaub-search-feature-groups .rudelurlaub-search-feature-panel,
.rudelurlaub-search-feature-groups .rudelurlaub-search-feature-group--flat {
    margin-bottom: 0.6rem;
}

.rudelurlaub-search-feature-groups .rudelurlaub-search-feature-panel:last-of-type,
.rudelurlaub-search-feature-groups .rudelurlaub-search-feature-group--flat:last-of-type {
    margin-bottom: 0;
}

.rudelurlaub-search-feature-panel {
    border: 1px solid rgba(0, 0, 0, 0.09);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.75);
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.rudelurlaub-search-feature-panel[open] {
    border-color: rgba(0, 0, 0, 0.14);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
}

.rudelurlaub-search-feature-panel__summary {
    position: relative;
    list-style: none;
    cursor: pointer;
    padding: 0.65rem 2.15rem 0.65rem 0.85rem;
    margin: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.rudelurlaub-search-feature-panel__summary::-webkit-details-marker {
    display: none;
}

.rudelurlaub-search-feature-panel__summary:focus {
    outline: none;
}

.rudelurlaub-search-feature-panel__summary:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.rudelurlaub-search-feature-panel__summary::after {
    content: '';
    position: absolute;
    right: 0.85rem;
    top: 50%;
    width: 0.45rem;
    height: 0.45rem;
    margin-top: -0.25rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.45;
    transition: transform 0.2s ease;
    pointer-events: none;
}

.rudelurlaub-search-feature-panel[open] .rudelurlaub-search-feature-panel__summary::after {
    transform: rotate(-135deg);
    margin-top: -0.08rem;
}

.rudelurlaub-search-feature-panel__summary-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem 0.75rem;
    flex-wrap: wrap;
}

.rudelurlaub-search-feature-panel__icon {
    font-size: 1.15rem;
    line-height: 1;
    flex-shrink: 0;
}

.rudelurlaub-search-feature-panel__title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    flex: 1 1 10rem;
    min-width: 0;
}

.rudelurlaub-search-feature-panel__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.55rem;
    margin-left: auto;
}

.rudelurlaub-search-feature-panel__count {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.62;
    white-space: nowrap;
}

.rudelurlaub-search-feature-panel__active {
    font-size: 11px;
    font-weight: 600;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    background: rgba(230, 126, 34, 0.14);
    color: #b8570a;
    white-space: nowrap;
}

.rudelurlaub-search-feature-panel__body {
    padding: 18px 12px 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Legacy: alter h4-Titel (falls noch irgendwo genutzt) */
.rudelurlaub-search-feature-group-title {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: inherit;
}

.rudelurlaub-search-feature-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 0.45rem 1rem;
    align-items: start;
}

/* Half-Map: eine Spalte — verhindert Überlappung bei langen deutschen Labels */
.rh-ultra-properties-half-map .rudelurlaub-search-feature-group-grid,
.rh-ultra-half-map-list .rudelurlaub-search-feature-group-grid {
    grid-template-columns: 1fr;
    gap: 0.35rem 0;
}

.rudelurlaub-search-feature-item {
    min-width: 0;
}

.rudelurlaub-search-feature-item label {
    display: block;
    font-size: 14px;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.4;
}

.rudelurlaub-search-feature-item label small {
    opacity: 0.75;
    font-weight: normal;
    white-space: nowrap;
}

/**
 * Vermieter-Dashboard: Sidebar-Hamburger in der rechten Kopfzeile.
 * <1200px: Layout in child-custom.css (Burger links, Logo mittig).
 * ≥1200px: kein Burger — Hallo + Avatar rechts.
 */
body.page-template-templatesdashboard-php .rudelurlaub-dashboard-header-right,
body.page-template-templates-dashboard-php .rudelurlaub-dashboard-header-right,
body.page-template-dashboard-php .rudelurlaub-dashboard-header-right {
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

body.page-template-templatesdashboard-php .rudelurlaub-dashboard-sidebar-toggle,
body.page-template-templates-dashboard-php .rudelurlaub-dashboard-sidebar-toggle,
body.page-template-dashboard-php .rudelurlaub-dashboard-sidebar-toggle {
    position: relative;
    right: auto;
    left: auto;
    flex-shrink: 0;
}

body.page-template-templatesdashboard-php .rudelurlaub-dashboard-header-right .rh-user-account,
body.page-template-templates-dashboard-php .rudelurlaub-dashboard-header-right .rh-user-account,
body.page-template-dashboard-php .rudelurlaub-dashboard-header-right .rh-user-account {
    margin-left: auto;
    margin-right: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}

/* Header-Inserieren entfernt — Fallback falls Cache/älteres Markup */
body.page-template-templatesdashboard-php .rh-user-account-add-property-btn,
body.page-template-templates-dashboard-php .rh-user-account-add-property-btn,
body.page-template-dashboard-php .rh-user-account-add-property-btn {
    display: none !important;
}

/**
 * OSM Leaflet-Popup detail typography (single + listing / half-map).
 * Parent Ultra sets #property_map … p to primary orange 18px/700 — reset to one coherent stack.
 */
#property_map .leaflet-popup-content-wrapper,
#listing-map .leaflet-popup-content-wrapper,
.leaflet-popup-content-wrapper {
    background: #fff;
}

#property_map .leaflet-popup-content-wrapper .leaflet-popup-content p,
#listing-map .leaflet-popup-content-wrapper .leaflet-popup-content p,
.leaflet-popup-content-wrapper .osm-popup-content .osm-detail-wrapper p {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
    color: #4c4c4c;
    background: transparent;
}

.leaflet-popup-content-wrapper .osm-popup-content .osm-detail-wrapper > div {
    display: flex;
    flex-direction: column;
    gap: 0.35em;
    font-size: 14px;
    line-height: 1.45;
    color: #4c4c4c;
}

/* Property type: slightly smaller, muted */
.leaflet-popup-content-wrapper .osm-popup-content .osm-detail-wrapper .type,
.leaflet-popup-content-wrapper .osm-popup-content .osm-detail-wrapper .type small {
    display: block;
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    color: #6b6b6b;
}

/* Price: body color throughout — bold amount, no brand primary/orange */
.leaflet-popup-content-wrapper .osm-popup-content .osm-detail-wrapper .osm-popup-price,
#property_map .leaflet-popup-content-wrapper .osm-popup-price,
#listing-map .leaflet-popup-content-wrapper .osm-popup-price {
    display: inline;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    color: #4c4c4c;
}

.leaflet-popup-content-wrapper .osm-popup-price .rudelurlaub-pangv-price {
    display: inline;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 0.25em;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.leaflet-popup-content-wrapper .osm-popup-price .rudelurlaub-pangv-prefix,
.leaflet-popup-content-wrapper .osm-popup-price .rudelurlaub-pangv-postfix,
.leaflet-popup-content-wrapper .osm-popup-price .rudelurlaub-pangv-amount,
#property_map .leaflet-popup-content-wrapper .osm-popup-price .rudelurlaub-pangv-amount,
#listing-map .leaflet-popup-content-wrapper .osm-popup-price .rudelurlaub-pangv-amount {
    font-size: inherit;
    line-height: inherit;
    color: #4c4c4c;
    font-weight: inherit;
    opacity: 1;
}

.leaflet-popup-content-wrapper .osm-popup-price .rudelurlaub-pangv-amount,
#property_map .leaflet-popup-content-wrapper .osm-popup-price .rudelurlaub-pangv-amount,
#listing-map .leaflet-popup-content-wrapper .osm-popup-price .rudelurlaub-pangv-amount {
    font-size: 15px;
    font-weight: 700;
    color: #4c4c4c;
}

.leaflet-popup-content-wrapper .osm-popup-price .rudelurlaub-pangv-prefix,
.leaflet-popup-content-wrapper .osm-popup-price .rudelurlaub-pangv-postfix {
    font-weight: 400;
    color: #4c4c4c;
}

/* Gäste / Hunde / Zaun: muted label, same-size value */
.leaflet-popup-content-wrapper .osm-popup-meta,
#property_map .leaflet-popup-content-wrapper .osm-popup-meta,
#listing-map .leaflet-popup-content-wrapper .osm-popup-meta {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
    color: #4c4c4c;
    background: transparent;
}

.leaflet-popup-content-wrapper .osm-popup-meta-label,
#property_map .leaflet-popup-content-wrapper .osm-popup-meta-label,
#listing-map .leaflet-popup-content-wrapper .osm-popup-meta-label {
    font-weight: 400;
    color: #6b6b6b;
}

.leaflet-popup-content-wrapper .osm-popup-meta-value,
#property_map .leaflet-popup-content-wrapper .osm-popup-meta-value,
#listing-map .leaflet-popup-content-wrapper .osm-popup-meta-value {
    font-weight: 400;
    color: #4c4c4c;
}

/**
 * OSM (Ultra): Leaflet MarkerCluster – Kreise wie Theme-Primary.
 * Parent `.cluster` trifft nicht auf `.marker-cluster`; OSM lädt kein MarkerCluster-Default-CSS.
 * Small: 40×40 außen / ~30px innerer Kreis. Medium: 60×60 / ~45px (1,5× small, −25 % ggü. 2×).
 */
body .leaflet-marker-icon.marker-cluster.marker-cluster-small {
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 50%;
    background-color: color-mix(in srgb, var(--rh-global-color-primary, #ff6d4d) 50%, transparent);
}

body .leaflet-marker-icon.marker-cluster.marker-cluster-small > div {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 30px !important;
    height: 30px !important;
    margin: 0 !important;
    line-height: 30px !important;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background-color: var(--rh-global-color-primary, #ff6d4d);
}

body .leaflet-marker-icon.marker-cluster.marker-cluster-medium {
    width: 60px !important;
    height: 60px !important;
    margin-left: -30px !important;
    margin-top: -30px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 50%;
    background-color: color-mix(in srgb, var(--rh-global-color-primary, #ff6d4d) 50%, transparent);
}

body .leaflet-marker-icon.marker-cluster.marker-cluster-medium > div {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 45px !important;
    height: 45px !important;
    margin: 0 !important;
    line-height: 45px !important;
    border-radius: 50%;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background-color: var(--rh-global-color-primary, #ff6d4d);
}