/*
    rm-select.css - look of the Tom Select dropdowns (assets/js/.../rm-select.js), 2026-11-26.
    Loaded after assets/plugins/tom-select/tom-select.bootstrap5.min.css. Same file in AgentWebsites-V4 and
    BrokerageWebsites-V4. Colours follow the V4 standards: text #4b5675, muted #99a1b7, prime = --bs-primary.
*/

/* ---- control ---------------------------------------------------------------------------- */
.rm-ts .ts-control {
    color: #4b5675;
}
.rm-ts .ts-control input::placeholder {
    color: #99a1b7;
}
.rm-ts.focus .ts-control {
    box-shadow: none;
}

/* Search boxes keep the look of the field they replace (hero pill, map bar...): the wrapper carries the
   original input's classes, the control is plain text inside it (padding copied by rm-select.js). */
.rm-ts-search .ts-control,
.rm-ts-search.single.input-active .ts-control {
    height: 100%;
    min-height: inherit;
    align-items: center;
    border: 0 !important;
    border-radius: inherit;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    font: inherit;
    cursor: text;
}
.rm-ts-search.ts-wrapper {
    padding: 0 !important;                           /* the control carries the field's padding */
}
.rm-ts-search.ts-wrapper:not(.form-control):not(.form-select) {
    flex: 1 1 auto;
    min-width: 0;
}
/* icons placed over the field (home search, map bar) stay above the control */
.home-search__icon,
.search-map-filter__address > .bi {
    z-index: 3;
}
.rm-ts-search .ts-control > .rm-ts-text {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.rm-ts-search.ts-wrapper.single .ts-control {
    --ts-pr-caret: 0;
}

/* Multi (listing alert cities): chips in the primary colour */
.ts-wrapper.rm-ts-multi .ts-control > .item {
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb, 0, 78, 155), .1);
    border: 0;
    font-size: .875rem;
    font-weight: 600;
}
.ts-wrapper.rm-ts-multi .ts-control > .item .remove {
    border-left: 0;
    color: inherit;
    opacity: .7;
}
.ts-wrapper.rm-ts-multi .ts-control > .item .remove:hover {
    background: transparent;
    opacity: 1;
}

/* ---- dropdown --------------------------------------------------------------------------- */
.rm-ts-dropdown {
    z-index: 1090;                                   /* above sticky headers, below modals' own dropdowns */
    margin-top: .35rem;
    border: 1px solid #f1f1f4;
    border-radius: .75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .1);
    overflow: hidden;
}
.rm-ts-dropdown .ts-dropdown-content {
    max-height: 360px;
    padding: .35rem;
}
.rm-ts-dropdown .option,
.rm-ts-dropdown .create,
.rm-ts-dropdown .no-results {
    padding: .5rem .6rem;
    border-radius: .5rem;
    color: #4b5675;
}
.rm-ts-dropdown .no-results {
    color: #99a1b7;
    font-size: .875rem;
}
.rm-ts-dropdown .active {
    background: #f9f9f9;
    color: #4b5675;
}
.ts-dropdown.rm-ts-dropdown [data-selectable] .highlight {
    background: transparent;
    color: var(--bs-primary);
    font-weight: 700;
}
.rm-ts-loading {
    padding: .6rem;
    text-align: center;
    color: var(--bs-primary);
}

/* One row: round lead (status icon or agent photo), title + meta, badge on the right */
.rm-ts-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
}
.rm-ts-item__lead {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1rem;
    color: #78829d;
    background: #f1f1f4;
}
.rm-ts-item__lead--success { color: #17c653; background: #dfffea; }
.rm-ts-item__lead--danger  { color: #f8285a; background: #ffeef3; }
.rm-ts-item__lead--primary { color: var(--bs-primary); background: rgba(var(--bs-primary-rgb, 0, 78, 155), .1); }
.rm-ts-item__lead--img {
    overflow: hidden;
    background: #f1f1f4;
}
.rm-ts-item__lead--img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}
.rm-ts-item__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.3;
}
.rm-ts-item__title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: .875rem;
    font-weight: 600;
    color: #333;
}
.rm-ts-item__meta {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: .8rem;
    color: #99a1b7;
}
.rm-ts-item__badge {
    flex: 0 0 auto;
    padding: .2rem .55rem;
    border: 1px solid currentColor;
    border-radius: 2rem;
    font-size: .7rem;
    font-weight: 600;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
    color: #78829d;
}
.rm-ts-item__badge--success { color: #17c653; }
.rm-ts-item__badge--danger  { color: #f8285a; }
.rm-ts-dropdown .create .rm-ts-item__title {
    font-weight: 500;
    color: #4b5675;
}

/* The replaced Address / MLS tabs (brokerage hero, 2026-11-26): one box now */
.rm-one-search #searchTabs,
.rm-one-search .pxp-hero-search-tabs {
    display: none !important;
}

/* ---- Plain selects (RmSelect.style, every select.form-select / .custom-select / .form-control), 2026-11-27 ----
   The wrapper keeps the select's classes, so the site's .form-select rules give it the same border, radius,
   background, arrow and focus colour as the other fields; the control gets the select's padding, font and
   colour from rm-select.js. No typing: click or keys open the list. */
.ts-wrapper.rm-ts-plain {
    display: flex;
    align-items: stretch;
    cursor: pointer;
}
.ts-wrapper.rm-ts-plain .ts-control,
.ts-wrapper.rm-ts-plain.single.input-active .ts-control {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    align-items: center;
    min-height: 0;
    border: 0 !important;
    box-shadow: none !important;
    cursor: pointer;
}
.ts-wrapper.rm-ts-plain.single .ts-control > .item {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
/* selects styled as .form-control (no arrow of their own): add the form-select arrow */
.ts-wrapper.rm-ts-plain.single:not(.form-select):not(.custom-select):not(.disabled) .ts-control {
    padding-inline-end: 3rem !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2378829D' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 16px 12px !important;
}
[dir="rtl"] .ts-wrapper.rm-ts-plain.single:not(.form-select):not(.custom-select):not(.disabled) .ts-control {
    background-position: left 1rem center !important;
}
.ts-wrapper.rm-ts-plain.focus,
.ts-wrapper.rm-ts-plain.dropdown-active {
    border-color: var(--form-focus-border-color, var(--prime-color, var(--bs-primary)));
    box-shadow: none;
    outline: 0;
}
.ts-wrapper.rm-ts-plain.disabled {
    opacity: .65;
    cursor: default;
}
.rm-ts-plain-dropdown .option.selected {
    color: var(--bs-primary);
    font-weight: 600;
    background: transparent;
}
.rm-ts-plain-dropdown .option.selected.active,
.rm-ts-plain-dropdown .option.active {
    background: #f9f9f9;
}
