/* Custom styles for Trading Platform */

/* Message styling - Ensure error messages are always red */
.alert-error {
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important;
    color: #721c24 !important;
}

.alert-danger {
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important;
    color: #721c24 !important;
}

.alert-success {
    background-color: #d1e7dd !important;
    border-color: #badbcc !important;
    color: #0f5132 !important;
}

.alert-info {
    background-color: #d1ecf1 !important;
    border-color: #bee5eb !important;
    color: #0c5460 !important;
}

.alert-warning {
    background-color: #fff3cd !important;
    border-color: #ffecb5 !important;
    color: #664d03 !important;
}

/* Sidebar styles */
.offcanvas-lg {
    border-right: 1px solid var(--bs-border-color);
}

/* Card hover effects */
.strategy-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.strategy-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* PnL styling */
.pnl-positive {
    color: #198754;
    font-weight: bold;
}

.pnl-negative {
    color: #dc3545;
    font-weight: bold;
}

.pnl-neutral {
    color: #6c757d;
    font-weight: bold;
}

/* Kill switch button */
.kill-switch {
    transition: all 0.3s ease;
}

.kill-switch.active {
    background-color: #dc3545;
    border-color: #dc3545;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Dark mode adjustments */
[data-bs-theme="dark"] .bg-light {
    background-color: var(--bs-dark) !important;
}

[data-bs-theme="dark"] .list-group-item {
    background-color: var(--bs-dark);
    border-color: var(--bs-border-color);
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .list-group-item:hover {
    background-color: var(--bs-secondary);
}

/* Status indicators */
.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.status-active {
    background-color: #28a745;
}

.status-inactive {
    background-color: #dc3545;
}

.status-warning {
    background-color: #ffc107;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom form controls */
.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Alert customizations */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Strategy performance cards */
.performance-card {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-info) 100%);
    color: white;
}

.performance-card .card-body {
    position: relative;
    overflow: hidden;
}

.performance-card .card-body::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    transition: all 0.3s ease;
}

.performance-card:hover .card-body::before {
    right: -30%;
    top: -30%;
}
