/* Chart styles - shared across all pages */

.chart-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease;
    margin-bottom: 2rem;
}

.chart-card:hover {
    transform: translateY(-2px);
}

.chart-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.chart-header-weight {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.chart-header-heart {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.chart-header-temperature {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.chart-header-height {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.chart-body {
    padding: 1.5rem 1rem 1rem 0.5rem;
    background: #fafbfc;
    position: relative;
    touch-action: none; /* Prevent default touch gestures on container */
}

.chart-body canvas {
    min-height: 300px;
    cursor: grab;
    touch-action: none; /* Prevent default touch - let zoom plugin handle it */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.chart-body canvas:active {
    cursor: grabbing;
}

@media (hover: none) {
    /* On touch devices, remove cursor styles */
    .chart-body canvas {
        cursor: default;
    }
}

.zoom-hint {
    font-size: 0.85rem;
    color: #718096;
    font-style: italic;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.view-toggle-btn {
    padding: 0.4rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.view-toggle-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border-color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.chart-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.chart-header-content h5 {
    margin-bottom: 0;
}

.horse-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    width: 100%;
}

.horse-toggle-btn {
    padding: 0.3rem 0.8rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.horse-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.6);
}

.horse-toggle-btn.hidden {
    opacity: 0.5;
    text-decoration: line-through;
}

.reset-zoom-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.reset-zoom-btn:hover {
    background: white;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

@media (max-width: 768px) {
    .chart-body canvas {
        min-height: 400px;
        height: 400px !important;
    }
    
    .chart-body {
        padding: 1rem 0.5rem 0.5rem 0.25rem;
    }
}

.section-title {
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #667eea;
}

