/**
 * Body Surface Area (BSA) Calculator - Custom Stylesheet
 * High-contrast Light & Dark Mode, Apple Glassmorphism, Responsive Mobile Ergonomics
 */

/* Apple-style Glassmorphism & Elevation */
.apple-glass {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

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

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

.dark .apple-card {
    background: rgba(24, 24, 27, 0.75);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.35);
}

.apple-card:hover {
    border-color: rgba(244, 63, 94, 0.3);
    box-shadow: 0 10px 30px -10px rgba(244, 63, 94, 0.12);
}

.text-glow {
    text-shadow: 0 0 20px rgba(244, 63, 94, 0.3);
}

/* Custom styles for range slider track */
input[type="range"].ht-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #e4e4e7;
    border-radius: 9999px;
    outline: none;
    cursor: pointer;
}

.dark input[type="range"].ht-range {
    background: rgba(255, 255, 255, 0.15);
}

input[type="range"].ht-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f43f5e;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(244, 63, 94, 0.4);
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.dark input[type="range"].ht-range::-webkit-slider-thumb {
    border-color: #18181b;
}

input[type="range"].ht-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background-color: #e11d48;
}

/* Demographic Presets */
.preset-btn {
    min-height: 48px;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.preset-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(244, 63, 94, 0.35);
}

.preset-btn:active {
    transform: scale(0.98);
}

/* Formula Interactive Cards */
.formula-card {
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.formula-card:hover {
    transform: translateY(-2px);
    border-color: rgba(244, 63, 94, 0.4);
}

.formula-card.active-formula {
    border-color: #f43f5e !important;
    background: rgba(244, 63, 94, 0.06) !important;
    box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.25);
}

.dark .formula-card.active-formula {
    background: rgba(244, 63, 94, 0.12) !important;
    box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.4);
}

/* Horizontal Formula Progress Bar */
.formula-bar-track {
    height: 6px;
    background: #f4f4f5;
    border-radius: 9999px;
    overflow: hidden;
}

.dark .formula-bar-track {
    background: rgba(255, 255, 255, 0.08);
}

.formula-bar-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reference Comparison Cards */
.ref-card {
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.ref-card:hover {
    transform: translateY(-2px);
}

/* Hints */
.ht-hint {
    margin: 0.25rem 0 0;
    font-size: 11px;
    color: #b45309;
}

.dark .ht-hint {
    color: #fbbf24;
}

/* Mobile Touch Ergonomics */
@media (max-width: 640px) {
    .preset-btn {
        min-height: 52px;
    }
    
    .formula-card {
        padding: 0.875rem;
    }
}
