/* Trip toggle wrapper */
.trip-toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.trip-toggle,
.class-toggle {
    position: relative;
    display: inline-flex;
    padding: 0;
    margin: 0;
    width: 206px;
    height: 41px;
    border-radius: 23px;
    background: #582F90;
    overflow: hidden;
    padding: 0;
    margin: 0;
}

/* Sliding active indicator */
.trip-toggle::after,
.class-toggle::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: #CD2374;
    border-radius: inherit;
    transform: translateX(0);
    transition: transform 0.25s ease;
    z-index: 1;
}

.trip-radio {
    display: none;
}

.trip-radio[disabled] + .trip-label {
    opacity: .5;
    pointer-events: none;
}

.trip-label {
    position: relative;
    width: 50%;
    height: 100%;
    text-align: center;
    color: rgba(203, 168, 252, 1) !important;
    font-weight: 400 !important;
    font-size: 16px !important;
    line-height: 22px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    transform: translateX(-4px);
    z-index: 2;
    background: transparent;
}

.trip-radio:checked + .trip-label {
    background-color: transparent;
    color: #fff !important;
    z-index: 2;
    box-shadow: none;
    opacity: 1;
    transform: translateX(0);
    margin: 0;
}

/* Move indicator to right segment when one-way is checked */
/* Class-based control for cross-browser support */
.trip-toggle.is-right::after,
.class-toggle.is-right::after {
    transform: translateX(100%);
}

.trip-toggle.is-left::after,
.class-toggle.is-left::after {
    transform: translateX(0);
}