/* FitPub - Custom Styles */

:root {
    --primary-color: #2563eb;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --border-radius: 0.5rem;
}

/* Base styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--dark-color);
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

/* Map container */
.map-container {
    height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 1rem;
}

.map-container-large {
    height: 600px;
}

/* Activity cards */
.activity-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.activity-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.activity-type-run {
    background-color: #dbeafe;
    color: #1e40af;
}

.activity-type-ride {
    background-color: #fef3c7;
    color: #92400e;
}

.activity-type-hike {
    background-color: #d1fae5;
    color: #065f46;
}

/* Metrics display */
.metric-card {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.metric-label {
    font-size: 0.875rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* File upload area */
.file-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    transition: border-color 0.2s, background-color 0.2s;
    cursor: pointer;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
    border-color: var(--primary-color);
    background-color: #eff6ff;
}

.file-upload-icon {
    font-size: 3rem;
    color: #9ca3af;
}

/* Timeline */
.timeline-item {
    border-left: 3px solid var(--light-color);
    padding-left: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 3px solid white;
}

.timeline-date {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Timeline Cards */
.timeline-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.timeline-card .user-avatar {
    flex-shrink: 0;
}

.timeline-card .avatar-placeholder {
    width: 48px;
    height: 48px;
    background-color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #9ca3af;
}

.activity-preview-map {
    background-color: var(--light-color);
    position: relative;
}

.activity-preview-map .leaflet-container {
    border-radius: 8px;
}

/* Timeline Metrics */
.timeline-card .metric-card {
    padding: 0.75rem;
    margin-bottom: 0;
}

.timeline-card .metric-value {
    font-size: 1.25rem;
}

.timeline-card .metric-label {
    font-size: 0.75rem;
}

/* Profile Pages */
.avatar-placeholder-large {
    width: 120px;
    height: 120px;
    background-color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #9ca3af;
}

.stat-card {
    padding: 1rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.activity-item {
    transition: background-color 0.2s;
}

.activity-item:hover {
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    padding: 0.5rem;
    margin: -0.5rem;
}

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 1rem;
}

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

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

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

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

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

/* Utility classes */
.text-muted {
    color: #6b7280;
}

.text-small {
    font-size: 0.875rem;
}

.visibility-public {
    color: var(--secondary-color);
}

.visibility-followers {
    color: var(--warning-color);
}

.visibility-private {
    color: var(--danger-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .map-container {
        height: 300px;
    }

    .map-container-large {
        height: 400px;
    }

    .metric-value {
        font-size: 1.5rem;
    }
}
