/* Pace Calculator Styles */

.apple-glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.dark .apple-glass {
    background: rgba(18, 18, 20, 0.7);
}

.apple-card {
    background: #ffffff;
    border: 1px solid #e4e4e7;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.apple-card:hover {
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.12);
}

.dark .apple-card {
    background: rgba(24, 24, 27, 0.65);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

.dark .apple-card:hover {
    border-color: rgba(16, 185, 129, 0.25);
    box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.15);
}

.input-glass {
    background: #f4f4f5;
    border: 1px solid #e4e4e7;
    min-height: 38px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.dark .input-glass {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.input-glass:focus-within {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

/* Apple Activity / Fitness Theme for Primary Result Card */
.pace-result-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.09) 0%, rgba(20, 184, 166, 0.06) 50%, rgba(56, 189, 248, 0.04) 100%), #ffffff;
    border: 1px solid rgba(16, 185, 129, 0.24);
    box-shadow: 0 4px 20px -2px rgba(16, 185, 129, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    border-radius: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.dark .pace-result-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(20, 184, 166, 0.07) 50%, rgba(56, 189, 248, 0.05) 100%), #141417;
    border: 1px solid rgba(16, 185, 129, 0.28);
    box-shadow: 0 4px 24px -2px rgba(0, 0, 0, 0.4);
}

.pace-result-card:hover {
    border-color: rgba(16, 185, 129, 0.38);
}

/* Segmented Control Mode Tabs (Apple style) */
.segmented-control {
    background: #f4f4f5;
    padding: 0.25rem;
    border-radius: 1rem;
    border: 1px solid #e4e4e7;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.25rem;
}

.dark .segmented-control {
    background: rgba(24, 24, 27, 0.8);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Tab Switcher */
.tab-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 40px;
    padding: 0.5rem 0.5rem;
    text-align: center;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #71717a;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.tab-btn:hover {
    color: #09090b;
}

.dark .tab-btn:hover {
    color: #f4f4f5;
}

.tab-btn.active {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    color: #059669;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.dark .tab-btn.active {
    background: #27272a;
    border-color: rgba(255, 255, 255, 0.12);
    color: #34d399;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Top Horizontal Presets */
.top-preset-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 40px;
}

.top-preset-btn:hover {
    transform: translateY(-1px);
}

.top-preset-btn.active-preset {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.45) !important;
    color: #047857 !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.dark .top-preset-btn.active-preset {
    background: rgba(16, 185, 129, 0.25) !important;
    border-color: rgba(16, 185, 129, 0.6) !important;
    color: #34d399 !important;
}

/* Preset Distance Buttons */
.preset-dist {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 0.75rem;
}

.preset-dist:hover {
    border-color: rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.preset-dist.active {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.5) !important;
    color: #047857 !important;
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.25);
}

.dark .preset-dist.active {
    background: rgba(16, 185, 129, 0.25) !important;
    border-color: rgba(16, 185, 129, 0.6) !important;
    color: #34d399 !important;
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.35);
}

/* Line Gauge Spectrum Styling (Apple/BMI style) */
.gauge-bar-segment {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.gauge-bar-segment.active-segment {
    filter: brightness(1.15) drop-shadow(0 0 4px currentColor);
}

.indicator-arrow {
    transition: left 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Pacing Strategy Buttons */
.strategy-btn {
    transition: all 0.2s ease;
    background: transparent;
    color: #71717a;
    min-height: 34px;
}

.strategy-btn:hover {
    color: #09090b;
}

.dark .strategy-btn:hover {
    color: #ffffff;
}

.strategy-btn.active {
    background: #ffffff;
    color: #047857;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dark .strategy-btn.active {
    background: #27272a;
    color: #34d399;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Training Zone Card Rows */
.training-zone-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: 1rem;
    background: #fafafa;
    border: 1px solid #f4f4f5;
    transition: all 0.2s ease;
}

.dark .training-zone-row {
    background: rgba(24, 24, 27, 0.4);
    border-color: rgba(255, 255, 255, 0.05);
}

.training-zone-row:hover {
    border-color: rgba(16, 185, 129, 0.25);
    transform: translateX(2px);
}

/* Custom Scrollbar for Splits Table */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.04);
    border-radius: 9999px;
}

.dark .custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.3);
    border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(16, 185, 129, 0.6);
}

/* Mobile font size guard to prevent iOS zoom */
@media (pointer: coarse), (max-width: 640px) {
    #input-distance-unit,
    #input-pace-unit {
        font-size: 16px;
    }
}

