/* Custom styles for the investing platform */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Metric Cards */
.metric-card {
    text-align: center;
    padding: 1rem;
    border-radius: 0.375rem;
    background-color: #f8f9fa;
    margin-bottom: 1rem;
}

.metric-card h6 {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.metric-card h4 {
    margin-bottom: 0;
    font-weight: 700;
    font-size: 1.5rem;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    font-size: 0.875rem;
    color: #6c757d;
}

.table td {
    vertical-align: middle;
    font-size: 0.875rem;
}

/* Strategy Controls */
.strategy-control {
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background-color: #f8f9fa;
}

/* Status Items */
.status-item {
    display: flex;
    justify-content: between;
    align-items: center;
}

.status-item span:first-child {
    flex: 1;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

/* Connection Status */
#connection-status.connected {
    background-color: var(--success-color) !important;
}

#connection-status.disconnected {
    background-color: var(--danger-color) !important;
}

#connection-status.connecting {
    background-color: var(--warning-color) !important;
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-group .btn {
    transform: none;
}

.btn-group .btn:hover {
    transform: none;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 1rem;
    margin-top: -0.5rem;
    margin-left: -0.5rem;
    border: 2px solid #f3f3f3;
    border-top: 2px 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) {
    .metric-card h4 {
        font-size: 1.25rem;
    }
    
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
}

/* Custom Utility Classes */
.text-positive {
    color: var(--success-color) !important;
}

.text-negative {
    color: var(--danger-color) !important;
}

.bg-positive {
    background-color: var(--success-color) !important;
}

.bg-negative {
    background-color: var(--danger-color) !important;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* Toast Customization */
.toast {
    background-color: white;
    border: 1px solid #dee2e6;
}

.toast-header {
    background-color: var(--primary-color);
    color: white;
    border-bottom: none;
}

.toast-header .btn-close {
    filter: invert(1);
}

/* Modal Customization */
.modal-content {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Progress Bars */
.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
}

.progress-bar {
    transition: width 0.3s ease;
}

/* Form Controls */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e9ecef;
    }
    
    .card {
        background-color: #2d3748;
        border-color: #4a5568;
    }
    
    .card-header {
        background-color: #2d3748;
        border-bottom-color: #4a5568;
    }
    
    .metric-card {
        background-color: #4a5568;
    }
    
    .table {
        color: #e9ecef;
    }
    
    .strategy-control {
        background-color: #4a5568;
        border-color: #4a5568;
    }
}

/* Funding Option Cards */
.funding-option {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.funding-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.funding-option.border-3 {
    border-width: 3px !important;
}

.funding-option.shadow {
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

/* Funding Forms */
.funding-form {
    margin-top: 1.5rem;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.funding-details small {
    line-height: 1.4;
}
