/* BackTest Trading Logs Dashboard Styles */

/* Loading Overlay */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Card Enhancements */
.card {
    border: none;
    border-radius: 0.75rem;
    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 {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.75rem 0.75rem 0 0 !important;
    font-weight: 600;
}

/* Summary Cards */
.text-white-25 {
    color: rgba(255, 255, 255, 0.25) !important;
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* Table Enhancements */
.table {
    border-radius: 0.5rem;
    overflow: hidden;
}

    .table th {
        border-top: none;
        font-weight: 600;
        font-size: 0.875rem;
        background-color: #343a40;
        color: white;
        border-bottom: 2px solid #495057;
    }

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

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(0, 0, 0, 0.025);
}

.table-hover > tbody > tr:hover > td {
    background-color: rgba(0, 123, 255, 0.1);
}

/* Action Badges */
.badge-buy {
    background-color: #28a745;
    color: white;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

.badge-sell {
    background-color: #dc3545;
    color: white;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

/* Button Enhancements */
.btn-details {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

    .btn-details:hover {
        transform: translateY(-1px);
        box-shadow: 0 0.25rem 0.5rem rgba(0, 123, 255, 0.25);
    }

/* Filter Section */
.form-select, .form-control {
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

    .form-select:focus, .form-control:focus {
        border-color: #80bdff;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }

/* Modal Enhancements */
.modal-content {
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    border-radius: 0.75rem 0.75rem 0 0;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 0.75rem 0.75rem;
}

/* Summary Items in Modal */
.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

    .summary-item:last-child {
        border-bottom: none;
    }

.summary-label {
    font-weight: 600;
    color: #6c757d;
    font-size: 0.875rem;
}

.summary-value {
    color: #212529;
    font-weight: 500;
    font-size: 0.875rem;
}

/* JSON Display */
.json-display {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Balance Items */
.balance-item {
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-left: 4px solid #007bff;
}

.balance-asset {
    font-weight: 600;
    color: #495057;
    font-size: 1rem;
}

.balance-amount {
    font-weight: 500;
    color: #212529;
    font-size: 1.1rem;
}

.balance-details {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Chart Containers */
.chart-container {
    position: relative;
    height: 400px;
    margin: 1rem 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }

    .table-responsive {
        font-size: 0.8rem;
    }

    .btn-details {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }

    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .modal-dialog {
        margin: 0.5rem;
    }
}

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

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Status Indicators */
.status-positive {
    color: #28a745;
    font-weight: 600;
}

.status-negative {
    color: #dc3545;
    font-weight: 600;
}

.status-neutral {
    color: #6c757d;
    font-weight: 600;
}

/* DataTables Custom Styling */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 0.375rem;
    margin: 0 0.125rem;
}

    .dataTables_wrapper .dataTables_paginate .paginate_button.current {
        background: #007bff;
        border-color: #007bff;
        color: white !important;
    }

/* Utility Classes */
.text-truncate-custom {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cursor-pointer {
    cursor: pointer;
}

.border-left-primary {
    border-left: 4px solid #007bff;
}

.border-left-success {
    border-left: 4px solid #28a745;
}

.border-left-danger {
    border-left: 4px solid #dc3545;
}

.border-left-warning {
    border-left: 4px solid #ffc107;
}

.border-left-info {
    border-left: 4px solid #17a2b8;
}
