/* ══════════════════════════════════════════════════════════════════════ */
/* Region hierarchy select — searchable State → District → Region picker  */
/* ══════════════════════════════════════════════════════════════════════ */
.rh-select { position: relative; width: 100%; }

.rh-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 2.2rem 0.6rem 0.85rem;
    border: 1.5px solid var(--gray-200, #e5e7eb);
    border-radius: var(--radius, 10px);
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--gray-900, #111827);
    background: var(--gray-50, #f9fafb);
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s;
}
.rh-input:focus { border-color: var(--primary, #013047); background: var(--white, #fff); }

.rh-select::after {
    content: '';
    position: absolute;
    top: 45%;
    inset-inline-end: 0.9rem;
    width: 8px;
    height: 8px;
    pointer-events: none;
    transform: translateY(-50%) rotate(45deg);
    border-right: 2px solid var(--gray-500, #6b7280);
    border-bottom: 2px solid var(--gray-500, #6b7280);
    transition: transform 0.15s;
}
.rh-select.rh-open::after { transform: translateY(-20%) rotate(225deg); }
[dir="rtl"] .rh-input { padding: 0.6rem 0.85rem 0.6rem 2.2rem; }
[dir="rtl"] .rh-select::after { inset-inline-end: auto; inset-inline-start: 0.9rem; }

.rh-list {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    inset-inline-start: 0;
    inset-inline-end: 0;
    max-height: 320px;
    overflow-y: auto;
    z-index: 200;
    background: var(--white, #fff);
    border: 1.5px solid var(--gray-200, #e5e7eb);
    border-radius: var(--radius, 10px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.14);
    padding: 0.35rem;
}
.rh-select.rh-open .rh-list { display: block; }

.rh-option {
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--gray-800, #1f2937);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rh-option:hover { background: var(--gray-100, #f1f5f9); }
.rh-option--selected { color: var(--primary, #013047); }

/* Hierarchy: state = bold section header, district = indented sub-header, */
/* region = further-indented leaf (the only level with a plain-text weight). */
.rh-option--state {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--gray-500, #6b7280);
    background: var(--gray-50, #f9fafb);
    margin-top: 0.15rem;
}
.rh-option--state:first-of-type { margin-top: 0; }
.rh-option--district {
    font-weight: 700;
    font-size: 0.8rem;
    padding-inline-start: 1.1rem;
    color: var(--gray-600, #4b5563);
}
.rh-option--region { padding-inline-start: 1.9rem; font-weight: 500; }
.rh-option--all { font-weight: 700; color: var(--primary, #013047); border-bottom: 1px solid var(--gray-100, #f1f5f9); border-radius: 0; margin-bottom: 0.2rem; padding-bottom: 0.6rem; }

.rh-empty { padding: 0.6rem 0.65rem; font-size: 0.82rem; color: var(--gray-400, #9ca3af); }
