/* Custom Trading Bot Styles */

:root {
    --profit-color: #198754;
    --loss-color: #dc3545;
    --primary-color: #0d6efd;
}

/* Body */
body {
    background-color: #f8f9fa;
}

/* Trade Cards */
.trade-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.trade-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* LTP Animation */
.ltp-value {
    transition: color 0.3s ease, background-color 0.3s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

.ltp-up {
    color: var(--profit-color) !important;
    animation: pulse-green 0.5s ease;
}

.ltp-down {
    color: var(--loss-color) !important;
    animation: pulse-red 0.5s ease;
}

@keyframes pulse-green {
    0% { background-color: rgba(25, 135, 84, 0.3); }
    100% { background-color: transparent; }
}

@keyframes pulse-red {
    0% { background-color: rgba(220, 53, 69, 0.3); }
    100% { background-color: transparent; }
}

/* Symbol Search Dropdown */
#symbolResults {
    display: none;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
}

#symbolResults.show {
    display: block;
}

#symbolResults .list-group-item {
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-left: none;
    border-right: none;
}

#symbolResults .list-group-item:hover {
    background-color: #e9ecef;
}

#symbolResults .list-group-item:first-child {
    border-top: none;
}

/* Form Improvements */
.btn-check:checked + .btn-outline-success {
    background-color: var(--profit-color);
    border-color: var(--profit-color);
}

.btn-check:checked + .btn-outline-danger {
    background-color: var(--loss-color);
    border-color: var(--loss-color);
}

/* Stats Cards */
.card h2, .card h4 {
    font-weight: 600;
}

/* Table Improvements */
.table th {
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

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

/* Navbar */
.navbar-brand {
    font-weight: 600;
}

/* Mobile Adjustments */
@media (max-width: 576px) {
    .trade-card .card-body {
        padding: 0.5rem;
    }

    .trade-card .card-header,
    .trade-card .card-footer {
        padding: 0.5rem;
    }

    .btn-group .btn {
        font-size: 0.875rem;
        padding: 0.5rem;
    }

    h4 {
        font-size: 1.25rem;
    }

    .table {
        font-size: 0.875rem;
    }

    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Status Badges in Cards */
.trade-card .badge {
    font-size: 0.7rem;
}

/* Card Footer Buttons */
.card-footer .btn {
    font-size: 0.8rem;
}

/* Position Badge */
.position-badge {
    font-weight: 700;
}
