/* Custom single-select dropdown. Visuals mirror the year-range dropdown
   (.qs-yeardd-* in HQuickSearch.css); the toggle inherits each form's own
   field look via the scoped overrides at the bottom. */

.csd {
    position: relative;
    width: 100%;
}

/* The native select stays in the layout tree (display/visibility untouched) so
   FormValidation's ancestor visibility walk still validates the field. Selector
   needs to outrank the `.qs select` / `.transport-field select` sizing rules. */
.csd select.csd-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.csd-toggle {
    width: 100%;
    height: 40px;
    border-radius: 999px;
    border: 1px solid #e6e6e6;
    padding: 0 36px 0 12px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    color: #111;
    text-align: left;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
}

.csd-toggle-text {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.csd-toggle::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid #888;
    border-bottom: 1.5px solid #888;
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.csd[data-open="true"] .csd-toggle::after {
    transform: translateY(-30%) rotate(-135deg);
}

.csd-toggle:hover {
    border-color: #d0d0d0;
}

.csd-toggle:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
}

.csd-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 30;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.10);
    padding: 6px;
    max-height: 260px;
    overflow-y: auto;
    outline: none;
}

.csd-panel[hidden] {
    display: none;
}

.csd-item {
    padding: 9px 12px;
    font-size: 13px;
    line-height: 1.3;
    border-radius: 8px;
    cursor: pointer;
    color: #111;
}

.csd-item:hover {
    background: #f5f5f5;
}

.csd-item.csd-selected {
    background: #111;
    color: #fff;
    font-weight: 600;
}

.csd-item.csd-active {
    box-shadow: inset 0 0 0 2px #111;
}

@media (max-width: 425px) {
    .csd-panel {
        max-height: 200px;
    }
}

/* Quick Search panel — pill fields, matches `.qs select` */
.qs .csd-toggle {
    border-radius: 999px;
    font-size: 13px;
}

/* Transport form — matches `.transport-field input, .transport-field select` */
.transport-field .csd-toggle {
    border-radius: 10px;
    font-size: 14px;
    border-color: var(--border);
    padding: 0 36px 0 10px;
    font-family: var(--font, var(--font-sans, inherit));
}
