/* Fail-safe: Ensure preloader never blocks visibility or leaves a white screen */
.preloader {
    display: none !important;
}

body.is-preloading {
    overflow: visible !important;
}

/* Common Layout Utilities across ThemeForest MockUI Pages */
.h-full {
    height: 100% !important;
}

.w-full {
    width: 100% !important;
}

.shadow-xs {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

/* Spacing utilities missing from base framework */
.m-8 { margin: 2.5rem !important; }
.my-8 { margin-top: 2.5rem !important; margin-bottom: 2.5rem !important; }
.mx-8 { margin-left: 2.5rem !important; margin-right: 2.5rem !important; }
.mt-8 { margin-top: 2.5rem !important; }
.mb-8 { margin-bottom: 2.5rem !important; }
.p-8 { padding: 2.5rem !important; }
.py-8 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
.px-8 { padding-left: 2.5rem !important; padding-right: 2.5rem !important; }
.pt-8 { padding-top: 2.5rem !important; }
.pb-8 { padding-bottom: 2.5rem !important; }

/* Button spacing & typography polish */
.btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    line-height: 1.5 !important;
    font-weight: 600 !important;
    vertical-align: middle !important;
}

.btn.has-icon .icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 0.5rem !important;
}

/* Custom Range Slider Styling (Linear / Stripe Inspired) */
.custom-slider {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 100% !important;
    height: 10px !important;
    border-radius: 9999px !important;
    background: #e2e8f0;
    outline: none !important;
    border: none !important;
    cursor: pointer !important;
    transition: background 0.15s ease !important;
    padding: 0 !important;
}

.custom-slider:focus {
    box-shadow: none !important;
    outline: none !important;
}

.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: #0d6efd !important;
    border: 4px solid #ffffff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(13, 110, 253, 0.2) !important;
    cursor: grab !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.custom-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15) !important;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(13, 110, 253, 0.25) !important;
}

.custom-slider::-webkit-slider-thumb:active {
    cursor: grabbing !important;
    transform: scale(1.25) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), 0 0 0 5px rgba(13, 110, 253, 0.3) !important;
}

.custom-slider::-moz-range-thumb {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: #0d6efd !important;
    border: 4px solid #ffffff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(13, 110, 253, 0.2) !important;
    cursor: grab !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.custom-slider::-moz-range-thumb:hover {
    transform: scale(1.15) !important;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(13, 110, 253, 0.25) !important;
}

.custom-slider::-moz-range-thumb:active {
    cursor: grabbing !important;
    transform: scale(1.25) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), 0 0 0 5px rgba(13, 110, 253, 0.3) !important;
}

/* Smooth Scrolling Stabilization & Mobile Jitter Elimination */
html,
body,
:root {
    scroll-behavior: auto !important;
}

html {
    -webkit-overflow-scrolling: touch;
}

body {
    -webkit-overflow-scrolling: touch;
    overflow-x: clip !important;
}

#smooth-wrapper {
    overflow: visible !important;
    height: auto !important;
}

#smooth-content {
    overflow: visible !important;
    height: auto !important;
}

/* Fallback visibility so elements are never hidden if ScrollTrigger is delayed */
[data-ss-reveal],
[data-ss-reveal-group] {
    opacity: 1;
    visibility: visible;
}

/* Mobile GPU optimization (Prevent layer composite exhaustion and stutter) */
@media (max-width: 1023.98px) {
    [data-ss-reveal],
    [data-ss-reveal-group] {
        will-change: auto !important;
        filter: none !important;
    }
}

/* Global Typography & Badge Color Fixes (Prevent White-on-White Text) */
.text-secondary {
    color: #64748b !important;
}

.badge {
    --ss-badge-color: #0f172a;
}

.badge.bg-light,
.badge.bg-white,
.badge.text-secondary {
    color: #334155 !important;
    --ss-badge-color: #334155 !important;
}

.badge.bg-primary-subtle,
.badge.text-primary {
    color: var(--ss-primary, #fe5b25) !important;
    --ss-badge-color: var(--ss-primary, #fe5b25) !important;
}

