/**
 * Pregnancy Weight Gain 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 (Matching BMI Design Standard) */
input[type="range"].ht-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #e4e4e7;
    border-radius: 9999px;
    outline: none;
    cursor: pointer;
    margin: 0.5rem 0 0.15rem 0;
    transition: background 0.2s ease;
    color: #f43f5e !important;
}

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

input[type="range"].ht-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f43f5e !important;
    border: 2.5px solid #ffffff !important;
    box-shadow: 0 1.5px 4px rgba(0, 0, 0, 0.25) !important;
    cursor: grab;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.15s ease, box-shadow 0.15s ease;
}

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

input[type="range"].ht-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: #e11d48 !important;
    box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.25) !important;
}

input[type="range"].ht-range::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.1);
}

input[type="range"].ht-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #f43f5e !important;
    border: 2.5px solid #ffffff !important;
    box-shadow: 0 1.5px 4px rgba(0, 0, 0, 0.25) !important;
    cursor: grab;
}

/* Pregnancy Type Buttons */
.type-btn,
button.type-btn,
#type-single,
#type-twins {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    min-height: 38px;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 1px solid rgba(228, 228, 231, 0.9) !important;
    background: #f4f4f5 !important;
    color: #3f3f46 !important;
    box-shadow: none !important;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.dark .type-btn,
.dark button.type-btn,
.dark #type-single,
.dark #type-twins {
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(39, 39, 42, 0.8) !important;
    color: #d4d4d8 !important;
}

.type-btn:hover,
#type-single:hover,
#type-twins:hover {
    border-color: #fb7185 !important;
    color: #18181b !important;
}

.dark .type-btn:hover,
.dark #type-single:hover,
.dark #type-twins:hover {
    border-color: #fb7185 !important;
    color: #fff !important;
}

.type-btn[aria-pressed="true"],
#type-single[aria-pressed="true"],
#type-twins[aria-pressed="true"],
.dark .type-btn[aria-pressed="true"],
.dark #type-single[aria-pressed="true"],
.dark #type-twins[aria-pressed="true"] {
    background: #e11d48 !important;
    border-color: #e11d48 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12) !important;
}

.type-btn:active,
#type-single:active,
#type-twins:active {
    transform: scale(0.98);
}

/* Presets Buttons */
.preset-btn {
    min-height: 44px;
    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-preset {
    background: rgba(244, 63, 94, 0.12) !important;
    border-color: rgba(244, 63, 94, 0.45) !important;
    color: #e11d48 !important;
    font-weight: 700;
}

.dark .preset-btn.active-preset {
    background: rgba(244, 63, 94, 0.22) !important;
    border-color: rgba(244, 63, 94, 0.6) !important;
    color: #f43f5e !important;
}

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

/* Weight Distribution Anatomy Items */
.dist-item {
    transition: all 0.2s ease;
}

.dist-item:hover {
    transform: translateX(2px);
}

/* Custom Scrollbar for chart */
.custom-scrollbar::-webkit-scrollbar {
    height: 6px;
}

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

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

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(244, 63, 94, 0.3);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(244, 63, 94, 0.5);
}

/* Mobile Touch Ergonomics */
@media (max-width: 640px) {
    .type-btn,
    .preset-btn {
        min-height: 50px;
    }
}
