@value _dodgerBlue, _alto2, _nevada, _white from '../CommonCss/var-colors.css';
@value _px_0, _px_1, _px_3, _px_10, _px_18, _px_20, _px_100 from '../CommonCss/var-units.css';

.common {
    display: inline-flex;
    user-select: none;
    outline: none;
    cursor: pointer;
    font-weight: normal;
    text-transform: none
}
.checkbox { display:none }
.container{
    width: _px_20;
    height: _px_20;
    flex-shrink: 0
}
/* primary css */
.primary{ color: _alto2 }
.checked.primary{ color: _dodgerBlue }
.primary svg path{ color: inherit}
.checkbox:checked + .primary svg g path{ display: none }
.checkbox:checked + .primary svg polyline{ display: block }

/* secondary css */
.secondary {border-radius: _px_3}
.secondary svg polyline {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: _px_18;
    stroke-dashoffset: _px_18;
    transition: all 0.1s ease
}
.checked.secondary{ border-color: _dodgerBlue}
.checkbox:checked + .secondary svg polyline {
    stroke-dashoffset: 0;
    transition: all 0.3s ease
}
/* variant css */
.outline{
  border: _px_1 solid _alto2;
  color: _dodgerBlue
}
.fill{
    background-color: _dodgerBlue;
    border : _px_1 solid _dodgerBlue;
    color: _white
}
.outline svg polyline,
.fill svg polyline,
.primary svg polyline{
    color: inherit;
    stroke: currentColor
}
/* primary tick */
.primary svg polyline{
    stroke-width: 1;
    stroke-dasharray: _px_100;
    stroke-dashoffset: _px_100;
    animation-name: draw;
    animation-duration: 0.8s;
    animation-fill-mode: forwards; /* Stay on the last frame */
    animation-iteration-count: 1; /* Run only once */
    animation-timing-function: ease-in-out;
    display: none;
    fill: none;
    stroke-linecap: round;
    stroke-miterlimit: 10
}
@keyframes draw {
    to {
        stroke-dashoffset: 0
    }
}
.disabled{
    color : _nevada;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none
}
/* align */
.row{
    flex-direction: row
}
.rowreverse{
    flex-direction: row-reverse
}
.column{
    flex-direction: column
}
.columnreverse{
    flex-direction: column-reverse
}
/* Gutter css */
.row > :not(:last-child) { margin: 0 _px_10 0 0}
.column > :not(:last-child) { margin-bottom: _px_10 }
.rowreverse > :not(:last-child) { margin: 0 0 0 _px_10 }
.columnreverse > :not(:last-child) { margin-top: _px_10 }
/* rtl */
html[dir="rtl"] .row > :not(:last-child){
  margin: 0 0 0 _px_10
}
html[dir="rtl"] .rowreverse > :not(:last-child){
  margin: 0 _px_10 0 0
}
