/* Atlas event date range slider */
.date-range-filter-container {
    margin-top: 0;
    padding: 10px 0 2px;
    border-top: 1px solid #e8edef;
}

.range-slider-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 196px;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
}

.date-filter-toggle {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-width: 0;
    cursor: pointer;
    user-select: none;
}

.date-filter-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.date-filter-toggle-control {
    position: relative;
    width: 32px;
    height: 18px;
    border-radius: 999px;
    background: #c7d0d5;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06);
    transition: background-color .2s ease, box-shadow .2s ease;
}

.date-filter-toggle-control::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .2s ease;
}

.date-filter-toggle input:checked + .date-filter-toggle-control {
    background: #0078a8;
    box-shadow: inset 0 0 0 1px rgba(0, 92, 130, .2);
}

.date-filter-toggle input:checked + .date-filter-toggle-control::after {
    transform: translateX(14px);
}

.date-filter-toggle input:focus-visible + .date-filter-toggle-control {
    outline: 3px solid rgba(0, 120, 168, .22);
    outline-offset: 2px;
}

.date-filter-toggle-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0;
}

.date-filter-toggle-copy strong {
    color: #27343a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.range-values {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    width: 196px;
    min-height: 28px;
    padding: 4px 8px;
    box-sizing: border-box;
    border: 1px solid #d7e2e6;
    border-radius: 10px;
    background: #f3f6f7;
    color: #006f9d;
    font-size: 11px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.range-values-separator {
    padding: 0 4px;
    color: #849198;
}

.range-slider-wrapper {
    position: relative;
    width: 100%;
    height: 20px;
    transition: opacity 0.2s ease;
    --range-track-height: 5px;
    --range-thumb-size: 18px;
}

.range-slider-wrapper.disabled-wrapper {
    opacity: .42;
    pointer-events: none;
}

.range-values.disabled {
    border-color: #dfe5e8;
    background: #f1f4f5;
    color: #89949a;
}

@media (max-width: 430px) {
    .range-slider-header {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .range-values {
        width: 100%;
    }
}

.slider-track {
    width: 100%;
    height: var(--range-track-height);
    background-color: #dce4e7;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 999px;
    pointer-events: none;
}

/* The selected range bar */
.slider-track-fill {
    height: var(--range-track-height);
    background-color: #0078A8;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    border-radius: 999px;
    pointer-events: none;
    transition: background-color 0.2s;
}

.disabled-wrapper .slider-track-fill {
    background-color: #aaa;
}

.range-slider-wrapper input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    pointer-events: none;
    /* Let clicks pass through to container/track where not on thumb */
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    border: 0;
    line-height: 0;
    background: transparent;
    z-index: 2;
    outline: none;
}

/* Webkit Track */
.range-slider-wrapper input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: var(--range-track-height);
    background: transparent;
    border: 0;
    border-radius: 5px;
}

/* Webkit Thumb */
.range-slider-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    pointer-events: auto;
    /* Re-enable pointer events for thumb */
    width: var(--range-thumb-size);
    height: var(--range-thumb-size);
    border-radius: 50%;
    background: #fff;
    border: 2px solid #0078A8;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    margin-top: calc((var(--range-track-height) - var(--range-thumb-size)) / 2);
    /* Align thumb center with track across browsers */
    position: relative;
    z-index: 3;
    transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.2s;
}

.disabled-wrapper input[type="range"]::-webkit-slider-thumb {
    border-color: #aaa;
    cursor: not-allowed;
}

.range-slider-wrapper input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.disabled-wrapper input[type="range"]::-webkit-slider-thumb:hover {
    transform: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}


/* Firefox Thumb */
.range-slider-wrapper input[type="range"]::-moz-range-thumb {
    pointer-events: auto;
    width: var(--range-thumb-size);
    height: var(--range-thumb-size);
    border-radius: 50%;
    background: #fff;
    border: 2px solid #0078A8;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 3;
    position: relative;
    transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.2s;
}

.disabled-wrapper input[type="range"]::-moz-range-thumb {
    border-color: #aaa;
    cursor: not-allowed;
}

.range-slider-wrapper input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.disabled-wrapper input[type="range"]::-moz-range-thumb:hover {
    transform: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Firefox Track */
.range-slider-wrapper input[type="range"]::-moz-range-track {
    height: var(--range-track-height);
    background: transparent;
    border: 0;
    border-radius: 5px;
}

.range-slider-wrapper input[type="range"]::-moz-range-progress {
    background: transparent;
    border: 0;
}

/* Legacy Edge/IE Track */
.range-slider-wrapper input[type="range"]::-ms-track {
    width: 100%;
    height: var(--range-track-height);
    background: transparent;
    border-color: transparent;
    color: transparent;
}
