/* Styling for text inputs (e.g., password fields) */
.form-control-sm {
    padding: 0.25rem 0.5rem; /* Reduced padding */
    font-size: 0.75rem; /* Small font size, adjust to match <Text small> */
    line-height: 1.5;
    border-radius: 0.2rem;
    min-height: calc(1.5em + 0.5rem + 2px); /* Matches your inline style */
}

/* Optional: Styling for radio/checkbox inputs */
.form-check-input {
    /* No font-size here since it’s an input’s appearance, not text */
    margin-top: 0.25rem; /* Align with small text */
}

/* If you have <select> elements elsewhere, keep this */
.form-select-sm {
    padding: 0.25rem 2rem 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.5;
    background-position: right 0.5rem center;
    background-size: 12px 10px;
    border-radius: 0.2rem;
}

/* Base UI select (common/Select.tsx): a button trigger plus a portaled list popup.
   The base rules sit in :where() so every window's own `select` / `.form-select`
   styling (mirrored onto .octane-select-trigger) keeps winning. */
:where(.octane-select-trigger) {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    box-sizing: border-box;
    max-width: 100%;
    min-height: 21px;
    padding: 1px 4px;
    border: 1px solid #767676;
    border-radius: 2px;
    background: #fff;
    color: #000;
    font: inherit;
    line-height: normal;
    text-align: left;
    cursor: pointer;
}

.octane-select-trigger::after {
    content: '';
    flex: 0 0 auto;
    width: 0;
    height: 0;
    border-top: 5px solid currentColor;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    pointer-events: none;
}

.octane-select-trigger[data-disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.octane-select-body {
    display: grid;
    flex: 1 1 auto;
    min-width: 0;
}

.octane-select-body > * {
    grid-area: 1 / 1;
    min-width: 0;
}

.octane-select-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.octane-select-sizer {
    display: grid;
    height: 0;
    overflow: hidden;
    visibility: hidden;
    white-space: nowrap;
}

.octane-select-sizer > span {
    grid-area: 1 / 1;
}

.octane-select-sizer > span::before {
    content: attr(data-label);
}

/* AIR text draws the value in the regular Ubuntu cut: reserve its width, not the condensed one's. */
.octane-select-sizer.is-native {
    font-family: HabboAirUbuntu, UbuntuRegular, sans-serif;
}

.octane-select-positioner {
    z-index: 100000;
}

.octane-select-popup {
    box-sizing: border-box;
    min-width: var(--anchor-width);
    max-height: min(var(--available-height, 280px), 280px);
    overflow-y: auto;
    padding: 2px 0;
    border: 1px solid #565650;
    background: #fff;
    color: #111;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    font-size: 12px;
    line-height: 1.3;
}

.octane-select-popup:focus-visible {
    outline: none;
}

.octane-select-item {
    padding: 3px 10px;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}

.octane-select-item[data-highlighted] {
    background: #1e748f;
    color: #fff;
}

.octane-select-item[data-selected] {
    font-weight: 700;
}

.octane-select-item[data-disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.octane-select-group-label {
    padding: 3px 10px;
    color: #555;
    font-weight: 700;
}

/* Base UI number field (common/NumberInput.tsx): the wrapper span must not affect layout. */
.octane-number-field {
    display: contents;
}

/* common/InlineDialog.tsx mounts its popup through a Base UI portal wrapper inside the host
   element; the wrapper must not take part in the host's layout. */
.octane-inline-dialog-host {
    display: contents;
}

/* Up / down buttons of common/NumberInput.tsx: a portaled overlay on the input's right edge. */
.octane-number-steppers {
    position: fixed;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    border-left: 1px solid rgba(0, 0, 0, 0.25);
    background: #f1f1f1;
}

.octane-number-step {
    position: relative;
    flex: 1 1 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.octane-number-step:hover {
    background: #d5d5d5;
}

.octane-number-step[data-disabled] {
    opacity: 0.35;
    cursor: default;
}

.octane-number-step::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    transform: translate(-50%, -50%);
    border-right: 3px solid transparent;
    border-left: 3px solid transparent;
}

.octane-number-step--up::before {
    border-bottom: 4px solid #333;
}

.octane-number-step--down::before {
    border-top: 4px solid #333;
}
