/* Frontend CSS for Alpaca Trading Bot */

/* Login and Register Page Styles */
.login-page,
.register-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box,
.register-box {
    margin: 7% auto;
}

.trading-mode-badge {
    font-weight: bold;
    font-size: 0.9em;
}

.mode-switch {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bootstrap-switch-wrapper {
    margin-bottom: 0;
}

.persistent-info {
    font-style: italic;
    color: #28a745;
}

#paperCredentialsSection,
#liveCredentialsSection {
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

#paperCredentialsSection {
    border-color: #ffc107;
    background-color: #fff3cd;
}

#liveCredentialsSection {
    border-color: #dc3545;
    background-color: #f8d7da;
}

.live-warning {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: bold;
}
 
/* Add Toggle Switch CSS */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffc107;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked+.slider {
    background-color: #dc3545;
}

input:focus+.slider {
    box-shadow: 0 0 1px #dc3545;
}

input:checked+.slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Dashboard and Table Styles */

.pagination {
    margin-bottom: 0;
}

.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.page-link {
    color: #0d6efd;
}

.page-link:hover {
    color: #0a58ca;
}

#ordersPerPageSelect {
    max-width: 120px;
}


/* Fix table layout to prevent wrapping */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    table-layout: auto; /* This is key - makes columns auto-fit content */
    white-space: nowrap; /* Prevents text wrapping */
}

.table th,
.table td {
    white-space: nowrap; /* Prevents text wrapping in cells */
    padding: 0.5rem 0.75rem; /* Consistent padding */
}

/* Optional: Add horizontal scroll for very small screens */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem; /* Slightly smaller text on mobile */
    }
}