﻿/* ──────────────────────────────────────────────────────────────────────────
   ws-checkbox  —  reusable custom checkbox component
   Usage:
     <label class="ws-cb">
       <input type="checkbox" name="..." value="..." />
       <span class="ws-cb__box" aria-hidden="true"></span>
       <span class="ws-cb__label">Label text</span>
     </label>

   For a disabled/always-on checkbox just add the `disabled` attribute on
   the <input>; the label will automatically dim.
   ────────────────────────────────────────────────────────────────────────── */

/* ── Row (the <label> itself) ── */
.ws-cb {
    align-items: center;
    cursor: pointer;
    display: inline-flex;
    gap: 10px;
    line-height: 1.35;
    position: relative;
    user-select: none;
}

/* Hide the native input but keep it accessible */
.ws-cb input[type="checkbox"] {
    height: 0;
    opacity: 0;
    position: absolute;
    width: 0;
}

/* ── Custom box ── */
.ws-cb__box {
    align-items: center;
    background: #fff;
    border: 1px solid #231f20;
    border-radius: 3px;
    display: inline-flex;
    flex: 0 0 18px;
    height: 18px;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    width: 18px;
}

/* Checkmark (hidden by default) */
.ws-cb__box::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    content: "";
    display: block;
    height: 11px;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.15s ease, transform 0.15s ease;
    width: 11px;
}

/* ── Label text ── */
.ws-cb__label {
    align-items: center;
    color: #231f20;
    display: inline-flex;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    font-size: 14px;
    gap: 4px;
    overflow: hidden;
}

/* ── Hover ── */
.ws-cb:hover .ws-cb__box {
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

/* ── Checked ── */
.ws-cb input[type="checkbox"]:checked + .ws-cb__box {
    background: #000;
    border-color: #000;
}

.ws-cb input[type="checkbox"]:checked + .ws-cb__box::after {
    opacity: 1;
    transform: scale(1);
}

/* ── Keyboard focus ── */
.ws-cb input[type="checkbox"]:focus-visible + .ws-cb__box {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
}

/* ── Disabled ── */
.ws-cb input[type="checkbox"]:disabled + .ws-cb__box {
    background: #e9ecef;
    border-color: #adb5bd;
    cursor: not-allowed;
}

.ws-cb input[type="checkbox"]:disabled ~ .ws-cb__label {
    color: #6c757d;
    cursor: not-allowed;
}

.ws-cb input[type="checkbox"]:disabled:checked + .ws-cb__box {
    background: #6c757d;
    border-color: #6c757d;
}

.ws-cb input[type="checkbox"]:disabled:checked + .ws-cb__box::after {
    opacity: 1;
    transform: scale(1);
}


/*Seprator*/
.ws-seprator {
    border-bottom: 1px solid #e8e9eb!important;
}