﻿/* --- 1. Configuración Global y Layout --- */
html {
    scroll-behavior: smooth;
}

:root {
    /* Morado Principal de la Landing (#673AB7) */
    --mud-palette-primary: #673AB7 !important;
    --mud-palette-primary-rgb: 103, 58, 183 !important;
    --mud-palette-primary-darken: #512DA8 !important; /* Más oscuro */
    --mud-palette-primary-lighten: #9575CD !important; /* Más claro */
    /* Forzar Info al mismo Morado */
    --mud-palette-info: #673AB7 !important;
    --mud-palette-info-rgb: 103, 58, 183 !important;
    /* Grises Neutros */
    --mud-palette-text-primary: #18181b !important;
    --mud-palette-text-secondary: #52525b !important;
    --mud-palette-background: #ffffff !important;
    --mud-palette-surface: #ffffff !important;
    /* El degradado exacto de tu Landing */
    --devcloud-gradient: linear-gradient(90deg, #673AB7 0%, #9575CD 100%);
}

.mud-layout {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
}

.mud-main-content {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    padding-top: 64px !important;
}

footer {
    margin-top: auto;
    flex-shrink: 0;
}

/* --- 2. Navegación y Capas (Z-Index) --- */
.mud-drawer {
    z-index: 1401 !important;
}

.mud-drawer-overlay {
    z-index: 1400 !important;
}

/* --- 3. Landing Page (Hero y Registro) --- */
.hero-container {
    position: relative;
    padding: 80px 20px;
    background: radial-gradient(circle at 50% 0%, rgba(var(--mud-palette-primary-rgb), 0.08) 0%, transparent 70%);
    border-radius: 24px;
    overflow: hidden;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem) !important;
    line-height: 1.1;
    background: linear-gradient(90deg, var(--mud-palette-primary), var(--mud-palette-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-weight: 300;
    line-height: 1.6;
    color: var(--mud-palette-text-secondary);
}

.registration-page {
    min-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

/* --- 4. Botones y Efectos --- */
.btn-glow {
    box-shadow: 0 4px 15px rgba(var(--mud-palette-primary-rgb), 0.3);
    transition: all 0.3s ease;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0.5px;
}

    .btn-glow:hover:not(:disabled) {
        box-shadow: 0 8px 25px rgba(var(--mud-palette-primary-rgb), 0.5);
        transform: translateY(-2px);
    }

    .btn-glow:disabled {
        box-shadow: none;
        background-color: #f1f5f9 !important;
        color: #94a3b8 !important;
    }

/* --- 5. Tarjetas y Listado de Empresas --- */
.glass-card-compact {
    border-radius: 20px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.animated-card {
    transition: all 0.3s ease-in-out;
}

    .animated-card:hover {
        transform: translateY(-8px);
    }

.icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease-in-out;
}

.animated-card:hover .icon-circle {
    transform: scale(1.15) rotate(5deg);
}

.text-muted-custom {
    color: #71717a !important; /* Gris neutro profundo */
    font-size: 0.85rem;
    line-height: 1.4;
}

.border-1 {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* --- 6. Animaciones --- */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.plan-animate {
    animation: fadeInScale 0.6s ease-out forwards;
}

/* --- 7. Modales y Formularios --- */
.glass-dialog {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(12px);
    border-radius: 24px !important;
    border: 1px solid rgba(var(--mud-palette-primary-rgb), 0.15) !important;
    min-width: 400px;
}

    /* Forzar que el texto sea siempre visible y oscuro */
    .glass-dialog input.mud-input-slot {
        color: #334155 !important;
        -webkit-text-fill-color: #334155 !important;
        font-weight: 400 !important;
        font-size: 1rem !important;
    }

/* Estilo para la caja de texto Outlined */
.bg-light-input {
    background-color: #ffffff !important;
    border-radius: 12px !important;
}

.glass-dialog .mud-input-label {
    color: #71717a !important;
    font-weight: 500 !important;
}

/* Quitar el azul de los bordes y sombras de MudBlazor */
.mud-input-outlined.mud-input-outlined-info:focus-within .mud-input-outlined-border,
.mud-input-outlined.mud-input-outlined-primary:focus-within .mud-input-outlined-border {
    border-color: #673AB7 !important;
}

/* Fuerza la visualización en MAYÚSCULAS en el input */
.uppercase-input input {
    text-transform: uppercase !important;
}

/* --- 8. Diálogo Premium DevCloud --- */
.custom-confirm-modal {
    border-radius: 28px !important;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
}

.modal-header-gradient {
    background: linear-gradient(135deg, #673AB7 0%, #512DA8 100%);
    margin: -24px -24px 0 -24px;
}

.rfc-highlight {
    color: #673AB7;
    font-weight: 800;
    background: rgba(103, 58, 183, 0.1); /* rgb(103, 58, 183) */
    padding: 2px 8px;
    border-radius: 6px;
    font-family: 'Fira Code', monospace;
}

/* Alertas Modernas */
.alert-modern {
    display: flex;
    background: #fff5f5;
    border-radius: 16px;
    border-left: 6px solid #ff5252;
    overflow: hidden;
}

.alert-icon-section {
    background: #ff5252;
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
}

.alert-content-section {
    padding: 16px;
    color: #c62828;
}

.icon-pulse-container {
    background: white;
    border-radius: 50%;
    padding: 10px;
    display: flex;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.action-btn-primary {
    height: 48px;
    font-weight: 700 !important;
    letter-spacing: 1px;
}

.action-btn-secondary {
    height: 48px;
    border-width: 2px !important;
    color: #64748b !important;
}

/* --- 9. Modal de Reconexión de Blazor --- */
#components-reconnect-modal {
    display: none !important;
}

    #components-reconnect-modal.components-reconnect-show {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 6px !important;
        background: #594ae2 !important;
        z-index: 20000 !important;
        overflow: hidden;
        background: #673AB7 !important;
    }

        #components-reconnect-modal.components-reconnect-show::after {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 50%;
            height: 100%;
            background: rgba(255,255,255,0.5);
            animation: bar-loading 1.5s infinite ease-in-out;
        }

@keyframes bar-loading {
    0% {
        left: -50%;
    }

    100% {
        left: 100%;
    }
}

/* --- 10. FORZADO DE COLOR MORADO SOBRE MUDBLAZOR --- */
.mud-primary-text, .mud-info-text {
    color: #673AB7 !important;
}

.mud-chip-filled.mud-chip-color-info,
.mud-button-filled.mud-button-filled-primary,
.mud-button-filled.mud-button-filled-info,
.mud-progress-linear-bar,
.mud-button-group-root .mud-button-filled.mud-button-filled-primary {
    background-color: #673AB7 !important;
}

.mud-nav-link.active:not(.mud-nav-link-disabled) {
    background-color: rgba(103, 58, 183, 0.1) !important;
    color: #673AB7 !important;
}

    .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-icon {
        color: #673AB7 !important;
    }

.mud-menu-list .mud-list-item:hover {
    background-color: rgba(103, 58, 183, 0.05) !important;
    color: #673AB7 !important;
}




/* Animación para que el texto parpadee o "latte" */
.animate-pulse {
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: .4;
    }
}


/* Chat Puntitos */
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 4px 12px;
    background-color: rgba(103, 58, 183, 0.08); /* Fondo morado suave */
    border-radius: 16px;
    width: fit-content;
}

.typing-dot {
    width: 6px !important;
    height: 6px !important;
    background-color: #673AB7 !important; /* Color morado directo */
    border-radius: 50%;
    margin: 0 2px;
    display: inline-block;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

/* Si esto no funciona, es que la animación está escalando a 0 y no vuelve */
@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0.3); /* No bajar a 0 para siempre verlos */
        opacity: 0.3;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

    .typing-dot:nth-child(1) {
        animation-delay: -0.32s;
    }

    .typing-dot:nth-child(2) {
        animation-delay: -0.16s;
    }



/* Chat Puntitos */



/* Burbuja base CHAT */
.chat-bubble {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 18px;
    max-width: 85%; /* Para que no pegue al borde opuesto */
    word-wrap: break-word; /* Rompe palabras largas */
    line-height: 1.4;
    font-size: 0.9rem;
    position: relative;
    margin-bottom: 4px;
}

/* Burbuja del que envía (Mía) - Morada */
.bubble-mine {
    background-color: var(--mud-palette-primary);
    color: white;
    border-bottom-right-radius: 4px; /* Efecto colita de chat */
}

/* Burbuja del que recibe (Soporte/Cliente) - Gris */
.bubble-other {
    background-color: #e4e6eb;
    color: #1c1e21;
    border-bottom-left-radius: 4px;
}
/* Burbuja base CHAT */



/* Burbuja base correo */
.custom-dialog-glass {
    border: 1px solid rgba(103, 58, 183, 0.1) !important;
    box-shadow: 0 15px 30px -5px rgba(103, 58, 183, 0.2) !important;
    backdrop-filter: blur(10px);
}

.dialog-header-gradient {
    background: linear-gradient(135deg, #673AB7 0%, #512DA8 100%);
}

.bg-light-input .mud-input-control-input-container {
    background-color: #f8fafc !important;
    border-radius: 8px;
}

.bg-light-input.mud-input-outlined-primary:focus-within .mud-input-control-input-container {
    background-color: #ffffff !important;
}
/* Burbuja base correo */