.custom-select-root {
    position: relative;
    color: var(--st-text-color);
    font-family: var(--st-font);
    width:100%;
}
.material-symbols-rounded {
    font-family: Material Symbols Rounded;
}

div.select-content-container {
    display: flex;
    align-items: center;
    padding-right: 0.5rem;
    /* border: 1px solid var(--st-border-color-light);  */
    border: 1px solid var(--st-secondary-background-color);
    border-radius: var(--st-base-radius);
    background: var(--st-secondary-background-color);
    color: var(--st-text-color);
    cursor: pointer;
}


.select-content {
    width: 100%;
    text-align: left;
    padding: 0.5rem;
    padding-left: 0.75rem;
    line-height: 1.315;
}

.select-content-container > span.material-symbols-rounded {
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1;
}


div.select-content-container[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.select-list {
    display: none;
    position: absolute;
    z-index: 999;
    left: 0;
    right: 0;
    margin-top: 6px;
    padding: 6px;
    /* Sustituido #eee por la variable de borde sutil */
    border: 1px solid var(--st-border-color-light);
    border-radius: var(--st-base-radius);
    /* Sustituido #fff por el fondo secundario oscuro */
    background: var(--st-secondary-background-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2); /* Sombra ajustada ligeramente para dark mode */
    list-style: none;
    max-height: 260px;
    overflow: auto;
    color: var(--st-text-color);
}

.select-item {
    padding: 8px 10px;
    border-radius: var(--st-base-radius);
    cursor: pointer;
    color: var(--st-text-color);
}

.select-item:hover {
    /* Sustituido #f5f5f5 por un fondo gris translúcido */
    background: var(--st-border-color-light);
}

.select-add {
    display: flex;
    gap: 8px;
    padding: 6px 8px;
}

.select-add input {
    flex: 1;
    padding: 6px 8px;
    /* Sustituido #ddd */
    border: 1px solid var(--st-border-color-light);
    border-radius: var(--st-base-radius);
    /* Aseguramos que el input tenga fondo oscuro y texto claro */
    background: var(--st-background-color);
    color: var(--st-text-color);
    font-family: var(--st-font);
}

.badge, .bg {
    display: inline-block;
    font-size: var(--st-code-font-size);
    margin-left: 8px;
    font-weight: var(--st-code-font-weight);
}
.bg {
    padding: 2px 6px;
    border-radius:6px;
}
.badge {
    padding: 2px 8px;
    border-radius: 999px; /* Mantenemos estilo píldora */
}

/* --- Corrección de colores usando las variables correspondientes --- */

.badge.red {
    background: var(--st-red-background-color);
    color: var(--st-red-text-color);
}

.badge.orange, .bg.orange {
    background: var(--st-orange-background-color);
    color: var(--st-orange-text-color);
}

.badge.yellow, .bg.yellow {
    background: var(--st-yellow-background-color);
    color: var(--st-yellow-text-color);
}

.badge.green, .bg.green {
    background: var(--st-green-background-color);
    color: var(--st-green-text-color);
}

.badge.blue, .bg.blue {
    background: var(--st-blue-background-color);
    color: var(--st-blue-text-color);
}

.badge.violet, .bg.violet {
    background: var(--st-violet-background-color);
    color: var(--st-violet-text-color);
}

.badge.gray, .bg.gray {
    background: var(--st-gray-background-color);
    color: var(--st-gray-text-color);
}

.badge.grey, .bg.grey {
    background: var(--st-gray-background-color);
    color: var(--st-gray-text-color);
}

.badge.primary, .bg.primary {
    background: var(--st-primary-color);
    color: var(--st-text-color);
}

.color.orange {
    color: var(--st-orange-background-color);
}

.color.yellow {
    color: var(--st-yellow-background-color);
}

.color.green {
    color: var(--st-green-background-color);
}

.color.blue {
    color: var(--st-blue-background-color);
}

.color.violet {
    color: var(--st-violet-background-color);
}

.color.gray {
    color: var(--st-gray-background-color);
}

.color.grey {
    color: var(--st-gray-background-color);
}

.color.primary {
    color: var(--st-primary-color);
}

.badge.rainbow {
    /* No hay variables de gradiente en la lista, se mantiene estático */
    background: linear-gradient(90deg, #ff5f6d, #ffc371);
    color: white;
}

label.select-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    -webkit-box-pack: end;
    justify-content: flex-end;
    flex: 1 1 0%;
    pointer-events: none;
    margin-bottom: 0.25rem;
    min-height: 1.5rem;
}
.select-label span {
    font-size: 0.875rem;
}

.help-tooltip {
    position: relative;

    display: flex;
    flex-direction: row;
    -webkit-box-pack: end;
    justify-content: flex-end;
    flex: 1 1 0%;

    pointer-events: none;
}

span.help-content {
    position: absolute;
    display: none;
    z-index: 999999;
    background: var(--st-background-color);
    padding: 0.5rem;
    border-radius: var(--st-base-radius);
    top: -250%;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;

    pointer-events: all;

    box-sizing: border-box;
    max-width: calc(736px - 4rem);
    max-height: 18.75rem;
    overflow: auto;
    padding: 0.375rem 0.75rem;
}


.help-btn {
    background: none;
    border: none;
    padding: 0px;
    margin: 0px;
    color: inherit;
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    justify-content: center;
    line-height: 0;
    cursor: help;
    color: var(--st-gray-text-color);
    height: 1rem;
    width: 1rem;
    pointer-events: all;
}

.help-btn:focus-visible {
    outline: none;
    box-shadow: 0px 0px 0px 0.2rem rgba(from var(--st-primary-color) r g b / 0.5);
    border-radius: 0.5rem;
}

.help-btn:active + span.help-content, .help-btn:hover + span.help-content, span.help-content:hover, span.help-content:active {
    display: block;
}

.help-btn span.material-symbols-rounded {
    font-size: 1.1rem;
    font-weight: 500;
}