/* NetKairos PWA Frontend Styles */

/* PWA Menu */
.pwa-menu-container {
    position: fixed;
    z-index: 99998;
    transition: all 0.3s ease;
}

.pwa-menu-container.bottom {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.pwa-menu-container.top {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.pwa-menu-container.left {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.pwa-menu-container.right {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.pwa-menu-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.pwa-menu-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.pwa-menu-items {
    position: absolute;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 10px;
    min-width: 200px;
    display: none;
}

.pwa-menu-container.active .pwa-menu-items {
    display: block;
}

.pwa-menu-container.bottom .pwa-menu-items {
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
}

.pwa-menu-container.top .pwa-menu-items {
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
}

.pwa-menu-container.left .pwa-menu-items {
    left: 70px;
    top: 50%;
    transform: translateY(-50%);
}

.pwa-menu-container.right .pwa-menu-items {
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
}

.pwa-menu-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.2s;
    margin: 5px 0;
}

.pwa-menu-item:hover {
    background: #f5f5f5;
    color: #2196F3;
}

.pwa-menu-item i {
    margin-right: 10px;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* Install Button */
.pwa-install-button {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background: linear-gradient(135deg, #2196F3 0%, #21CBF3 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    transition: all 0.3s ease;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-install-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.pwa-install-button:before {
    content: "⬇";
    font-size: 18px;
}

/* Notifications */
.pwa-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 99999;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.pwa-notification.success {
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
}

.pwa-notification.warning {
    background: linear-gradient(135deg, #FF9800 0%, #FFC107 100%);
}

.pwa-notification.error {
    background: linear-gradient(135deg, #F44336 0%, #E91E63 100%);
}

/* Footer Elements */
.pwa-footer-elements {
    background: #f8f9fa;
    padding: 15px 0;
    border-top: 1px solid #dee2e6;
    margin-top: 30px;
}

.pwa-footer-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.pwa-footer-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: white;
    border-radius: 20px;
    border: 1px solid #dee2e6;
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.pwa-footer-item:hover {
    background: #e9ecef;
    color: #2196F3;
    border-color: #2196F3;
    text-decoration: none;
}

/* Offline Indicator */
.pwa-offline-indicator {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #FF9800;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 99997;
    animation: pulse 2s infinite;
}

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

.pwa-offline-indicator:before {
    content: "●";
    font-size: 8px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* DeepSeek Chat Widget */
.deepseek-chat-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 99996;
    display: none;
}

.deepseek-chat-widget.active {
    display: block;
}

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h4 {
    margin: 0;
    font-size: 16px;
}

.powered-by {
    font-size: 10px;
    opacity: 0.8;
}

.chat-messages {
    height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
}

.user-message, .ai-message {
    margin: 10px 0;
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 80%;
}

.user-message {
    background: #2196F3;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.ai-message {
    background: white;
    color: #333;
    border: 1px solid #dee2e6;
    border-bottom-left-radius: 5px;
}

.chat-input {
    padding: 15px;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    outline: none;
}

.chat-input input:focus {
    border-color: #2196F3;
}

.chat-input button {
    background: #2196F3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
}

.chat-input button:hover {
    background: #1976D2;
}

.chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 99995;
}

/* Responsive */
@media (max-width: 768px) {
    .pwa-menu-container {
        display: none; /* Ocultar menú flotante en móviles si hay footer */
    }
    
    .pwa-footer-elements {
        display: block;
    }
    
    .deepseek-chat-widget {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
        bottom: 80px;
    }
    
    .pwa-install-button {
        bottom: 20px;
        right: 20px;
        left: 20px;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .pwa-footer-container {
        flex-direction: column;
        align-items: center;
    }
    
    .pwa-footer-item {
        width: 100%;
        justify-content: center;
    }
}