/* AGENTNAMIX Manual Control Interface Styles */

/* ===== VARIABLES ===== */
:root {
    --manual-control-bg: rgba(10, 10, 15, 0.95);
    --manual-control-border: rgba(255, 255, 255, 0.1);
    --manual-control-accent: #ff0080;
    --manual-control-success: #00ff88;
    --manual-control-warning: #ff6600;
    --manual-control-info: #00d4ff;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.manual-control-container {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 400px;
    max-height: 80vh;
    background: var(--manual-control-bg);
    border: 2px solid var(--manual-control-border);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    overflow: hidden;
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
}

.manual-control-container.hidden {
    opacity: 0;
    transform: translateX(100%) scale(0.9);
    pointer-events: none;
}

.manual-control-container.visible {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: all;
}

/* ===== HEADER ===== */
.manual-control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--manual-control-accent), #8a2be2);
    border-bottom: 1px solid var(--manual-control-border);
}

.control-status {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-weight: 600;
}

.control-status i {
    font-size: 1.2rem;
    animation: pulse-hand 2s infinite;
}

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

.status-timer {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 8px;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    font-weight: 700;
}

.close-instructions-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-instructions-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* ===== CONTENIDO ===== */
.manual-control-content {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--manual-control-accent) transparent;
}

.manual-control-content::-webkit-scrollbar {
    width: 6px;
}

.manual-control-content::-webkit-scrollbar-track {
    background: transparent;
}

.manual-control-content::-webkit-scrollbar-thumb {
    background: var(--manual-control-accent);
    border-radius: 3px;
}

/* ===== SECCIONES ===== */
.instructions-section,
.security-section,
.tips-section,
.progress-section {
    margin-bottom: 24px;
}

.instructions-section h4,
.security-section h4,
.tips-section h4,
.progress-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--manual-control-border);
}

.instructions-section h4 i { color: var(--manual-control-info); }
.security-section h4 i { color: var(--manual-control-success); }
.tips-section h4 i { color: var(--manual-control-warning); }
.progress-section h4 i { color: var(--manual-control-accent); }

/* ===== LISTAS ===== */
.instructions-list,
.security-notes,
.tips-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.instruction-item,
.security-note,
.tip-item {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.instruction-item {
    border-left-color: var(--manual-control-info);
}

.security-note {
    border-left-color: var(--manual-control-success);
}

.tip-item {
    border-left-color: var(--manual-control-warning);
}

.instruction-item:hover,
.security-note:hover,
.tip-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

/* ===== PROGRESO ===== */
.progress-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progress-bar-container {
    position: relative;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--manual-control-accent), var(--manual-control-info));
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 8px;
}

.step-info {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

/* ===== ACCIONES ===== */
.manual-control-actions {
    padding: 20px;
    border-top: 1px solid var(--manual-control-border);
    display: flex;
    gap: 12px;
}

.continue-automation-btn,
.cancel-automation-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.continue-automation-btn {
    background: linear-gradient(135deg, var(--manual-control-success), #00d4ff);
    color: white;
}

.continue-automation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 255, 136, 0.3);
}

.cancel-automation-btn {
    background: linear-gradient(135deg, var(--manual-control-warning), #ff4444);
    color: white;
}

.cancel-automation-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 102, 0, 0.3);
}

/* ===== BOTÓN DE CONTROL MANUAL ===== */
.manual-control-btn {
    background: linear-gradient(135deg, var(--manual-control-accent), #8a2be2) !important;
    color: white !important;
    border: 2px solid var(--manual-control-accent) !important;
    position: relative;
    overflow: hidden;
}

.manual-control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.manual-control-btn:hover::before {
    left: 100%;
}

.manual-control-btn:hover {
    box-shadow: 0 0 20px rgba(255, 0, 128, 0.5) !important;
    transform: scale(1.05) !important;
}

/* ===== ANIMACIONES ===== */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .manual-control-container {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        max-height: 70vh;
    }
    
    .manual-control-actions {
        flex-direction: column;
    }
    
    .continue-automation-btn,
    .cancel-automation-btn {
        width: 100%;
    }
}

/* ===== ESTADOS ESPECIALES ===== */
.manual-control-container.loading {
    pointer-events: none;
}

.manual-control-container.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.manual-control-container.loading::before {
    content: '⏳';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    z-index: 1;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}
