/* SWITCH PASTILLA (owner rule: every yes/no checkbox is a pill switch, <x-switch>): green = yes, grey = no */
.switch-actiu .custom-control-label { cursor: pointer; }
.switch-actiu .custom-control-label::before {
    background-color: #e4e6ef;
    border-color: #e4e6ef;
}
.switch-actiu .custom-control-label::after { background-color: #fff; }
.switch-actiu .custom-control-input:checked ~ .custom-control-label::before {
    background-color: #1dc9b7;
    border-color: #1dc9b7;
}
.switch-actiu .custom-control-input:focus ~ .custom-control-label::before { box-shadow: none; }
.switch-actiu .custom-control-input:focus:not(:checked) ~ .custom-control-label::before { border-color: #e4e6ef; }
/* Larger than Bootstrap's default (track 2.75rem x 1.5rem) */
.switch-actiu.custom-switch { min-height: 1.5rem; padding-left: 3.5rem; }
.switch-actiu .custom-control-label { line-height: 1.5rem; padding-top: 0; }
.switch-actiu.custom-switch .custom-control-label::before {
    top: 0;
    left: -3.5rem;
    width: 2.75rem;
    height: 1.5rem;
    border-radius: 1.5rem;
}
.switch-actiu.custom-switch .custom-control-label::after {
    top: 2px;
    left: calc(-3.5rem + 2px);
    width: calc(1.5rem - 4px);
    height: calc(1.5rem - 4px);
    border-radius: 1.5rem;
}
.switch-actiu.custom-switch .custom-control-input:checked ~ .custom-control-label::after {
    transform: translateX(1.25rem);
}
/* END SWITCH PASTILLA */
/* mida="gran": as tall as a form input (task editor: facturable, esdeveniment) */
.switch-actiu--gran.custom-switch { min-height: 34px; padding-left: 4.75rem; }
.switch-actiu--gran .custom-control-label { line-height: 34px; }
.switch-actiu--gran.custom-switch .custom-control-label::before { left: -4.75rem; width: 64px; height: 34px; border-radius: 34px; }
.switch-actiu--gran.custom-switch .custom-control-label::after { left: calc(-4.75rem + 3px); top: 3px; width: 28px; height: 28px; border-radius: 34px; }
.switch-actiu--gran.custom-switch .custom-control-input:checked ~ .custom-control-label::after { transform: translateX(30px); }

/* SWITCH TRIPLE (<x-switch-triple>): left red = no, middle grey = all, right green = yes */
.switch-triple { position: relative; display: inline-flex; width: 60px; height: 26px; margin: 3px 0; border-radius: 26px; background-color: #e4e6ef; transition: background-color 0.15s; }
.switch-triple[data-estat="no"] { background-color: #fd397a; }
.switch-triple[data-estat="si"] { background-color: #1dc9b7; }
.switch-triple__zona { flex: 1; position: relative; z-index: 1; padding: 0; border: 0; background: transparent; cursor: pointer; }
.switch-triple__zona:focus { outline: none; }
.switch-triple__boto { position: absolute; top: 3px; left: 20px; width: 20px; height: 20px; border-radius: 50%; background-color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: left 0.15s; pointer-events: none; }
.switch-triple[data-estat="no"] .switch-triple__boto { left: 3px; }
.switch-triple[data-estat="si"] .switch-triple__boto { left: 37px; }
/* END SWITCH TRIPLE */
