/* Only the signup form uses these enhanced selects; native fields remain the
   source of submitted values and work normally if JavaScript is unavailable. */
.register .registration-select {
    position: relative;
    width: 100%;
    min-width: 0;
}

.register .registration-select[data-open="true"] {
    z-index: 40;
}

.register .registration-select__native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.register .registration-select__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    margin: 0;
    text-align: left;
    font: inherit;
    font-size: 16px;
    line-height: 1.5;
    color: #495057;
    background: #fff;
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.register .registration-select__trigger:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.register .registration-select__trigger:disabled {
    background: #e9ecef;
    cursor: not-allowed;
}

.register .registration-select__label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.register .registration-select__arrow {
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    margin: -4px 3px 0 0;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 200ms ease;
}

.register .registration-select[data-open="true"] .registration-select__arrow {
    transform: translateY(3px) rotate(225deg);
}

.register .registration-select__panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-rows: 0fr;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transform-origin: top center;
    pointer-events: none;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(25, 42, 74, 0.16);
    transition: grid-template-rows 200ms ease, opacity 160ms ease,
        transform 200ms ease, visibility 0s linear 200ms;
}

.register .registration-select[data-open="true"] .registration-select__panel {
    grid-template-rows: 1fr;
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition-delay: 0s;
}

.register .registration-select__clip {
    min-height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.register .registration-select__clip {
    min-height: 0;
    overflow: hidden;
    border-radius: inherit;
}

.register .registration-select__list {
    box-sizing: border-box;
    max-height: min(280px, 45vh);
    max-height: min(280px, 45dvh);
    margin: 0;
    padding: 6px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    list-style: none;
    background: #fff;
    border: 1px solid #cbd3de;
    border-radius: 8px;
    scrollbar-width: thin;
}

.register .registration-select__option {
    display: block;
    margin: 0;
    padding: 9px 10px;
    border-radius: 4px;
    color: #495057;
    font-size: 15px;
    line-height: 1.4;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.register .registration-select__option[aria-selected="true"] {
    color: #0056b3;
    background: #e8f2ff;
    font-weight: 600;
}

.register .registration-select__option.is-active:not([aria-disabled="true"]),
.register .registration-select__option:hover:not([aria-disabled="true"]) {
    color: #003d80;
    background: #dcecff;
}

.register .registration-select__option[aria-disabled="true"] {
    color: #98a1aa;
    background: #f0f1f3;
    font-weight: 400;
    text-shadow: 0 0 1px rgba(120, 128, 138, 0.25);
    cursor: not-allowed;
}

.register .registration-select__group {
    display: block;
    margin: 0;
    padding: 8px 10px 4px;
    color: #6c757d;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
    list-style: none;
}

.register .registration-select__trigger[aria-invalid="true"] {
    border-color: #b52b38;
}

.register .registration-select__error {
    display: block;
    margin: 6px 0 0;
    color: #b52b38;
    font-size: 13px;
    line-height: 1.4;
}

.register .registration-select__error[hidden] {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .register .registration-select__trigger,
    .register .registration-select__arrow,
    .register .registration-select__panel {
        transition: none;
    }
}
