/* Trade Calculator Styles */
.trade-calculator-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.calculator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.calculator-header h3 {
    margin: 0;
    color: #00FF88;
    font-size: 1.25rem;
}

.calculator-badges {
    display: flex;
    gap: 0.5rem;
}

.calculator-badges .badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.premium {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
}

.badge.premium-plus {
    background: linear-gradient(135deg, #9333EA, #C084FC);
    color: white;
}

.badge.connected {
    background: rgba(0, 255, 136, 0.2);
    border: 1px solid #00FF88;
    color: #00FF88;
}

.calculator-settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.setting-group label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.setting-group .input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.setting-group input[type="number"] {
    flex: 1;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    font-family: 'JetBrains Mono', monospace;
}

.setting-group input[type="range"] {
    flex: 1;
    margin-right: 1rem;
}

.btn-save {
    padding: 0.5rem 1rem;
    background: #00FF88;
    color: #0A0A0B;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save:hover {
    background: #00D470;
    transform: translateY(-1px);
}

.calculator-inputs {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.input-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.input-group label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.input-group input,
.input-group select {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    font-family: 'JetBrains Mono', monospace;
}

.input-group select {
    cursor: pointer;
}

.btn-calculate {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    background: linear-gradient(135deg, #00FF88, #00D4FF);
    color: #0A0A0B;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.calculator-results {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.calculator-results h4 {
    margin: 0 0 1rem 0;
    color: #00D4FF;
    font-size: 1.1rem;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-item {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.result-item label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.result-item .value {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    color: white;
}

.result-item .value.risk {
    color: #FFCC00;
}

.result-item .value.loss {
    color: #FF3B30;
}

.result-item .value.fee {
    color: #FFA500;
}

.profit-targets {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.target-row {
    display: grid;
    grid-template-columns: 60px 100px 80px 100px 80px;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    align-items: center;
}

.target-label {
    font-weight: 600;
    color: #00D4FF;
}

.target-price {
    font-family: 'JetBrains Mono', monospace;
    color: rgba(255, 255, 255, 0.8);
}

.target-distance {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.target-profit {
    color: #00FF88;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.target-roi {
    color: #00FF88;
    font-weight: 600;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .calculator-settings {
        grid-template-columns: 1fr;
    }
    
    .input-row {
        grid-template-columns: 1fr;
    }
    
    .result-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .target-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .calculator-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* Calculator button in signal cards */
.signal-calc-btn {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #00D4FF, #0099CC);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.signal-calc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.signal-calc-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Calculator modal */
.calculator-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.calculator-modal-content {
    background: #0A0A0B;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.calculator-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 1.5rem;
    line-height: 1;
}

.calculator-modal-close:hover {
    background: rgba(255, 59, 48, 0.2);
    border-color: #FF3B30;
    transform: rotate(90deg);
}