/* ORH Property Type Filter v2.3 */

/* ── Wrapper ── */
.orh-ptf-wrap {
    position: relative;
    display: block;
    flex: 1 1 0%;
    min-width: 0;
    box-sizing: border-box;
}

/* ── Trigger button ──
   Exact values sourced from Houzez main.css:
   height:42px  color:#a1a7a8  border:#dce0e0  font-weight:400  bg:#fff    */
.orh-ptf-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 42px;
    padding: 0 16px;
    background: #fff;
    border: 1px solid #dce0e0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    font-weight: 400;
    line-height: 42px;
    color: #a1a7a8;
    white-space: nowrap;
    overflow: hidden;
    box-sizing: border-box;
    user-select: none;
    transition: border-color .2s;
    margin: 0;
}
.orh-ptf-btn:hover,
.orh-ptf-btn.orh-ptf-active { border-color: #aaa; }

.orh-ptf-lbl {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

.orh-ptf-caret {
    flex-shrink: 0;
    margin-left: 8px;
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #a1a7a8;
    transition: transform .2s;
}
.orh-ptf-btn.orh-ptf-active .orh-ptf-caret { transform: rotate(180deg); }

/* ── Dropdown panel ── */
.orh-ptf-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    width: max-content;
    max-width: 360px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    z-index: 9999;
    max-height: 420px;
    overflow-y: auto;
    padding: 6px 0;
    box-sizing: border-box;
}
.orh-ptf-panel.orh-ptf-open { display: block; }

/* ── Shared label row styles ── */
.orh-ptf-parent-lbl,
.orh-ptf-child-lbl,
.orh-ptf-grand-lbl {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    user-select: none;
}
.orh-ptf-parent-lbl:hover,
.orh-ptf-child-lbl:hover,
.orh-ptf-grand-lbl:hover { background: #f5f5f5; }

/* Header-only rows (single-select mode) — expand/collapse, no checkbox */
.orh-ptf-header-only { cursor: pointer; }

/* Indentation levels */
.orh-ptf-parent-lbl { padding: 7px 14px; font-weight: 600; }
.orh-ptf-child-lbl  { padding: 6px 14px 6px 24px; font-weight: 500; }
.orh-ptf-grand-lbl  { padding: 5px 14px 5px 40px; font-weight: 400; color: #555; font-size: 12px; }

/* Checkboxes */
.orh-ptf-parent-lbl input[type=checkbox],
.orh-ptf-child-lbl  input[type=checkbox],
.orh-ptf-grand-lbl  input[type=checkbox] {
    flex-shrink: 0;
    margin: 0;
    cursor: pointer;
}
.orh-ptf-parent-lbl input[type=checkbox] { width: 15px; height: 15px; }
.orh-ptf-child-lbl  input[type=checkbox] { width: 14px; height: 14px; }
.orh-ptf-grand-lbl  input[type=checkbox] { width: 13px; height: 13px; }

/* ── Accordion arrow ── */
.orh-ptf-arrow {
    display: inline-block;
    flex-shrink: 0;
    width: 0; height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid #888;
    transition: transform .2s;
    cursor: pointer;
}
.orh-ptf-arrow-spacer {
    display: inline-block;
    flex-shrink: 0;
    width: 6px;
}
.orh-ptf-parent-row.orh-open > .orh-ptf-parent-lbl .orh-ptf-arrow,
.orh-ptf-child-row.orh-open  > .orh-ptf-child-lbl  .orh-ptf-arrow {
    transform: rotate(90deg);
}

/* ── Child / grandchild lists — hidden until expanded ── */
.orh-ptf-children,
.orh-ptf-grandchildren { display: none; }

.orh-ptf-parent-row.orh-open > .orh-ptf-children     { display: block; }
.orh-ptf-child-row.orh-open  > .orh-ptf-grandchildren { display: block; }

/* ── Count badge ── */
.orh-ptf-badge {
    display: inline-block;
    margin-left: 5px;
    background: #7b2d8b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    padding: 1px 7px;
    vertical-align: middle;
    flex-shrink: 0;
}
