/* =========================================
   1. Variables Globales
========================================= */
:root {
    --rosa-principal: #f7a1c4;
    --rosa-fuerte: #d72660;
    --rosa-claro: #ffe0ef;
    --rosa-translucido: rgba(255, 192, 203, 0.25);
    --rosa-blur: rgba(255, 192, 203, 0.18);
    --rosa-borde: rgba(255, 192, 203, 0.35);
    --rosa-white: rgba(255, 255, 255, 0.85);
    --shadow-soft: 0 2px 8px rgba(31, 38, 135, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.7);
}

/* =========================================
   2. Botón disparador (Opener)
========================================= */
.vtaxs-open-popup-icon {
    background: transparent !important;
    color: var(--rosa-fuerte);
    border: none !important;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s ease, color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    outline: none !important;
}
.vtaxs-open-popup-icon:hover,
.vtaxs-open-popup-icon:focus,
.vtaxs-open-popup-icon:active {
    transform: scale(1.15);
    color: var(--rosa-principal);
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

/* =========================================
   3. Contenedores Principales
========================================= */
.vtaxs-container * {
    box-sizing: border-box;
}

.vtaxs-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
    width: 100%;
    max-width: 500px;
    background: var(--rosa-blur);
    padding: 20px 24px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1.5px solid var(--rosa-borde);
    position: relative;
    z-index: 1;
    margin: 20px auto;
    box-shadow: var(--shadow-soft);
    border-radius: 15px;
    box-sizing: border-box;
    max-height: 90vh;
    overflow-y: auto;
}

.vtaxs-container::-webkit-scrollbar { width: 6px; }
.vtaxs-container::-webkit-scrollbar-thumb { background: var(--rosa-principal); border-radius: 10px; }

/* =========================================
   4. Formularios y Filtros
========================================= */
.vtaxs-select,
.vtaxs-radius-input {
    width: 100%;
    height: 38px;
    padding: 8px 12px;
    font-size: 15px;
    background: var(--rosa-white);
    color: #2d2d2d;
    border: 1.5px solid var(--rosa-principal);
    border-radius: 8px;
    box-shadow: 0 2px 8px 0 rgba(255, 192, 203, 0.08);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.vtaxs-taxonomy-group label {
    color: #333;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 6px;
    text-align: left;
    display: block;
}

/* =========================================
   5. Botones (Buscar y Limpiar)
========================================= */
.vtaxs-button-group {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    width: 100% !important;
    gap: 10px !important;
    margin-top: 5px !important;
}

.vtaxs-redirect-button {
    flex-grow: 1 !important;
    height: 42px !important;
    margin-top: 0 !important;
    padding: 0 22px;
    background: var(--rosa-fuerte);
    border: 1.5px solid var(--rosa-fuerte);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px 0 rgba(215, 38, 96, 0.3);
    transition: all 0.25s ease;
}

.vtaxs-redirect-button:disabled {
    background: var(--rosa-blur);
    border-color: var(--rosa-borde);
    color: rgba(255,255,255,0.7);
    cursor: not-allowed;
    box-shadow: none;
}

.vtaxs-clear-button {
    width: 42px !important;
    height: 42px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    background: var(--rosa-blur) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1.5px solid var(--rosa-borde);
    color: #fff; 
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.vtaxs-redirect-button:not(:disabled):hover,
.vtaxs-clear-button:hover {
    background: var(--rosa-fuerte) !important;
    border-color: var(--rosa-fuerte);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(215, 38, 96, 0.4);
    color: #fff;
}

/* =========================================
   6. Elementos Específicos y Animaciones
========================================= */
@keyframes popupEntrada {
    0% { opacity: 0; transform: translateY(15px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.vtaxs-radius-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
    justify-content: flex-start;
}

.vtaxs-pill {
    background: var(--rosa-white);
    border: 1.5px solid var(--rosa-principal);
    color: #d72660;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(215, 38, 96, 0.05);
}

.vtaxs-pill:hover {
    background: var(--rosa-claro);
    border-color: var(--rosa-fuerte);
}

.vtaxs-pill.active {
    background: var(--rosa-fuerte);
    border-color: var(--rosa-fuerte);
    color: white;
    box-shadow: 0 4px 10px rgba(215, 38, 96, 0.3);
}

/* Modal Wrapper */
.vtaxs-popup-wrapper {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
}

.vtaxs-popup-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}

.vtaxs-popup-content {
    position: relative;
    z-index: 10000;
    width: 500px;
    max-width: 92vw;
    animation: popupEntrada 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Corrección Select2 */
.select2-container--open,
.select2-container--default .select2-dropdown {
    z-index: 9999999 !important; 
}
.select2-container { width: 100% !important; text-align: left; }
.select2-container--default .select2-selection--single {
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1.5px solid var(--rosa-principal) !important;
    border-radius: 8px !important;
}
.select2-dropdown {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    border: 1.5px solid var(--rosa-principal) !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
    overflow: hidden;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--rosa-fuerte) !important;
    color: white;
}

@media (max-width: 768px) {
    .vtaxs-container { padding: 20px !important; }
}
