/* Custom CSS for Limitless Lifestyle */

/* Error handling for missing charts */
.chart-container {
    position: relative;
    min-height: 300px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 10px;
    box-sizing: border-box;
}

.chart-container canvas {
    max-width: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    height: auto !important;
}

.chart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    color: var(--bs-text-muted);
}

/* Progress photo grid */
.progress-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.progress-photo img {
        width: 100%;
        height: 120px;
        object-fit: cover;
        border-radius: 0.375rem;
        border: 2px solid var(--bs-border-color);
}

/* Roadmap horizontal scroll styles */
.roadmap-hscroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.roadmap-hscroll::-webkit-scrollbar {
    height: 8px;
}
.roadmap-hscroll::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.35); /* brand gold accent */
    border-radius: 8px;
}

.roadmap-card {
    flex: 0 0 360px;
    scroll-snap-align: start;
}

@media (max-width: 576px) {
    .roadmap-card { flex-basis: 85vw; }
}

.roadmap-card .card {
    background-color: var(--bs-dark);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 15px;
}

/* File upload improvements */
.file-upload-area {
    border: 2px dashed var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: var(--bs-primary);
    background-color: var(--bs-primary-bg-subtle);
}

.file-upload-area.dragover {
    border-color: var(--bs-success);
    background-color: var(--bs-success-bg-subtle);
}

/* Loading states */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--bs-border-color);
    border-radius: 50%;
    border-top-color: var(--bs-primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--bs-text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .progress-photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .analytics-card {
        margin-bottom: 1rem;
    }
    
    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}