/* ========================================
   ESTILOS PARA SELECTR - VERSIÓN CORREGIDA
   (Con corrección de placeholder)
   ======================================== */

/* Contenedor principal */
div.selectr-container {
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    min-height: 47.5px;
    align-self: baseline;
    display: flex;
    align-items: center;
}

/* Selected - contenedor clickeable */
div.selectr-container .selectr-selected {
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    min-height: 45px;
    height: 100%;
    width: 100%;
    position: relative;
}

/* ========================================
   CORRECCIÓN PRINCIPAL
   ======================================== */

/* Label vacío - NO ocupa espacio */
.selectr-selected .selectr-label:empty {
    display: none !important;
}

/* Placeholder - ocupa TODO el espacio */
.selectr-placeholder {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    color: var(--primary-color);
    font-size: 15px;
    text-align: center;
    line-height: normal !important;
    margin: 0 !important;
    padding: 0 10px !important;
}

/* Cuando hay selección - el placeholder se oculta */
.has-selected .selectr-placeholder {
    display: none !important;
}

/* Cuando hay selección - el label se muestra */
.has-selected .selectr-label {
    display: flex !important;
    text-align: center;
    align-items: center;
    justify-content: center;
    line-height: normal;
}

/* Selectr con error */
.selectr-container.selectr-error .selectr-selected {
    background-color: #ffebee !important;
    border-color: #d32f2f !important;
}

.selectr-selected-error {
    background-color: #ffebee !important;
}

/* Animación de error */
.selectr-error .selectr-selected {
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Mensaje de error */
.selectr-error-message {
    color: #d32f2f;
    display: block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: normal;
}

/* Botón de limpiar */
button.selectr-input-clear {
    display: none !important;
}

/* Input de búsqueda */
.wpte-lrf-block input[type="search"].selectr-input {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

/* Contenedor de opciones */
div.selectr-options-container {
    border: 1px solid var(--primary-color) !important;
    z-index: 9990 !important;
}

div.selectr-options-container > ul.selectr-options
{
    padding: 0 !important;
}

/* Opciones individuales */
li.selectr-option {
    width: 95%;
    margin: 4px auto;
    border: 1px solid #fff;
    padding: 8px 10px !important;
    font-size: 14px;
    border-radius: 6px;
    color: var(--primary-color) !important;
    background-color: transparent !important;
    text-align: center;
}

/* Opción activa */
.selectr-option.active {
    color: #fff !important;
    background-color: var(--primary-color-lightest) !important;
}

/* Hover en opciones */
.selectr-option:hover,
.selectr-option.active:hover {
    color: var(--primary-color) !important;
    background-color: var(--primary-color-lightest) !important;
}

/* Botón de remover tag */
.selectr-selected .selectr-tag-remove {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 30px;
    height: 30px;
    padding: 0;
    cursor: pointer;
    transform: translateY(-50%);
    background: var(--primary-color-light);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    z-index: 11;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selectr-selected .selectr-tag-remove::before {
    font-family: "Font Awesome 5 Free";
    content: "\f2ed";
    font-weight: 900;
    font-size: 15px;
    color: white;
}

/* Input de búsqueda dentro del dropdown */
.selectr-input-container .selectr-input {
    padding: 8px 12px !important;
    margin: 8px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-size: 14px;
}

/* ========================================
   CUSTOM SELECTR
   ======================================== */

div.custom-selectr li {
    text-align: center;
}

div.custom-selectr-v2 {
    width: 100%;
    border-color: transparent;
    min-height: 54px;
    padding-top: 0.25em;
}

/* ========================================
   SELECTR VARIANTE 37
   ======================================== */

div.selectr-container.selectr-37.selectr-desktop {
    height: 37.5px;
    min-height: 37.5px;
}

div.selectr-container.selectr-37.selectr-desktop > .selectr-selected {
    height: 35px;
    border: 1px solid transparent;
    font-size: 14px;
}

/* ========================================
   ESTILOS ADICIONALES PARA ERRORES
   ======================================== */

/* Campo requerido con error */
.wtk-data-grid .error-message,
.line-grid .error-message {
    color: #d32f2f;
    font-size: 11px;
    margin-top: 4px;
    display: block;
}

/* Input con error */
input.error,
select.error {
    border-color: #d32f2f !important;
    background-color: #ffebee !important;
}

/* Texto de campo requerido */
.required-field::after {
    content: " *";
    color: #d32f2f;
    font-weight: bold;
}