/* Demo - Estilos */

/* Login Screen */
.demo-login-overlay {
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.demo-login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 350px;
    max-width: 95vw;
    animation: fadeIn 0.3s ease-in-out;
}

.login-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.demo-login-card h2 {
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 1.8rem;
    text-align: center;
    color: #333;
}

.login-subtitle {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 25px;
    text-align: center;
}

.demo-password-input {
    padding: 12px 18px;
    border-radius: 30px;
    border: 1px solid #ddd;
    width: 100%;
    margin-bottom: 20px;
    font-size: 1.1rem;
    transition: border-color 0.3s;
}

.demo-password-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.demo-login-btn {
    background: #667eea;
    color: white;
    padding: 12px 36px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.demo-login-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.login-error {
    color: #d32f2f;
    margin-top: 12px;
    font-size: 0.9rem;
    animation: shake 0.3s;
}

.session-info {
    margin-top: 15px;
    font-size: 12px;
    color: #666;
    text-align: center;
}

.back-to-chat {
    margin-top: 20px;
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.back-to-chat:hover {
    color: #5568d3;
}

/* Dashboard */
.demo-dashboard {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.demo-main-content {
    width: calc(100% - 70px);
    margin-left: 70px;
    display: flex;
    flex-direction: column;
    background: #f5f7fa;
    overflow: hidden;
}

/* Header */
.demo-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid #e0e6ed;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header-title h1 {
    font-size: 1.8rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 8px 0;
}

.header-title h1 i {
    color: #667eea;
}

.demo-user-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.demo-badge {
    background: #ffd93d;
    color: #333;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.demo-phone {
    color: #667eea;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.header-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
}

.header-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Chat Container */
.demo-chat-container {
    display: flex;
    flex: 1;
    gap: 20px;
    padding: 20px 30px;
    overflow: hidden;
}

.chat-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #e5ddd5;
}

.welcome-message {
    text-align: center;
    padding: 40px 20px;
    color: #555;
}

.welcome-message i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.welcome-message h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.welcome-message p {
    margin: 8px 0;
    line-height: 1.6;
}

.welcome-message .info-text {
    font-size: 0.9rem;
    color: #888;
    margin-top: 15px;
    font-style: italic;
}

/* Messages */
.message {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    line-height: 1.5;
    animation: fadeInUp 0.3s;
    position: relative;
}

.message.user {
    background: #dcf8c6;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message.model {
    background: white;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.message-time {
    font-size: 0.75rem;
    color: #999;
    margin-top: 5px;
    text-align: right;
}

.typing-indicator {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    border-bottom-right-radius: 4px;
    max-width: 60px;
    margin-left: auto;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Chat Input */
.chat-input-container {
    padding: 15px;
    background: #f0f2f5;
    border-top: 1px solid #e0e6ed;
}

.chat-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.message-input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
}

.message-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-btn {
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.send-btn {
    background: #667eea;
    color: white;
}

.send-btn:hover {
    background: #5568d3;
    transform: scale(1.1);
}

.record-btn {
    background: #25d366;
    color: white;
}

.record-btn:hover {
    background: #1fb855;
    transform: scale(1.1);
}

.record-btn.recording {
    background: #ff4444;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
}

/* Info Panel */
.info-panel {
    width: 350px;
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
}

.info-panel h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-panel h3 i {
    color: #667eea;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f2f5;
}

.info-label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.info-value {
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.9rem;
}

.info-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #f0f2f5;
}

.info-section h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1rem;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
    font-size: 0.9rem;
}

.features-list li i {
    color: #25d366;
    font-size: 0.85rem;
}

.action-btn {
    width: 100%;
    margin-top: 25px;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
}

.action-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Responsive */
@media (max-width: 1024px) {
    .info-panel {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .demo-main-content {
        width: calc(100% - 60px);
        margin-left: 60px;
    }

    .demo-header {
        padding: 15px 20px;
    }

    .header-title h1 {
        font-size: 1.4rem;
    }

    .header-btn span {
        display: none;
    }

    .demo-chat-container {
        flex-direction: column;
        padding: 15px 20px;
    }

    .info-panel {
        width: 100%;
        order: -1;
        margin-bottom: 15px;
    }

    .chat-wrapper {
        min-height: 500px;
    }

    /* Ajustar input y botones en tablets */
    .chat-form {
        gap: 8px;
    }

    .message-input {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .input-btn {
        width: 42px;
        height: 42px;
        font-size: 1rem;
        flex-shrink: 0; /* Evitar que se compriman */
    }
}

@media (max-width: 480px) {
    .demo-main-content {
        width: calc(100% - 50px);
        margin-left: 50px;
    }

    .demo-login-card {
        padding: 30px 24px;
        min-width: 300px;
    }

    .message {
        max-width: 85%;
    }

    /* Ajustes específicos para móviles */
    .chat-input-container {
        padding: 12px;
    }

    .chat-form {
        gap: 6px;
    }

    .message-input {
        padding: 10px 14px;
        font-size: 0.9rem;
        min-width: 0; /* Permitir que se reduzca */
    }

    .input-btn {
        width: 40px;
        height: 40px;
        min-width: 40px; /* Tamaño mínimo fijo */
        min-height: 40px;
        font-size: 0.95rem;
        flex-shrink: 0; /* Evitar compresión */
    }

    .send-btn:hover,
    .record-btn:hover {
        transform: none; /* Remover efecto hover en móviles */
    }

    /* Ajustar panel de info */
    .info-panel {
        padding: 20px;
    }

    .stat-value {
        font-size: 1.8rem;
    }
}
