/**
 * Trading Platform Theme Styles
 * Contains additional theme-specific styles beyond Bootstrap
 */

/* Common Styles (applied to both themes) */
.position-card {
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.asset-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 0.75rem;
}

.btn-trade {
    border-radius: 20px;
    padding: 0.5rem 1.5rem;
}

/* Light Theme Specific Styles */
[data-bs-theme="light"] {
    /* Table Styles */
    .table-hover tbody tr:hover {
        background-color: rgba(0, 123, 255, 0.05);
    }
    
    /* Form Controls */
    .form-control:focus {
        border-color: #80bdff;
        box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
    }
    
    /* Cards */
    .card {
        background-color: #ffffff;
        border: 1px solid rgba(0, 0, 0, 0.125);
    }
    
    /* Sidebar */
    .sidebar {
        background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    }
    
    /* Notifications */
    .notification-item {
        border-bottom: 1px solid #e9ecef;
    }
    
    /* Charts */
    .chart-container {
        background-color: #ffffff;
        border: 1px solid #dee2e6;
    }
}

/* Dark Theme Specific Styles */
[data-bs-theme="dark"] {
    /* Table Styles */
    .table {
        color: #e9ecef;
    }
    
    .table-hover tbody tr:hover {
        background-color: rgba(255, 255, 255, 0.075);
    }
    
    /* Form Controls */
    .form-control {
        background-color: #343a40;
        border-color: #495057;
        color: #e9ecef;
    }
    
    .form-control:focus {
        border-color: #6ea8fe;
        box-shadow: 0 0 0 0.25rem rgba(110, 168, 254, 0.25);
    }
    
    .input-group-text {
        background-color: #495057;
        border-color: #495057;
        color: #e9ecef;
    }
    
    /* Cards */
    .card {
        background-color: #212529;
        border: 1px solid rgba(255, 255, 255, 0.125);
    }
    
    .card-header {
        border-bottom: 1px solid rgba(255, 255, 255, 0.125);
    }
    
    .card-footer {
        border-top: 1px solid rgba(255, 255, 255, 0.125);
    }
    
    /* Sidebar */
    .sidebar {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    }
    
    /* Buttons */
    .btn-outline-secondary {
        color: #adb5bd;
        border-color: #6c757d;
    }
    
    .btn-outline-secondary:hover {
        color: #fff;
        background-color: #6c757d;
        border-color: #6c757d;
    }
    
    /* Notifications */
    .notification-item {
        border-bottom: 1px solid #343a40;
    }
    
    /* Charts */
    .chart-container {
        background-color: #212529;
        border: 1px solid #343a40;
    }
    
    /* Modal */
    .modal-content {
        background-color: #212529;
        color: #e9ecef;
    }
    
    .modal-header {
        border-bottom: 1px solid #343a40;
    }
    
    .modal-footer {
        border-top: 1px solid #343a40;
    }
    
    /* Dropdown */
    .dropdown-menu {
        background-color: #343a40;
        border: 1px solid rgba(0, 0, 0, 0.15);
    }
    
    .dropdown-item {
        color: #e9ecef;
    }
    
    .dropdown-item:hover, .dropdown-item:focus {
        color: #fff;
        background-color: #495057;
    }
    
    /* Alerts */
    .alert-info {
        color: #cff4fc;
        background-color: #055160;
        border-color: #055160;
    }
    
    .alert-warning {
        color: #fff3cd;
        background-color: #664d03;
        border-color: #664d03;
    }
    
    .alert-danger {
        color: #f8d7da;
        background-color: #58151c;
        border-color: #58151c;
    }
    
    .alert-success {
        color: #d1e7dd;
        background-color: #0a3622;
        border-color: #0a3622;
    }
}

/* Custom Persistent Banner Styles (do not auto-dismiss) */
.custom-banner {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.custom-banner h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.custom-banner ul {
    margin-bottom: 0;
    padding-left: 1.25rem;
}

.custom-banner-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.custom-banner-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffecb5;
}

.custom-banner-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.custom-banner-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

/* Dark theme banner styles */
[data-bs-theme="dark"] .custom-banner-info {
    color: #cff4fc;
    background-color: #055160;
    border-color: #055160;
}

[data-bs-theme="dark"] .custom-banner-warning {
    color: #fff3cd;
    background-color: #664d03;
    border-color: #664d03;
}

[data-bs-theme="dark"] .custom-banner-success {
    color: #d1e7dd;
    background-color: #0a3622;
    border-color: #0a3622;
}

[data-bs-theme="dark"] .custom-banner-danger {
    color: #f8d7da;
    background-color: #58151c;
    border-color: #58151c;
}

/* Animation for theme transition */
.theme-transition {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Quick Trade Asset Filter Styling */
#assetSearchResults {
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(13, 110, 253, 0.3) !important;
}

#assetFilter {
    border: 2px solid #0d6efd !important;
    border-radius: 0.25rem;
    background-color: rgba(248, 249, 250, 0.95);
    font-weight: 500;
}

[data-bs-theme="dark"] #assetFilter {
    background-color: rgba(33, 37, 41, 0.95);
    color: #e9ecef;
    border-color: #0d6efd !important;
}

#assetFilter:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    background-color: #fff;
    border-color: #0d6efd !important;
}

[data-bs-theme="dark"] #assetFilter:focus {
    background-color: #495057;
}

.asset-result:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

[data-bs-theme="dark"] .asset-result:hover {
    background-color: rgba(13, 110, 253, 0.2);
}

/* Make filter section more prominent */
.asset-filter-section {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(13, 110, 253, 0.05) 100%);
    border-bottom: 2px solid rgba(13, 110, 253, 0.2) !important;
}

/* HTMX Loading Indicators */
.htmx-indicator {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.htmx-request .htmx-indicator {
    opacity: 1 !important;
    display: flex !important;
}

/* Dark theme loading indicators */
[data-bs-theme="dark"] .htmx-indicator {
    background: rgba(33, 37, 41, 0.9) !important;
    color: #e9ecef;
}

[data-bs-theme="light"] .htmx-indicator {
    background: rgba(255, 255, 255, 0.9) !important;
}
