/* =========================================================
   CF7 Range Slider – Plain CSS stylesheet
   ========================================================= */

/* Container */
.cf7rs-range-slider {
    display: block;
    padding: 8px 0 16px;
    user-select: none;
    -webkit-user-select: none;
}

/* ── Value display ───────────────────────────────────────── */
.cf7rs-display {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: #222;
    min-height: 1.4em;
}

.cf7rs-prefix,
.cf7rs-suffix {
    font-weight: 400;
    color: #555;
}

.cf7rs-separator {
    font-weight: 400;
    color: #888;
    margin: 0 2px;
}

/* ── Track wrapper ────────────────────────────────────────── */
.cf7rs-track-wrapper {
    padding: 10px 0 0;
    position: relative;
}

.cf7rs-track {
    position: relative;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    margin: 0 10px; /* leave room for handles at edges */
}

/* ── Highlight between the two handles ────────────────────── */
.cf7rs-range-highlight {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 3px;
    background: #0073aa;
    pointer-events: none;
}

/* ── Handles ──────────────────────────────────────────────── */
.cf7rs-handle {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #0073aa;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
    cursor: grab;
    transition: border-color .15s, box-shadow .15s;
    touch-action: none;
    outline: none;
    z-index: 2;
}

.cf7rs-handle:hover,
.cf7rs-handle:focus {
    border-color: #005177;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, .25);
}

.cf7rs-handle:active {
    cursor: grabbing;
    border-color: #005177;
}

/* ── Step ticks ───────────────────────────────────────────── */
.cf7rs-ticks {
    position: relative;
    /*
     * The track has margin: 0 10px to accommodate handles at the edges.
     * We match that so tick positions align perfectly with the track.
     */
    margin: 0 10px;
    height: 28px;   /* tick mark (8px) + gap (4px) + label (~16px) */
    margin-top: 4px;
}

/* Each tick is absolutely positioned along the same percentage axis */
.cf7rs-tick {
    position: absolute;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateX(-50%);
    cursor: pointer;
}

/* Vertical tick mark line */
.cf7rs-tick-mark {
    display: block;
    width: 1px;
    height: 8px;
    background: #ccc;
    transition: background .15s;
}

/* Numeric label beneath the tick */
.cf7rs-tick-label {
    display: block;
    margin-top: 3px;
    font-size: 0.7rem;
    line-height: 1;
    color: #999;
    white-space: nowrap;
    transition: color .15s;
}

/* Active state: ticks inside the selected range */
.cf7rs-tick--active .cf7rs-tick-mark {
    background: #0073aa;
}

.cf7rs-tick--active .cf7rs-tick-label {
    color: #0073aa;
    font-weight: 600;
}

/* First and last tick labels are always visible and slightly bolder */
.cf7rs-tick:first-child .cf7rs-tick-label,
.cf7rs-tick:last-child  .cf7rs-tick-label {
    color: #555;
}

.cf7rs-tick:first-child .cf7rs-tick-mark,
.cf7rs-tick:last-child  .cf7rs-tick-mark {
    background: #aaa;
    width: 2px;
}

/* ── Validation error state ──────────────────────────────── */
.wpcf7-not-valid .cf7rs-track {
    background: #fdd;
}

.wpcf7-not-valid .cf7rs-range-highlight {
    background: #c00;
}

.wpcf7-not-valid .cf7rs-handle {
    border-color: #c00;
}

/* ── Responsive tweak ─────────────────────────────────────── */
@media (max-width: 480px) {
    .cf7rs-handle {
        width: 26px;
        height: 26px;
        margin-top: -13px;
        margin-left: -13px;
    }

    .cf7rs-tick-label {
        font-size: 0.65rem;
    }
}
