/* 
 * Universe CRM Plugin Styles 
 * Theme: Material Design, Purple & Black
 */

:root {
    --universe-primary: #7c3aed;
    /* Purple */
    --universe-primary-dark: #5b21b6;
    --universe-secondary: #0f172a;
    /* Deep Black/Blue */
    --universe-bg: #f8fafc;
    --universe-text: #334155;
    --universe-text-light: #64748b;
    --universe-white: #ffffff;
    --universe-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --universe-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --universe-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --universe-radius: 8px;
    --universe-radius-lg: 16px;
}

body {
    background-color: var(--universe-bg);
    color: var(--universe-text);
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
}

/* Base Buttons */
.universe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: var(--universe-radius);
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.universe-btn-primary {
    background-color: var(--universe-primary);
    color: var(--universe-white);
    box-shadow: var(--universe-shadow-md);
}

.universe-btn-primary:hover {
    background-color: var(--universe-primary-dark);
    box-shadow: var(--universe-shadow-lg);
    transform: translateY(-2px);
}

.universe-btn-outline {
    background-color: transparent;
    color: var(--universe-primary);
    border: 2px solid var(--universe-primary);
}

.universe-btn-outline:hover {
    background-color: rgba(124, 58, 237, 0.05);
}

.universe-btn-large {
    padding: 14px 32px;
    font-size: 1.125rem;
    border-radius: 24px;
}

.universe-btn-full {
    width: 100%;
    margin-top: 16px;
    padding: 12px;
}

/* Header */
.universe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: var(--universe-white);
    box-shadow: var(--universe-shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.universe-logo,
.universe-logo-large {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--universe-primary);
}

.universe-logo h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--universe-secondary);
}

.universe-logo .material-icons {
    font-size: 2rem;
}

.universe-nav a {
    color: var(--universe-text);
    text-decoration: none;
    margin: 0 16px;
    font-weight: 500;
    transition: color 0.2s;
}

.universe-nav a:hover {
    color: var(--universe-primary);
}

.universe-actions {
    display: flex;
    gap: 12px;
}

/* Hero Section */
.universe-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 80px 5%;
    background: linear-gradient(135deg, var(--universe-bg) 0%, #e2e8f0 100%);
    min-height: 70vh;
}

.universe-hero-content {
    flex: 1;
    max-width: 600px;
}

.universe-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--universe-secondary);
    margin-bottom: 24px;
}

.universe-highlight {
    color: var(--universe-primary);
    position: relative;
    display: inline-block;
}

.universe-highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 12px;
    background-color: rgba(124, 58, 237, 0.2);
    border-radius: 4px;
    z-index: -1;
}

.universe-subtitle {
    font-size: 1.25rem;
    color: var(--universe-text-light);
    line-height: 1.6;
    margin-bottom: 40px;
}

.universe-cta-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.universe-security-note {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--universe-text-light);
}

.universe-security-note .material-icons {
    font-size: 1rem;
    color: #10b981;
    /* Green */
}

/* Hero Mockup (Right side visual) */
.universe-hero-image {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    padding-left: 40px;
}

.universe-mockup-window {
    width: 350px;
    background-color: var(--universe-white);
    border-radius: var(--universe-radius-lg);
    box-shadow: var(--universe-shadow-lg);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.universe-mockup-header {
    background-color: #f1f5f9;
    padding: 12px;
    display: flex;
    gap: 6px;
    border-bottom: 1px solid #e2e8f0;
}

.universe-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.universe-dot.red {
    background-color: #ef4444;
}

.universe-dot.yellow {
    background-color: #f59e0b;
}

.universe-dot.green {
    background-color: #10b981;
}

.universe-mockup-body {
    padding: 24px;
    background-color: #E5DDD5;
    /* Whatsapp style bg */
    height: 300px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.universe-chat-message {
    display: flex;
    gap: 8px;
    max-width: 85%;
}

.universe-chat-message.sent {
    align-self: flex-end;
    align-items: flex-end;
}

.universe-back-btn {
    position: fixed;
    /* Fixed para evitar que interactúe con el flex interno */
    top: 50px;
    /* Separación superior para que no esté pegado al borde */
    right: 50px;
    /* Alineación a la derecha */
    color: var(--universe-white);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Transición con un suave rebote (spring) */
    background: rgba(255, 255, 255, 0.05);
    /* Fondo casi transparente */
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 28px;
    border-radius: 40px;
    /* Completamente redondeado */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    /* Sombra inicial suave */
    z-index: 10000;
    /* Siempre por encima */
    letter-spacing: 0.5px;
}

.universe-back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    /* Más brillo al pasar el cursor */
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-4px) scale(1.02);
    /* Eleva y agranda ligeramente */
    color: var(--universe-white);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.25), 0 0 15px rgba(255, 255, 255, 0.2);
    /* Sombra más grande y un glow sutil */
}

.universe-back-btn:hover .material-icons {
    transform: translateX(-4px);
    /* El ícono se desliza a la izquierda en hover */
}

.universe-back-btn:active {
    transform: translateY(1px) scale(0.98);
    /* Efecto de hundimiento rápido */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.1s ease;
}

.universe-back-btn .material-icons {
    font-size: 20px;
    transition: transform 0.3s ease;
    /* Transición fluida para el ícono */
}

.universe-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.universe-agent-avatar {
    background-color: var(--universe-secondary);
}

.universe-bubble {
    background-color: var(--universe-white);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    box-shadow: var(--universe-shadow-sm);
    line-height: 1.4;
}

.universe-chat-message.sent .universe-bubble {
    background-color: #dcf8c6;
}

/* Floating Icons */
.universe-floating-icon {
    position: absolute;
    width: 48px;
    height: 48px;
    background-color: var(--universe-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--universe-shadow-md);
    animation: float 3s ease-in-out infinite;
}

.universe-floating-icon img {
    width: 24px;
    height: 24px;
}

.universe-floating-icon.wapp {
    top: 20px;
    right: 0;
    animation-delay: 0s;
}

.universe-floating-icon.fbm {
    bottom: 80px;
    left: 0;
    animation-delay: 1s;
}

.universe-floating-icon.ig {
    top: 150px;
    right: -20px;
    animation-delay: 2s;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Features Section */
.universe-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    padding: 80px 5%;
    background-color: var(--universe-white);
}

.universe-feature-card {
    padding: 32px;
    border-radius: var(--universe-radius-lg);
    background-color: var(--universe-bg);
    transition: transform 0.3s ease;
    border: 1px solid #e2e8f0;
}

.universe-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--universe-shadow-md);
    border-color: var(--universe-primary);
}

.universe-feature-icon {
    width: 56px;
    height: 56px;
    background-color: rgba(124, 58, 237, 0.1);
    color: var(--universe-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.universe-feature-icon .material-icons {
    font-size: 32px;
}

.universe-feature-card h3 {
    margin: 0 0 12px 0;
    color: var(--universe-secondary);
    font-size: 1.25rem;
}

/* Login Page Styles */
.universe-login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100vw;
    background: linear-gradient(135deg, var(--universe-primary-dark) 0%, var(--universe-secondary) 100%);
    padding: 20px;
    box-sizing: border-box;

    /* Forzar que anule los paddings de Astra/WP */
    margin: 0;
    position: fixed;
    /* Cambiado a Fixed para no hacer scroll blanco  */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    /* Z-index máximo para tapar estructura de Astra */
}

.universe-login-container {
    background-color: var(--universe-white);
    padding: 3rem;
    border-radius: var(--universe-radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    width: 100% !important;
    /* Forzar el ancho relativo */
    max-width: 440px !important;
    /* Forzar límite para que no se estire */
    box-sizing: border-box;
    /* Aseguramos que se mantenga centrado y no se estire */
    position: absolute;
    /* Sacarlo del flujo flex normal para centrar con transform */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0 !important;
}

.universe-login-header {
    text-align: center;
    margin-bottom: 32px;
}

.universe-login-header h2 {
    color: var(--universe-secondary);
    margin: 16px 0 8px 0;
}

.universe-login-header p {
    color: var(--universe-text-light);
    margin: 0;
}

.universe-logo-large {
    justify-content: center;
}

.universe-logo-large .material-icons {
    font-size: 3rem;
}

.universe-input-group {
    position: relative;
    margin-bottom: 20px;
}

.universe-input-group .material-icons {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--universe-text-light);
}

.universe-input-group input {
    width: 100%;
    padding: 14px 48px 14px 48px;
    border: 1px solid #cbd5e1;
    border-radius: var(--universe-radius);
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.universe-input-group input:focus {
    outline: none;
    border-color: var(--universe-primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.universe-input-group .universe-toggle-password {
    left: auto;
    right: 16px;
    cursor: pointer;
    pointer-events: auto;
    transition: color 0.2s;
}

.universe-input-group .universe-toggle-password:hover {
    color: var(--universe-primary);
}

.universe-login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 0.875rem;
}

.universe-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--universe-text);
}

.universe-forgot-link {
    color: var(--universe-primary);
    text-decoration: none;
    font-weight: 500;
}

.universe-login-footer {
    margin-top: 32px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--universe-text-light);
}

.universe-login-footer a {
    color: var(--universe-primary);
    font-weight: 500;
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .universe-hero {
        flex-direction: column;
        text-align: center;
        padding-top: 40px;
    }

    .universe-header {
        flex-direction: column;
        gap: 16px;
    }

    .universe-title {
        font-size: 2.5rem;
    }

    .universe-hero-image {
        margin-top: 40px;
        padding-left: 0;
    }
}