.form-label {
    color: var(--grey-700);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    font-style: normal;
    font-weight: 600;
    line-height: 19.5px;
}

.form-control {
    display: flex;
    height: 2.5rem;
    padding: 12px 16px;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    border-radius: var(--radius-sm);
    border: 1px solid var(--grey-500);
    background: var(--surface);
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: var(--text-md);
    font-style: normal;
    font-weight: 400;
    line-height: normal;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: var(--ring-accent);
}

.form-control::placeholder {
    color: var(--dark-grey);
    font-family: var(--font-sans);
    font-size: var(--text-md);
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    opacity: 1;
}

.chip-multi {
    position: relative;
    width: 100%;
}

.chip-multi-control {
    position: relative;
    min-height: 45px;
    display: flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--surface);
    border: 1px solid var(--line-input);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xs);
}

.chip-multi.is-open .chip-multi-control,
.chip-multi-control:focus-within {
    border-color: var(--blue);
    box-shadow: var(--ring-accent);
}

.chip-multi-dropdown {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    box-sizing: border-box;
    max-width: calc(100vw - 16px);
    max-height: 220px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.chip-multi-dropdown-portal {
    z-index: 300;
}

.chip-multi-option {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 0;
    border-radius: var(--radius-xs);
    background: transparent;
    color: var(--grey-700);
    font-size: var(--text-base);
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}

.chip-multi-option:hover,
.chip-multi-option:focus {
    background: var(--blue-50);
}

.chip-multi-empty {
    margin: 0;
    padding: 10px 12px;
    color: var(--muted);
    font-size: var(--text-sm);
}

.chip-multi-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.searchable-single-control {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: space-between;
    color: var(--grey-700);
    font: inherit;
    font-size: var(--text-base);
    text-align: left;
    cursor: pointer;
}

.searchable-single-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.searchable-single-value.is-placeholder {
    color: var(--slate-500);
}

.searchable-single .icon,
.searchable-single-dropdown .icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.searchable-single-chevron {
    flex: 0 0 auto;
    color: var(--ink-muted);
    transition: transform var(--duration-fast) ease;
}

.searchable-single.is-open .searchable-single-chevron {
    color: var(--blue);
    transform: rotate(180deg);
}

/* Search box, shown only for long lists (see SEARCH_MIN_OPTIONS in site.js). The wrapper carries the one focus
   outline; the input inside has none. Inside the dropdown (not outside), so the scroll area never clips it. */
.searchable-single-search-wrap {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    margin: 0 0 6px;
    padding: 0 12px;
    border: 1px solid var(--line-input);
    border-radius: var(--radius-xs);
    color: var(--ink-muted);
}

.searchable-single-search-wrap[hidden] {
    display: none;
}

.searchable-single-search-wrap .icon {
    flex: 0 0 18px;
}

.searchable-single-search-wrap:focus-within {
    border-color: var(--accent-hover, #1d4ed8);
    outline: 2px solid var(--accent-hover, #1d4ed8);
    outline-offset: -1px;
}

/* 16px or larger stops iOS from zooming the page when the box is tapped. */
body .searchable-single-dropdown .searchable-single-search,
body .searchable-single-dropdown .searchable-single-search:focus,
body .searchable-single-dropdown .searchable-single-search:focus-visible {
    min-width: 0;
    flex: 1 1 auto;
    width: 100%;
    height: 40px;
    min-height: 0;
    padding: 0;
    border: 0;
    outline: 0 !important;
    box-shadow: none !important;
    border-radius: 0;
    background: transparent;
    color: var(--grey-700);
    font: inherit;
    font-size: 16px;
    -webkit-appearance: none;
    appearance: none;
}

.searchable-single-search::-webkit-search-cancel-button {
    cursor: pointer;
}

.searchable-single-option {
    min-height: 44px;
    position: relative;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
}

.searchable-single-option.is-selected {
    color: var(--blue-dark);
    background: var(--blue-50);
    font-weight: 600;
}

.searchable-single-option.is-selected::after {
    content: "";
    flex: 0 0 auto;
    width: 6px;
    height: 12px;
    margin-right: 4px;
    border: solid var(--blue);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-2px);
}

.swal2-icon.swal2-warning {
    border-color: var(--amber-600);
    color: var(--amber-600);
}
