/**
 * Estilos do Robô de Trading - FynixGlobal
 */

/* Painel do Robô */
.robot-panel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 280px;
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border: 1px solid #9b59b6;
    border-radius: 15px;
    padding: 15px;
    z-index: 9998;
    box-shadow: 0 10px 40px rgba(155, 89, 182, 0.3);
}

.robot-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.robot-icon {
    font-size: 1.8em;
}

.robot-name {
    flex: 1;
    font-weight: 600;
    color: #fff;
    font-size: 0.95em;
}

.robot-status {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
}

.robot-status.active {
    background: #00d4aa;
    color: #000;
    animation: statusPulse 2s infinite;
}

.robot-status.paused {
    background: #ffc107;
    color: #000;
}

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

/* Sinal */
.robot-signal-container {
    text-align: center;
    margin-bottom: 15px;
}

.robot-signal-label {
    color: #888;
    font-size: 0.75em;
    margin-bottom: 5px;
}

.robot-signal {
    font-size: 1.5em;
    font-weight: 700;
    padding: 10px;
    border-radius: 10px;
    background: rgba(0,0,0,0.3);
}

.robot-signal.signal-up,
.robot-signal .signal-up {
    color: #00ff88;
}

.robot-signal.signal-down,
.robot-signal .signal-down {
    color: #ff4757;
}

.robot-signal.signal-none {
    color: #888;
}

.robot-strength {
    margin-top: 8px;
    font-size: 0.85em;
    color: #aaa;
}

.strength-high {
    color: #00ff88;
    font-weight: 600;
}

.strength-medium {
    color: #ffc107;
    font-weight: 600;
}

.strength-low {
    color: #ff4757;
    font-weight: 600;
}

/* Indicadores */
.robot-indicators {
    margin-bottom: 10px;
}

.indicators-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
}

.ind-item {
    background: rgba(0,0,0,0.2);
    padding: 5px 8px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    font-size: 0.7em;
}

.ind-label {
    color: #888;
}

.ind-value {
    color: #00a8ff;
    font-weight: 600;
}

/* Razão */
.robot-reason {
    font-size: 0.75em;
    color: #aaa;
    text-align: center;
    padding: 8px;
    background: rgba(155, 89, 182, 0.1);
    border-radius: 8px;
    margin-bottom: 10px;
    min-height: 20px;
}

/* Stats */
.robot-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 12px;
}

.stat-item {
    text-align: center;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.85em;
}

.stat-item.win {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
}

.stat-item.loss {
    background: rgba(255, 71, 87, 0.1);
    color: #ff4757;
}

.stat-item span {
    display: block;
    font-size: 1.5em;
    font-weight: 700;
}

/* Controles */
.robot-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.robot-btn {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s;
}

.robot-btn.pause {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.robot-btn.resume {
    background: rgba(0, 212, 170, 0.2);
    color: #00d4aa;
    border: 1px solid rgba(0, 212, 170, 0.3);
}

.robot-btn.config {
    flex: 0 0 40px;
    background: rgba(155, 89, 182, 0.2);
    color: #9b59b6;
    border: 1px solid rgba(155, 89, 182, 0.3);
}

.robot-btn:hover {
    transform: scale(1.05);
}

/* Auto Status */
.robot-auto-status {
    text-align: center;
    font-size: 0.75em;
    padding: 5px;
    border-radius: 5px;
    background: rgba(0,0,0,0.2);
    color: #888;
}

/* Config Modal */
.robot-config-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.robot-config-modal {
    background: linear-gradient(145deg, #1a1a2e, #16213e);
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    border: 1px solid #9b59b6;
    overflow: hidden;
}

.robot-config-header {
    background: linear-gradient(90deg, #9b59b6, #8e44ad);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.robot-config-header h3 {
    margin: 0;
    color: #fff;
    font-size: 1.1em;
}

.robot-config-header span {
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.robot-config-body {
    padding: 20px;
}

.robot-config-body .config-group {
    margin-bottom: 15px;
}

.robot-config-body .config-group label {
    display: block;
    color: #aaa;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.robot-config-body .config-group input[type="number"] {
    width: 100%;
    padding: 10px;
    background: rgba(0,0,0,0.3);
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 1em;
}

.robot-config-body .config-group input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.robot-config-body .config-group small {
    display: block;
    color: #666;
    font-size: 0.8em;
    margin-top: 5px;
}

.robot-config-body .config-row {
    display: flex;
    gap: 15px;
}

.robot-config-body .config-group.half {
    flex: 1;
}

.robot-config-body .btn-reset {
    width: 100%;
    padding: 10px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffc107;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
}

.robot-config-footer {
    padding: 15px 20px;
    display: flex;
    gap: 10px;
    background: rgba(0,0,0,0.2);
}

.robot-config-footer button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
}

.robot-config-footer button:first-child {
    background: transparent;
    border: 1px solid #666;
    color: #888;
}

.robot-config-footer button.primary {
    background: linear-gradient(90deg, #9b59b6, #8e44ad);
    color: #fff;
    font-weight: 600;
}

/* Notificações do Robô */
.robot-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 10px;
    z-index: 10002;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.robot-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.robot-notification.success {
    background: linear-gradient(90deg, #00d4aa, #00a885);
    color: #fff;
}

.robot-notification.warning {
    background: linear-gradient(90deg, #ffc107, #ff9800);
    color: #000;
}

.robot-notification.info {
    background: linear-gradient(90deg, #00a8ff, #0077b6);
    color: #fff;
}

.robot-notification.error {
    background: linear-gradient(90deg, #ff4757, #ff3344);
    color: #fff;
}

/* Responsivo */
@media (max-width: 768px) {
    .robot-panel {
        left: 10px;
        right: 10px;
        bottom: 70px;
        width: auto;
    }
    
    .indicators-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========== MINIMIZAR ========== */
.robot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.robot-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.robot-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.robot-icon-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.robot-minimize-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    background: rgba(155, 89, 182, 0.3);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.robot-minimize-btn:hover {
    background: rgba(155, 89, 182, 0.5);
    transform: scale(1.1);
}

/* Estado Minimizado */
.robot-panel.minimized {
    width: auto;
    min-width: 160px;
    padding: 10px 15px;
}

.robot-panel.minimized .robot-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.robot-panel.minimized .robot-content {
    display: none;
}

.robot-panel.minimized .robot-name {
    font-size: 0.85em;
}

.robot-panel.minimized .robot-status {
    font-size: 0.6em;
    padding: 2px 6px;
}

.robot-panel.minimized .robot-icon-img {
    width: 24px;
    height: 24px;
}
