/* Custom styles for the Fitness Club Dashboard */

/* General styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.footer {
    margin-top: auto;
}

/* Card styles */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

/* Navbar brand icon */
.navbar-brand i {
    margin-right: 0.5rem;
}

/* Dashboard metric cards */
.metric-card {
    transition: transform 0.2s;
}

.metric-card:hover {
    transform: translateY(-5px);
}

/* Tables */
.table th {
    font-weight: 600;
    white-space: nowrap;
}

/* Custom styles for tabs */
.nav-tabs .nav-link {
    border-radius: 0.5rem 0.5rem 0 0;
}

.nav-tabs .nav-link.active {
    font-weight: 600;
}

/* Form styles */
.form-label {
    font-weight: 500;
}

/* Make charts responsive */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Custom tooltip styles */
.custom-tooltip {
    position: absolute;
    background-color: var(--bs-dark);
    color: white;
    padding: 8px;
    border-radius: 4px;
    pointer-events: none;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
    z-index: 1000;
}

/* Badge styles */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 500;
}

/* Breadcrumb styles */
.breadcrumb {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    background-color: var(--bs-gray-200);
    border-radius: 0.375rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.2em;
    vertical-align: middle;
    line-height: 1;
}

/* Button hover effects */
.btn {
    transition: all 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

/* Dark theme custom overrides */
[data-bs-theme=dark] .card {
    background-color: var(--bs-gray-800);
    border-color: var(--bs-gray-700);
}

[data-bs-theme=dark] .table {
    color: var(--bs-gray-200);
}

[data-bs-theme=dark] .breadcrumb {
    background-color: var(--bs-gray-800);
}

/* Dashboard regional metrics */
.region-card {
    cursor: pointer;
    transition: all 0.2s;
}

.region-card:hover {
    transform: scale(1.02);
}

/* Tab content padding */
.tab-content > .tab-pane {
    padding: 1rem;
}

/* DataTables custom styling */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    color: var(--bs-body-color);
    margin-bottom: 1rem;
}

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

/* Custom scrollbar for tables */
.table-responsive::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: var(--bs-gray-200);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background-color: var(--bs-gray-500);
    border-radius: 4px;
}

/* Loading overlay styles */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    border-radius: 0.5rem;
}

[data-bs-theme=dark] .loading-overlay {
    background-color: rgba(33, 37, 41, 0.7);
}

/* Date range and filter styles */
.date-filter-container {
    background-color: var(--bs-gray-100);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

[data-bs-theme=dark] .date-filter-container {
    background-color: var(--bs-gray-800);
}

.date-display {
    background-color: var(--bs-light);
    border: 1px solid var(--bs-gray-300);
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

[data-bs-theme=dark] .date-display {
    background-color: var(--bs-gray-700);
    border-color: var(--bs-gray-600);
}

/* Custom styles for dashboard metrics */
.metric-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.metric-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--bs-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-bs-theme=dark] .metric-title {
    color: var(--bs-gray-400);
}

/* Progress indicator styles */
.goal-progress-container {
    position: relative;
    height: 150px;
}

/* Empty state styles */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    background-color: var(--bs-gray-100);
    border-radius: 0.5rem;
}

.empty-state-icon {
    font-size: 3rem;
    color: var(--bs-gray-400);
    margin-bottom: 1rem;
}

.empty-state-text {
    color: var(--bs-gray-600);
    font-weight: 500;
}

[data-bs-theme=dark] .empty-state {
    background-color: var(--bs-gray-800);
}

[data-bs-theme=dark] .empty-state-icon {
    color: var(--bs-gray-600);
}

[data-bs-theme=dark] .empty-state-text {
    color: var(--bs-gray-400);
}

/* Dashboard header styles */
.dashboard-header {
    margin-bottom: 1.5rem;
}

.dashboard-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.dashboard-subtitle {
    color: var(--bs-gray-600);
    font-weight: 400;
}

[data-bs-theme=dark] .dashboard-subtitle {
    color: var(--bs-gray-400);
}

/* Responsive table adjustments */
.table-responsive {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

/* Softer accent button for Daily Trends on Clubs page */
.btn-daily-trends {
    color: #fff;
    border: 1px solid rgba(var(--bs-success-rgb), 0.55);
    background-color: rgba(var(--bs-success-rgb), 0.22);
}
.btn-daily-trends:hover,
.btn-daily-trends:focus {
    color: #fff;
    background-color: rgba(var(--bs-success-rgb), 0.3);
    border-color: rgba(var(--bs-success-rgb), 0.75);
}
[data-bs-theme=dark] .btn-daily-trends:hover,
[data-bs-theme=dark] .btn-daily-trends:focus {
    background-color: rgba(var(--bs-success-rgb), 0.12);
}

/* Media queries for responsive designs */
@media (max-width: 767.98px) {
    .card-body {
        padding: 1rem;
    }
    
    h4.card-title {
        font-size: 1.25rem;
    }
    
    .display-6 {
        font-size: 1.5rem;
    }
    
    .table th, .table td {
        padding: 0.5rem;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
    
    .dashboard-title {
        font-size: 1.5rem;
    }
    
    .date-filter-container {
        padding: 0.75rem;
    }
    
    .chart-container {
        height: 250px;
    }
}
