/* Custom styles for Exercise Manager */

/* Sidebar styling */
.sidebar {
    min-height: 100vh;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    margin: 0.125rem 0;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
}

/* Main content area */
.main-content {
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Card improvements */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 500;
}

/* Table styling */
.table th {
    font-weight: 600;
    color: #495057;
    border-bottom-width: 1px;
}

/* Form styling */
.form-label {
    font-weight: 500;
    color: #495057;
}

/* HTMX indicators */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-block;
}

.htmx-request.htmx-indicator {
    display: inline-block;
}

/* Tab pills styling */
.nav-pills .nav-link {
    color: #495057;
}

.nav-pills .nav-link.active {
    background-color: #0d6efd;
}

/* Alert transitions */
.alert {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Toast notifications */
.toast-container {
    z-index: 1090;
}

/* Badge styling in tables */
.table .badge {
    font-weight: 500;
}

/* Formset table styling */
.table-formset tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.04);
}

.table-formset .form-control-sm,
.table-formset .form-select-sm {
    font-size: 0.8125rem;
}

/* JSON field styling */
textarea.json-field {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8125rem;
}

/* Scrollable code blocks */
.code-preview {
    max-height: 300px;
    overflow-y: auto;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
    padding: 1rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
}

/* Loading overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
    }
    
    .main-content {
        padding: 1rem !important;
    }
}
