/* Trading Bot Custom Styles */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    min-height: 60vh;
    display: flex;
    align-items: center;
}

/* Cards */
.card {
    border-radius: 0.75rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), #0056b3);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0056b3, #004494);
    transform: translateY(-1px);
}

/* Navigation */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Form Styles */
.form-control {
    border-radius: 0.5rem;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.input-group-text {
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 0.5rem 0 0 0.5rem;
}

/* Global Checkbox Styles - Bolder 2px border for all pages */
.form-check-input {
    border: 2px solid rgba(0, 0, 0, 0.25) !important;
    width: 18px !important;
    height: 18px !important;
    cursor: pointer;
}

.form-check-input:checked {
    border-width: 2px !important;
    background-color: var(--primary-color) !important;
}

.form-check-input:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

/* Radio button styles */
input[type="radio"].form-check-input {
    border-radius: 50% !important;
}

/* Checkbox on dark backgrounds */
.bg-dark .form-check-input,
.navbar-dark .form-check-input {
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* Dashboard Styles */
.stats-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.stats-card.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.stats-card.danger {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
}

.stats-card.warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #212529;
}

.stats-card.info {
    background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
}

/* Trading Table Styles */
.trading-table {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
}

.trading-table .table {
    margin-bottom: 0;
}

.trading-table .table th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

.profit-positive {
    color: var(--success-color);
    font-weight: bold;
}

.profit-negative {
    color: var(--danger-color);
    font-weight: bold;
}

.profit-neutral {
    color: var(--secondary-color);
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 400px;
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-connected {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.status-disconnected {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.status-pending {
    background-color: rgba(255, 193, 7, 0.1);
    color: #856404;
}

/* Loading Styles */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.spinner-custom {
    width: 3rem;
    height: 3rem;
    border: 0.3rem solid rgba(0, 123, 255, 0.3);
    border-top: 0.3rem solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
        text-align: center;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .chart-container {
        height: 300px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Trading Controls */
.trading-controls {
    background: #f8f9fa;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.control-group {
    margin-bottom: 1rem;
}

.control-group:last-child {
    margin-bottom: 0;
}

/* Alert Styles */
.alert {
    border-radius: 0.5rem;
    border: none;
    font-weight: 500;
}

/* ===== NOTIFICATION TOASTER STYLES WITH SOLID BACKGROUNDS ===== */
/* Fixed notification toasters with solid, opaque backgrounds */
.alert.position-fixed {
    z-index: 999999 !important;
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    min-width: 320px !important;
    max-width: 450px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: none !important;
    border: 2px solid !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

/* Success Notifications - Solid Green */
.alert-success.position-fixed,
.alert.alert-success.position-fixed {
    background-color: #28a745 !important;
    background: #28a745 !important;
    color: #ffffff !important;
    border-color: #1e7e34 !important;
}

.alert-success.position-fixed * {
    color: #ffffff !important;
}

/* Error/Danger Notifications - Solid Red */
.alert-danger.position-fixed,
.alert.alert-danger.position-fixed {
    background-color: #dc3545 !important;
    background: #dc3545 !important;
    color: #ffffff !important;
    border-color: #bd2130 !important;
}

.alert-danger.position-fixed * {
    color: #ffffff !important;
}

/* Warning Notifications - Solid Orange/Yellow */
.alert-warning.position-fixed,
.alert.alert-warning.position-fixed {
    background-color: #ff9800 !important;
    background: #ff9800 !important;
    color: #ffffff !important;
    border-color: #e68900 !important;
}

.alert-warning.position-fixed * {
    color: #ffffff !important;
}

/* Info Notifications - Solid Blue */
.alert-info.position-fixed,
.alert.alert-info.position-fixed {
    background-color: #17a2b8 !important;
    background: #17a2b8 !important;
    color: #ffffff !important;
    border-color: #117a8b !important;
}

.alert-info.position-fixed * {
    color: #ffffff !important;
}

/* Close button for notifications */
.alert.position-fixed .btn-close {
    filter: brightness(0) invert(1) !important;
    opacity: 1 !important;
}

/* Icon styling in notifications */
.alert.position-fixed i,
.alert.position-fixed .fas,
.alert.position-fixed .fa {
    color: #ffffff !important;
    margin-right: 8px;
}

.alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
    color: var(--success-color);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(232, 62, 140, 0.1) 100%);
    color: var(--danger-color);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(253, 126, 20, 0.1) 100%);
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
    color: var(--info-color);
}

/* Footer Styles */
footer {
    margin-top: auto;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), #0056b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}