﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

.highlight-effect {
    background-color: rgba(191, 219, 254, 0.8); /* Azul claro para modo día */
    transition: background-color 0.3s ease-in-out;
    border-radius: 3px;
    padding: 1px 2px;
    margin: -1px -2px;
}

.dark .highlight-effect {
    background-color: rgba(59, 130, 246, 0.4); /* Azul más visible para modo oscuro */
}

.btn-ai-premium:hover {
    opacity: 0.9;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.btn-ai-premium:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.tooltip-container {
    position: relative; /* Contexto de posicionamiento para el tooltip */
    display: inline-block; /* Se ajusta al contenido */
}

/* El texto visible del placeholder.
  Mantiene el estilo de subrayado y cursor.
*/
.placeholder-text {
    background-color: rgba(59, 130, 246, 0.1);
    border-bottom: 2px dotted rgba(59, 130, 246, 0.4);
    cursor: help;
}

/* La caja del tooltip. Estará oculta por defecto.
  Copiamos la mayoría de tus estilos originales aquí.
*/
.tooltip-box {
    /* Comportamiento y Posición */
    position: absolute;
    top: 120%; /* Posición justo debajo del texto */
    left: 0;
    z-index: 10;
    /* Oculto por defecto con una transición suave */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px); /* Efecto sutil de desplazamiento */
    transition: opacity 0.2s ease, transform 0.2s ease;
    /* Apariencia (tus estilos originales) */
    background-color: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    line-height: 1.25;
    text-align: left;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    /* Ajuste de texto */
    white-space: normal;
    width: max-content;
    max-width: 280px;
}

/* El disparador: Cuando pasas el mouse sobre el CONTENEDOR,
  hacemos visible la CAJA del tooltip.
*/
.tooltip-container:hover .tooltip-box {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Animación simple de entrada */
@keyframes fadeIn {
    to {
        opacity: 1;
        visibility: visible;
    }
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background-color: #9e9ea1;
    display: inline-block;
    border-radius: 50%;
    margin: 0 2px;
    animation: bounce 1.4s infinite ease-in-out both;
}

.dark .typing-indicator span {
    background-color: #b0b0b5;
}

.typing-indicator span:nth-of-type(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-of-type(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.0);
    }
}

.toast {
    padding: 1rem;
    border-radius: 0.5rem;
    border-width: 1px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    animation: toast-in-right 0.5s;
}

@keyframes toast-in-right {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Estilo del cursor para indicar que se puede arrastrar */
#table-container {
    cursor: grab;
    cursor: -webkit-grab;
    user-select: none; /* Evita que el texto se seleccione al arrastrar */
}

    /* Estilo del cursor MIENTRAS se está arrastrando */
    #table-container.active-drag {
        cursor: grabbing;
        cursor: -webkit-grabbing;
    }


/* El @keyframes define la animación de pulso del brillo */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 8px 2px rgba(59, 130, 246, 0.4);
    }

    50% {
        box-shadow: 0 0 16px 4px rgba(59, 130, 246, 0.6);
    }
}

/* La clase que aplicaremos al input activo */
.field-highlight {
    /* Mantiene el borde normal pero añade un brillo animado */
    box-shadow: 0 0 8px 2px rgba(59, 130, 246, 0.4); /* color blue-500 con opacidad */
    border-color: #3b82f6 !important; /* blue-500 */
    animation: glow 1.5s infinite ease-in-out;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.grecaptcha-badge {
    visibility: hidden;
}

/* /wwwroot/css/site.css */

/*
  Clases base para las animaciones al hacer scroll.
  Todos los elementos a animar parten de un estado invisible y ligeramente desplazados.
*/
.animation-base {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/*
  Estado final cuando el elemento es visible.
  La transición se aplica al pasar de .animation-base a .is-visible
*/
.animation-base.is-visible {
  opacity: 1;
  transform: none;
}

/* --- TIPOS DE ANIMACIÓN --- */

/* Animación: Aparecer y subir */
.animation-base.fade-in-up {
  transform: translateY(20px);
}

/* Animación: Aparecer desde la izquierda */
.animation-base.fade-in-left {
  transform: translateX(-20px);
}

/* Animación: Aparecer desde la derecha */
.animation-base.fade-in-right {
  transform: translateX(20px);
}

/* Animación: Hacer zoom */
.animation-base.zoom-in {
  transform: scale(0.95);
}

/* Combinaciones para efectos más complejos */
.animation-base.zoom-in-left {
  transform: scale(0.95) translateX(-10px);
}

.animation-base.zoom-in-right {
  transform: scale(0.95) translateX(10px);
}

/* Animación para la línea en la sección "Cómo funciona" */
@keyframes flow {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.animate-line-flow {
  animation: flow 4s linear infinite;
}

.prose strong, .dark .prose-invert strong {
    color: inherit;
}

@keyframes pulse-once {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.7;
    }
}

.animate-pulse-once {
    animation: pulse-once 0.8s ease-in-out;
}

/* Nueva animación para la transición entre etapas */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stage-container {
    animation: fadeIn 0.6s ease-out;
}

/* Indicador de escritura del chatbot */
.chat-demo-typing {
    display: flex;
    align-items: center;
    justify-content: center;
}

    .chat-demo-typing span {
        height: 8px;
        width: 8px;
        margin: 0 2px;
        background-color: #9ca3af; /* gray-400 */
        border-radius: 50%;
        animation: chat-demo-bounce 1.4s infinite ease-in-out both;
    }

.dark .chat-demo-typing span {
    background-color: #6b7280; /* gray-500 */
}

.chat-demo-typing span:nth-child(1) {
    animation-delay: -0.32s;
}

.chat-demo-typing span:nth-child(2) {
    animation-delay: -0.16s;
}

/* Estilo para el texto en negrita dentro de la respuesta */
.chat-demo-response strong {
    color: #4f46e5; /* indigo-600 */
}

.dark .chat-demo-response strong {
    color: #818cf8; /* indigo-400 */
}

/* Animación de rebote para el indicador de escritura */
@keyframes chat-demo-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.0);
    }
}

/* Animación de aparición para los mensajes */
@keyframes chat-demo-fade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-demo-animate-fade {
    animation: chat-demo-fade 0.3s ease-out forwards;
}

/* =============================================== */
/* === Estilos para BlazoredTextEditor Dark Mode === */
/* =============================================== */

/* wwwroot/css/editor-styles.css */

.ql-editor {
    font-family: 'Roboto', sans-serif;
    min-height: 350px; /* Opcional: dale una altura mínima para que sea más cómodo escribir */
}

.dark .quill-editor-container .ql-toolbar {
    background: #1e293b; /* slate-800 */
    border-color: #334155 !important; /* slate-700 */
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.dark .quill-editor-container .ql-container {
    border-color: #334155 !important; /* slate-700 */
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.dark .quill-editor-container .ql-editor {
    background: #0f172a; /* slate-900 */
    color: #cbd5e1; /* slate-300 */
}

    .dark .quill-editor-container .ql-editor.ql-blank::before {
        color: #64748b; /* slate-500 */
        font-style: normal;
    }

.dark .quill-editor-container .ql-stroke {
    stroke: #94a3b8; /* slate-400 */
}

.dark .quill-editor-container .ql-fill {
    fill: #94a3b8; /* slate-400 */
}

.dark .quill-editor-container .ql-picker-label {
    color: #94a3b8; /* slate-400 */
}

.dark .quill-editor-container .ql-picker-options {
    background-color: #1e293b; /* slate-800 */
    border-color: #334155 !important; /* slate-700 */
    color: #cbd5e1; /* slate-300 */
}

.dark .quill-editor-container .ql-picker-item:hover {
    background-color: #334155; /* slate-700 */
    color: #f1f5f9; /* slate-100 */
}

/* TOOLBOX */

.submenu-bottom {
    top: 100%; /* Posiciona el submenú debajo del botón */
    margin-top: 0.5rem; /* mt-2 en Tailwind */
}

.submenu-top {
    bottom: 100%; /* Posiciona el submenú encima del botón */
    margin-bottom: 0.5rem; /* mb-2 en Tailwind */
}

.e-de-icon-InsertFormFields::before {
    font-family: 'bootstrap-icons' !important;
    content: "\F473"; /* Icono de lápiz con documento */
}

.current-field-highlight {
    background-color: rgba(255, 255, 0, 0.5) !important;
    transition: background-color 0.3s ease-in-out;
}