/* Premium styling for Inflation Calculator */

/* Enforce consistent modern sans-serif typography across tool components */
.is-tool-page,
.apple-glass,
.apple-card,
#banner-erosion-text,
#banner-erosion-text * {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.apple-glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

:is(.dark .apple-glass) {
    background: rgba(18, 18, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.apple-card {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.005) 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

:is(.dark .apple-card) {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.text-glow {
    text-shadow: 0 0 40px rgba(16, 185, 129, 0.2);
}

.bg-subtle-grid {
    background-size: 60px 60px;
    background-image:
        linear-gradient(to right, rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

:is(.dark .bg-subtle-grid) {
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.01) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
}

/* Custom Range Slider Track & Progress Bar (Chrome, Safari, Edge, Firefox) */
input[type=range] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    height: 28px;
    background: transparent !important;
    cursor: pointer;
    margin: 4px 0;
}

input[type=range]:focus {
    outline: none;
}

/* Webkit Track (::-webkit-slider-runnable-track) */
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: linear-gradient(90deg, #10b981 0%, #10b981 var(--slider-progress, 0%), #27272a var(--slider-progress, 0%), #27272a 100%);
    border: 1px solid #3f3f46;
    border-radius: 9999px;
}

html:not(.dark) input[type=range]::-webkit-slider-runnable-track {
    background: linear-gradient(90deg, #059669 0%, #059669 var(--slider-progress, 0%), #d4d4d8 var(--slider-progress, 0%), #d4d4d8 100%);
    border: 1px solid #a1a1aa;
}

/* Webkit Thumb (::-webkit-slider-thumb) */
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 22px;
    width: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 2.5px solid #10b981;
    cursor: pointer;
    margin-top: -7px;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.7);
    transition: transform 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

html:not(.dark) input[type=range]::-webkit-slider-thumb {
    background: #ffffff;
    border: 2.5px solid #059669;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.4);
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background: #ffffff;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.9);
}

/* Firefox Track (::-moz-range-track) */
input[type=range]::-moz-range-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: linear-gradient(90deg, #10b981 0%, #10b981 var(--slider-progress, 0%), #27272a var(--slider-progress, 0%), #27272a 100%);
    border: 1px solid #3f3f46;
    border-radius: 9999px;
}

html:not(.dark) input[type=range]::-moz-range-track {
    background: linear-gradient(90deg, #059669 0%, #059669 var(--slider-progress, 0%), #d4d4d8 var(--slider-progress, 0%), #d4d4d8 100%);
    border: 1px solid #a1a1aa;
}

/* Firefox Thumb (::-moz-range-thumb) */
input[type=range]::-moz-range-thumb {
    height: 22px;
    width: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 2.5px solid #10b981;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.7);
    transition: transform 0.15s ease-in-out;
}

html:not(.dark) input[type=range]::-moz-range-thumb {
    background: #ffffff;
    border: 2.5px solid #059669;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.4);
}

/* Custom Scrollbar */
.scrollbar-thin::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

:is(.dark .scrollbar-thin::-webkit-scrollbar-track) {
    background: rgba(0, 0, 0, 0.2);
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

:is(.dark .scrollbar-thin::-webkit-scrollbar-thumb) {
    background: rgba(255, 255, 255, 0.15);
}

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