.hfdm-box {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    margin-top: 18px;
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    clear: both;
}

.hfdm-box label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.hfdm-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: stretch;
    width: 100%;
}

.hfdm-input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.hfdm-add-button {
    width: auto;
    min-width: 126px;
    min-height: 44px;
    box-sizing: border-box;
    padding: 9px 18px;
    border: 0;
    border-radius: 6px;
    white-space: nowrap;
    cursor: pointer;
}

.hfdm-message {
    margin-top: 8px;
    font-size: 13px;
}

.hfdm-success { color: #10843f; }
.hfdm-error { color: #b32d2e; }

.hfdm-created-checkbox {
    display: block;
    margin: 8px 0;
}

.hfdm-created-checkbox input { margin-right: 6px; }

/* The Houzez features section is a wide checkbox grid. Keep our creator below
 * the whole grid rather than inheriting the width of one checkbox column. */
.hfdm-features-box {
    grid-column: 1 / -1;
    flex: 0 0 100%;
    width: 100%;
}

@media (max-width: 600px) {
    .hfdm-box {
        padding: 14px;
    }

    .hfdm-row {
        grid-template-columns: 1fr;
    }

    .hfdm-add-button {
        width: 100%;
    }
}

/* Property floor field added to the Houzez Details section. */
.hfdm-floor-field {
    box-sizing: border-box;
    margin-top: 15px;
}

.hfdm-floor-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.hfdm-floor-field .form-control {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
}

.hfdm-floor-help {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
}

/* Public property detail item. The SVG uses currentColor and therefore follows
 * the active Houzez property-detail typography automatically. */
.hfdm-public-floor-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
}

.hfdm-floor-grid-item {
    min-width: 180px;
    padding: 10px 15px;
}

.hfdm-floor-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
}

.hfdm-extra-detail-field,
.hfdm-floor-field {
    box-sizing: border-box;
    margin-bottom: 18px;
}

.hfdm-extra-detail-field label,
.hfdm-floor-field label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.hfdm-detail-help,
.hfdm-floor-help {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    line-height: 1.35;
}

.hfdm-public-detail,
.hfdm-public-floor-detail {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 220px;
    margin: 10px 0;
}

.hfdm-detail-grid-item,
.hfdm-floor-grid-item {
    flex: 1 1 260px;
    padding: 8px 12px;
}

.hfdm-detail-icon,
.hfdm-floor-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hfdm-detail-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.hfdm-detail-text strong {
    display: block;
    margin-bottom: 2px;
}

/* v0.6.1: keep the feature creator inside the usable dashboard column.
 * Houzez renders its step navigation as a right-side panel that may overlap
 * content whose parent still spans the full viewport width. JavaScript sets a
 * pixel max-width when that panel is detected; these rules provide safe
 * wrapping in all other layouts. */
.hfdm-features-box {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.hfdm-features-box .hfdm-row {
    min-width: 0;
}

.hfdm-features-box .hfdm-input {
    min-width: 0;
}

@media (max-width: 1180px) {
    .hfdm-features-box .hfdm-row {
        grid-template-columns: 1fr;
    }

    .hfdm-features-box .hfdm-add-button {
        width: 100%;
        min-width: 0;
    }
}


/* v0.6.2: Houzez renders the Features title in a horizontal flex wrapper.
 * The creator is now inserted after that wrapper; force an ordinary block
 * formatting context so it can never become a flex item beside the title. */
.block-title-wrap + .hfdm-features-box {
    display: block;
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 18px 0 22px;
    clear: both;
}


/* HFDM fields rendered through Houzez Property Meta Data widget. */
.hfdm-elementor-property-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.hfdm-elementor-property-meta__icon {
    display: inline-flex;
    flex: 0 0 auto;
    line-height: 1;
}
.hfdm-elementor-property-meta__icon svg {
    display: block;
    width: 1.5em;
    height: 1.5em;
}
.hfdm-elementor-property-meta__content {
    display: inline-flex;
    flex-direction: column;
    min-width: 0;
}
.hfdm-elementor-property-meta__label {
    font-weight: 600;
    line-height: 1.2;
}
.hfdm-elementor-property-meta__value {
    line-height: 1.35;
}

/* Houzez Pro Toolkit: automatic Elementor Property Meta icons */
.hpt-auto-meta-icon svg {
    display: block;
    width: 1em;
    height: 1em;
    fill: currentColor;
}


/* v1.0.1: robust fallback icons for Houzez Property Meta Data.
 * Houzez 4.3.5 has no filter around its private icon map. The PHP renderer
 * inserts inline SVGs when possible; these rules cover Elementor contexts
 * where render_content is bypassed. :has() prevents duplicate icons. */
.hpt-auto-icon-widget .hs-meta-widget-module:not(:has(.hs-meta-widget-icon))::before {
    content: "";
    display: inline-block;
    flex: 0 0 1em;
    width: 1em;
    height: 1em;
    background-color: currentColor;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.hpt-auto-icon-hfdm_rooms .hs-meta-widget-module:not(:has(.hs-meta-widget-icon))::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h18v18H3V3zm2 2v6h6V5H5zm8 0v4h6V5h-6zm0 6v8h6v-8h-6zM5 13v6h6v-6H5z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h18v18H3V3zm2 2v6h6V5H5zm8 0v4h6V5h-6zm0 6v8h6v-8h-6zM5 13v6h6v-6H5z'/%3E%3C/svg%3E");
}

.hpt-auto-icon-hfdm_floor_number .hs-meta-widget-module:not(:has(.hs-meta-widget-icon))::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 18h4v-4h4v-4h4V6h6v3h-3v4h-4v4h-4v4H3v-3z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 18h4v-4h4v-4h4V6h6v3h-3v4h-4v4h-4v4H3v-3z'/%3E%3C/svg%3E");
}


/* v1.4.0: extra fields inside Houzez Section Details. */
.hfdm-section-detail-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
}
.hfdm-section-detail-label { font-weight: 600; }
.hfdm-section-detail-value { text-align: right; }
.property-detail-wrap .row > .hfdm-section-detail-item,
.property-details-wrap .row > .hfdm-section-detail-item,
.property-information .row > .hfdm-section-detail-item,
.property-detail-block .row > .hfdm-section-detail-item {
    flex: 0 0 50%;
    width: 50%;
    padding-left: calc(var(--bs-gutter-x, 30px) * .5);
    padding-right: calc(var(--bs-gutter-x, 30px) * .5);
    margin-bottom: 12px;
}
@media (max-width: 767px) {
    .property-detail-wrap .row > .hfdm-section-detail-item,
    .property-details-wrap .row > .hfdm-section-detail-item,
    .property-information .row > .hfdm-section-detail-item,
    .property-detail-block .row > .hfdm-section-detail-item { flex-basis: 100%; width: 100%; }
}
