﻿/* ==========================================================================
   NIVEL 1: CONTENEDOR PRINCIPAL / OVERLAY
   ========================================================================== */

/*==================================================
=            INICIO HELP OVERLAY (CORREGIDO)
==================================================*/

.iniciohelp-overlay {
    position: fixed;
    inset: 0;
    background: #f4f6f9;
    z-index: 99900;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    backface-visibility: hidden;
    border-radius: 12px 12px 12px 12px;
    -webkit-backface-visibility: hidden;
    /* ESTADO CERRADO (Totalmente inactivo) */
    opacity: 0;
    visibility: hidden;
    pointer-events: none !important; /* Libera los clics hacia Inicio.cshtml */
    transform: translateX(100%); /* Lo saca de pantalla hacia la derecha */
    /* Transición suave para entrada y SALIDA */
    transition: transform .28s ease, opacity .28s ease, visibility .28s ease;
}

    /* ESTADO ABIERTO */
    .iniciohelp-overlay.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto !important; /* Captura clics solo al estar abierto */
        transform: translateX(0); /* Entra a pantalla */
    }


/* ==========================================================================
   NIVEL 2: LISTA DE NAVEGACIÓN PRINCIPAL (Hijo directo de inicioHelpWindow)
   ========================================================================== */

/* Clase: nav-listhelp | ID: main-navhelp */
.nav-listhelp {
    list-style: none;
    margin: 0;
    padding: 0;
}


/* ==========================================================================
   NIVEL 3: ELEMENTO DE LA LISTA (Hijo directo de main-navhelp)
   ========================================================================== */

/* Clase: nav-item-searchhelp */
.nav-item-searchhelp {
    padding: 5px 5px;
    height: 85px;
    background-color: #fff;
    border-radius: 12px 12px 0 0;
}


/* ==========================================================================
   NIVEL 4: CONTENEDOR DE LA BÚSQUEDA (Hijo directo de nav-item-searchhelp)
   ========================================================================== */

/* Clase: bdr-searchhelp */
.bdr-searchhelp {
    display: flex;
    align-items: center;
    width: 100%;
    height: 50px;
    min-width: 0;
    margin-top: 7px;
    padding: 0 16px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 50rem;
    color: #6c757d;
    box-sizing: border-box;
    user-select: none;
    overflow: hidden;
}


/* ==========================================================================
   NIVEL 5: ELEMENTOS INTERNOS DE BDR-SEARCHHELP (Hijos directos)
   ========================================================================== */

/* Clase: back-arrowhelp */
/* Flecha regresar */
.back-arrowhelp {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 100%;
    margin-right: 6px;
    font-size: 28px;
    line-height: 1;
    color: #444;
    flex: 0 0 28px;
    cursor: pointer;
    user-select: none;
}

/* Clase: bdr-cobertura */
.bdr-cobertura {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 0;
    padding: 4px 12px;
    border-radius: 3rem;
    background-color: tomato;
    box-sizing: border-box;
    user-select: none;
}

/* Clase: searchbarhelp | ID: search-containerhelp | Name: search-barhelp */
#search-containerhelp {
    display: block;
    flex: 1 1 0;
    min-width: 0;
    width: 0;
    height: 100%;
    margin: 0;
    padding: 0 10px;
    border: none;
    border-radius: 0;
    background-color: transparent;
    outline: none;
    font-size: 16px;
    line-height: normal;
    color: #374151;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}


/* Botón drop */
.btn-drop {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 25px;
    width: 25px;
    min-width: 25px;
    height: 25px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #6b7280;
    outline: none;
    box-sizing: border-box;
    cursor: pointer;
    user-select: none;
    animation: breatheDrop 3s ease-in-out infinite;
    transition: transform 0.2s ease-in-out;
    -webkit-appearance: none;
    appearance: none;
}
/* Ocultación por JS */
.btn-drop-hidden {
    opacity: 0;
    display: none;
    pointer-events: none;
}

    /* Contenedor de los SVG */
    .btn-drop .drop-icon-wrapper {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        flex: 0 0 18px;
        transform: rotate(0deg);
        transform-origin: center;
        transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }


    /* SVG superpuestos correctamente */
    .btn-drop .drop-close,
    .btn-drop .drop-left,
    .btn-drop .drop-open {
        position: absolute;
        inset: 0;
        display: block;
        width: 18px;
        height: 18px;
        margin: auto;
        fill: none;
        stroke: currentColor;
        box-sizing: border-box;
        transition: opacity 0.2s ease-in-out;
    }

/* --- CONTROL DE VISIBILIDAD INICIAL (Estado Cerrado) --- */
.btn-drop .drop-close {
    opacity: 1;
}
/* Se ve la flecha abajo ∨ */
.btn-drop .drop-left {
    opacity: 0;
}
/* Oculto */
.btn-drop .drop-open {
    opacity: 0;
}
/* Oculto */

/* ==================================================
   ABRIR: ABAJO → IZQUIERDA → ARRIBA
   ================================================== */

.btn-drop.open {
    animation-play-state: paused;
}

    .btn-drop.open .drop-icon-wrapper {
        transform: rotate(0deg);
    }


    /* Flecha hacia abajo */
    .btn-drop.open .drop-close {
        animation: arrowDownOpen 0.6s forwards;
    }

    /* Flecha hacia la izquierda */
    .btn-drop.open .drop-left {
        animation: arrowLeftOpen 0.6s forwards;
    }

    /* Flecha hacia arriba */
    .btn-drop.open .drop-open {
        animation: arrowUpOpen 0.6s forwards;
    }


@keyframes arrowDownOpen {
    0% {
        opacity: 1;
    }

    30%, 100% {
        opacity: 0;
    }
}

@keyframes arrowLeftOpen {
    0%, 25% {
        opacity: 0;
    }

    40%, 60% {
        opacity: 1;
    }

    75%, 100% {
        opacity: 0;
    }
}

@keyframes arrowUpOpen {
    0%, 65% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}


/* ==================================================
   CERRAR: ARRIBA → IZQUIERDA → ABAJO
   ================================================== */

.btn-drop.closing {
    animation-play-state: paused;
}

    .btn-drop.closing .drop-icon-wrapper {
        transform: rotate(0deg);
    }


    /* Flecha hacia arriba */
    .btn-drop.closing .drop-open {
        animation: arrowUpClose 0.6s forwards;
    }

    /* Flecha hacia la izquierda */
    .btn-drop.closing .drop-left {
        animation: arrowLeftClose 0.6s forwards;
    }

    /* Flecha hacia abajo */
    .btn-drop.closing .drop-close {
        animation: arrowDownClose 0.6s forwards;
    }


@keyframes arrowUpClose {
    0% {
        opacity: 1;
    }

    30%, 100% {
        opacity: 0;
    }
}

@keyframes arrowLeftClose {
    0%, 25% {
        opacity: 0;
    }

    40%, 60% {
        opacity: 1;
    }

    75%, 100% {
        opacity: 0;
    }
}

@keyframes arrowDownClose {
    0%, 65% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}


/* ==================================================
   ESTADOS FINALES
   ================================================== */

/* Abierto: se queda apuntando arriba */
.btn-drop.open .drop-close,
.btn-drop.open .drop-left {
    animation-fill-mode: forwards;
}

.btn-drop.open .drop-open {
    animation-fill-mode: forwards;
}


/* Cerrado normal: se queda apuntando abajo */
.btn-drop:not(.open):not(.closing) .drop-close {
    opacity: 1;
}

.btn-drop:not(.open):not(.closing) .drop-left,
.btn-drop:not(.open):not(.closing) .drop-open {
    opacity: 0;
}

/* ==========================================
   TEXTO "BUSCAR EN WACHATWEB..."
   ========================================== */

.searchtxthelp {
    display: none;
    color: #9aa3af; /* Gris claro */
    font-size: 16px;
    user-select: none;
    flex: 1;
    height: 52px;
    margin-right: 0;
    padding: 0 12px;
    border: none;
    background-color: transparent;
    outline: none;
    box-sizing: border-box;
    cursor:text;
    align-content:center;
    text-wrap:nowrap;
}

/* ==========================================
   VISIBILIDAD INPUT / TEXTO
   ========================================== */

.help-visible {
    display: block !important;
}

.help-hidden {
    display: none !important;
}
/* --- DEFINICIÓN DE ANIMACIONES (Keyframes) --- */

/* 1. La respiración: Sube y baja 1.5px sutilmente todo el tiempo */
@keyframes breatheDrop {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-1.5px);
    }
}

/* 2. El descenso al abrir: Hace que el icono que apunta arriba se asiente bajando un poco */
@keyframes dipOpenIcon {
    0% {
        transform: translateY(-4px);
        opacity: 0;
    }

    50% {
        transform: translateY(2px); /* Baja un poco de más */
        opacity: 1;
    }

    100% {
        transform: translateY(0); /* Se estabiliza en su posición */
    }
}
/* Clase: btn-clear | ID: btn-clear-search | Name: btn-clearsearch */
/* Botón limpiar */
.btn-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 25px;
    width: 25px;
    min-width: 25px;
    height: 25px;
    margin: 0 0 0 4px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    outline: none;
    box-sizing: border-box;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}



    .btn-clear:hover {
        background: rgba(107, 114, 128, 0.25);
        border: none;
    }

/* Ocultación por JS */
.btn-clear-hidden {
    opacity: 0;
    display: none;
    pointer-events: none;
}


/* ==========================================================================
   NIVEL 6: SUB-ELEMENTOS (Hijos de bdr-cobertura, btn-drop y btn-clear)
   ========================================================================== */

/* --- Hijos de bdr-cobertura --- */

/* Clase: label-cobertura */
.label-cobertura {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #ffffff;
    margin-right: 8px;
    flex-shrink: 0;
    user-select: none;
}

/* Clase: txt-largo (No declarado en tu CSS original, disponible si lo requieres) */

/* Clase: txt-corto */
.txt-corto {
    display: none;
}

/* Clase: close-cobertura */
.close-cobertura {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #ffffff;
    opacity: 0.7;
    flex-shrink: 0;
    user-select: none;
cursor:not-allowed;
}



/* --- Hijo de btn-clear --- */

/* Clase: text-clear (No declarado en tu CSS original, disponible si lo requieres) */

/* X del botón limpiar */
.text-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    font-style: normal;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    transform: translateY(-1px);
}
/* ==========================================================================
   NIVEL 2 (CONTINUACIÓN): CONTENEDOR DE CONTENIDO (Hijo de inicioHelpWindow)
   ========================================================================== */

/* Clase: inicioHelp-content | ID: inicioHelpContent */
.inicioHelp-content {
    margin-top: 3px;
    background-color: #f4f6f9;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

/* Contenedor de la barra de navegación (Primera Fila) */
.help-tabs-nav {
    display: none;
    align-items: center;
    border-bottom: 2px solid #e5e7eb; /* Línea base gris claro */
    width: 100%;
    background-color: #ffffff;
    /* Aseguramos que el punto de origen del efecto sea arriba */
    transform-origin: top center;
    animation: slideDownFade 0.25s ease-out forwards;
}

    .help-tabs-nav.visible {
        display: flex;
        /* Dispara la animación de aparecer bajando: dura 0.25 segundos */
        animation: slideDownFade 0.25s ease-out forwards;
    }

/* --- DEFINICIÓN DEL EFECTO --- */
@keyframes slideDownFade {
    0% {
        opacity: 0;
        /* Arranca 10px más arriba de su posición original */
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        /* Se asienta en su lugar original */
        transform: translateY(0);
    }
}
  
    /* Cada botón/pestaña individual */
    .tab-item {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        padding: 12px 16px;
        user-select: none;
        outline: none;
        position: relative;
        color: #6b7280; /* Gris por defecto */
        font-size: 14px;
        font-weight: 500;
        gap: 8px; /* Separación fija entre el icono y el texto */
        transition: color 0.2s ease, background-color 0.2s ease;
    }

    /* Efecto Hover (Al pasar el mouse) */
    .tab-item:hover {
        color: #374151; /* Gris más oscuro */
        background-color: #f9fafb; /* Fondo sutil */
    }

    /* Estilo de la pestaña ACTIVA */
    .tab-item.active {
        color: #ff7f50; /* Tu color Coral para hacer match con el diseño anterior */
    }

        /* Línea de color debajo de la pestaña activa */
        .tab-item.active::after {
            content: '';
            position: absolute;
            bottom: -2px; /* Se posiciona exactamente sobre el borde del contenedor padre */
            left: 0;
            width: 100%;
            height: 2px;
            background-color: #ff7f50; /* Línea Coral */
        }

/* Estilos de los iconos SVG dentro de las pestañas */
.tab-iconx {
    width: 18px;
    height: 18px;
    stroke: currentColor; /* El icono hereda automáticamente el color del texto del botón */
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    transition: transform 0.2s ease;
}
.search-breadcrumb {
    font-size: 13px;
    font-weight: 500;
    /* Un gris oscuro suave, limpio y legible (entre negro y gris claro) */
    color: #4b5563;
    margin-bottom: 16px;
    /* Evita que el contenedor colapse cuando esté vacío */
    min-height: 20px;
    /* Ocupa todo el ancho para alinearse perfectamente a la izquierda */
    display: block;
    text-align: left;
    width: 100%;
    letter-spacing: 0.5px;
}
/* Pequeño efecto interactivo: el icono se mueve un poco hacia arriba al pasar el mouse */
.tab-item:hover .tab-iconx {
    transform: translateY(-1px);
}
/* Contenedor general del cuerpo */
.help-tab-body {
    padding: 24px;
    display: none;
    flex-direction: column;
    align-items: center;
    background-color: #ffffff;
}
.help-tab-body.visible {
    display: flex;

}


/* Estilo base para cada panel de pestaña */
.tab-panel {
    display: none; /* Ocultos por defecto */
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    margin-top: 10px;
    animation: fadeInPanel 0.3s ease-out forwards;
}

    /* Mostrar solo el panel activo */
    .tab-panel.active {
        display: flex;
    }

/* Icono gigante central */
.panel-hero-icon {
    width: 64px;
    height: 64px;
    color: #ff7f50; /* Tu tono Coral emblemático */
    margin-bottom: 16px;
}

/* Etiquetas informativas */
.panel-label {
    font-size: 14px;
    color: #4b5563;
    font-weight: 500;
    margin-bottom: 8px;
}

/* Estilizado limpio para los Selects */
.panel-select {
    width: 100%;
    max-width: 320px;
    padding: 10px 14px;
    font-size: 14px;
    color: #374151;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

    .panel-select:focus {
        border-color: #ff7f50;
    }

/* ================= CONTENEDOR DE BOTONES ================= */
.help-action-nav {
    display: flex;
    width: 100%;
    flex-direction: column; /* Apila la sub-fila arriba y el botón aceptar abajo */
    max-width: 320px;
    /* Empuja el botón Siguiente a la derecha si Anterior desaparece */
    justify-content: space-between;
    margin-top: 8px;
}


/* La fila interna que tiene Anterior y Siguiente */
.help-nav-row {
    display: flex;
    width: 100%;
    justify-content: space-between; /* Mantiene uno a la izquierda y otro a la derecha */
}
/* Estilo general de los botones */
.btn-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 0.375rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
}

    /* Botón Siguiente (Llamativo en Coral) */
    .btn-nav.btn-next {
        background-color: #ff7f50;
        border: 1px solid #ff7f50;
        color: #ffffff;
        margin-left: auto; /* Truco Flexbox: si está solo, se alinea a la derecha */
    }
    /* Botón Siguiente (Llamativo en Coral) */
    .btn-nav.btn-accept {
        background-color: #00ff90; /* Tu verde brillante */
        border: 1px solid #d1d5db; /* Ajustado para que combine mejor con el diseño */
        color: #111827; /* Texto oscuro para que tenga excelente contraste sobre el verde */
        font-weight: 600;
        /* --- CAMBIOS PARA CENTRARLO --- */
        margin: 5px auto 0 auto; /* 5px arriba, automático a los lados, 0 abajo */
        padding: 8px 24px; /* Un poco más de espacio a los lados para que tenga cuerpo al estar centrado */
        width: max-content; /* Hace que el botón mida solo lo que mide su texto interno + el padding */
    }

        .btn-nav.btn-next:hover {
            background-color: #e66e40;
        }

    /* Botón Anterior (Discreto en Gris) */
    .btn-nav.btn-prev {
        background-color: #ffffff;
        border: 1px solid #d1d5db;
        color: #4b5563;
    }

        .btn-nav.btn-prev:hover {
            background-color: #f9fafb;
            color: #111827;
        }

/* Iconos de los botones (Flechitas) */
.btn-nav-icon {
    width: 16px;
    height: 16px;
}

/* ================= REGLA DE DESHABILITADO DINÁMICO ================= */
/* Estilo cuando el botón Anterior está deshabilitado */
.btn-prev:disabled,
.btn-next:disabled {
    opacity: .4;
    cursor: default;
}
.btn-accept:disabled {
    opacity: .4;
    cursor: default;
}
/* Animación sutil de entrada */
@keyframes fadeInPanel {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}