/* ===== Stock First Toggle – Sysprovider_AvailableFirst ===== */

/* Wrapper: float right so it sits immediately to the LEFT of the sorter */
.stock-first-wrapper {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    float: right;
    margin-right: 10px;
    padding: 4px 0 0; /* Match .sorter padding */
}

/* Label container */
.stock-first-toggle {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 8px;
    user-select: none;
}

/* Text label */
.stock-first-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    line-height: 1;
}

/* Toggle switch container */
.stock-first-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
    flex-shrink: 0;
}

/* Hide native checkbox */
.stock-first-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

/* Slider track */
.stock-first-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: background-color 0.3s ease;
    border-radius: 22px;
}

/* Slider knob */
.stock-first-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: transform 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Active state */
.stock-first-input:checked + .stock-first-slider {
    background-color: #4CAF50;
}

.stock-first-input:checked + .stock-first-slider:before {
    transform: translateX(22px);
}

/* Hover effect */
.stock-first-toggle:hover .stock-first-slider {
    background-color: #b0b0b0;
}

.stock-first-toggle:hover .stock-first-input:checked + .stock-first-slider {
    background-color: #43A047;
}

/* Active wrapper indicator */
.stock-first-wrapper.is-active .stock-first-label {
    color: #4CAF50;
}
