/*!
 * VILLAGE v0.0.3 | SPDX-License-Identifier: MIT | License-Filename: LICENSE.md | restricted use (see terms and conditions)
 */
@charset "UTF-8";

/* ¯¯¯¯¯¯¯¯¯ *\
  TOGGLE
\* ˍˍˍˍˍˍˍˍˍ */
.village-toggle {
  display: flex;
  flex-wrap: wrap;
  position: relative;
  padding: 1rem 0;

  --text-spacing: 0;
  --title-spacing: 0;
}

.village-toggle input[type=checkbox] {
  width: 2.5rem;
  height: 1.5rem;
  position: absolute;
  opacity: 0;
  box-shadow: inset 0 0 0 1px var(--border-action-high-village-primary);
}

.village-toggle input[type=checkbox]:checked ~ .village-toggle__label[data-village-unchecked-label][data-village-checked-label]::before {
  content: attr(data-village-checked-label);
}

.village-toggle input[type=checkbox]:checked ~ .village-toggle__label::after {
  transform: translateX(1rem);
  --data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='hsl(180, 75%, 25%)' d='M10 15.17l9.2-9.2 1.4 1.42L10 18l-6.36-6.36 1.4-1.42z'/></svg>");
  background-image: var(--data-uri-svg);
}

.village-toggle label {
  --toggle-status-width: auto;
  display: inline-flex;
  width: calc(100% - 2rem);
  min-height: 1.5rem;
  font-size: 1rem;
  line-height: 1.5rem;
  color: var(--text-label-grey);
}

.village-toggle label[data-village-unchecked-label][data-village-checked-label] {
  padding-left: 0;
}

.village-toggle label[data-village-unchecked-label][data-village-checked-label]::before {
  content: attr(data-village-unchecked-label);
  margin-right: calc(var(--toggle-status-width) - 0.5rem);
  margin-bottom: 1rem;
}

.village-toggle label[data-village-unchecked-label][data-village-checked-label] + .village-hint-text {
  margin-top: 0.5rem;
}

.village-toggle label::before {
  content: "";
  display: block;
  flex-shrink: 0;
  height: calc(1.25rem + 1px);
  padding-top: 1.75rem;
  font-size: 0.75rem;
  line-height: 1.25rem;
  border-radius: 0.75rem;
  margin-right: 2rem;
  min-width: 2.5rem;
  max-width: 2.5rem;
  background-repeat: no-repeat;
  color: var(--text-active-village-primary);

  --data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg width='40' stroke='hsl(180, 75%, 25%)' height='24' viewBox='0 0 40 24' fill='transparent' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='39' height='23' rx='11.5' /></svg>");
  background-image: var(--data-uri-svg);
}

.village-toggle label::after {
  content: "";
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 1rem;
  left: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background-repeat: no-repeat;
  background-size: 1rem;
  background-position: center;
  color: var(--text-active-village-primary);
  box-shadow: inset 0 0 0 1px var(--border-action-high-village-primary);
  background-color: var(--background-default-grey);

  --idle: transparent;
  --hover: var(--background-default-grey-hover);
  --active: var(--background-default-grey-active);
}

.village-toggle .village-hint-text {
  display: block;
  margin-top: 1rem;
  margin-bottom: 0;
  font-size: 0.75rem;
  line-height: 1.25rem;
  flex-basis: 100%;
  color: var(--text-mention-grey);
}

.village-toggle--label-left .village-toggle__input {
  order: 1;
  margin: 0 0 0 auto;
}

.village-toggle--label-left .village-toggle__input + label[data-village-checked-label]::before {
  margin-right: 0;
  margin-left: calc(var(--toggle-status-width) - 0.5rem);
}

.village-toggle--label-left .village-toggle__label {
  justify-content: space-between;
  padding-left: 0;
  width: calc(100% - 2rem);
  flex: 1;
}

.village-toggle--label-left .village-toggle__label::before {
  flex-shrink: 0;
  order: 1;
  margin-left: 1rem;
  margin-right: 0;
  text-align: right;
  direction: rtl;
}

.village-toggle--label-left .village-toggle__label::after {
  left: auto;
  right: 1rem;
}

.village-toggle--label-left .village-hint-text {
  order: 2;
}

.village-toggle__list {
  --ul-type: none;
  --ol-type: none;
  --ul-start: 0;
  --ol-start: 0;
  --xl-block: 0;
  --li-bottom: 0;
  --ol-content: none;
}

.village-fieldset .village-toggle__list li:first-child .village-toggle {
  padding-top: 0;
}

.village-fieldset .village-toggle__list li:first-child .village-toggle label::after {
  top: 0;
}

:root[data-village-theme=dark] .village-toggle label::before {
  --data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg width='40' stroke='hsl(180, 80%, 75%)' height='24' viewBox='0 0 40 24' fill='transparent' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='39' height='23' rx='11.5' /></svg>");
}

.village-toggle input[type=checkbox]:checked {
  background-color: var(--background-active-village-primary);

  --idle: transparent;
  --hover: var(--background-active-village-primary-hover);
  --active: var(--background-active-village-primary-active);
}

.village-toggle input[type=checkbox]:checked ~ .village-toggle__label::before {
  --data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg width='40' stroke='hsl(180, 75%, 25%)' height='24' viewBox='0 0 40 24' fill='hsl(180, 75%, 25%)' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='39' height='23' rx='11.5' /></svg>");
  background-image: var(--data-uri-svg);
}

:root[data-village-theme=dark] .village-toggle input[type=checkbox]:checked ~ .village-toggle__label::before {
  --data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg width='40' stroke='hsl(180, 80%, 75%)' height='24' viewBox='0 0 40 24' fill='hsl(180, 80%, 75%)' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='39' height='23' rx='11.5' /></svg>");
}

:root[data-village-theme=dark] .village-toggle input[type=checkbox]:checked ~ .village-toggle__label::after {
  --data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='hsl(180, 80%, 75%)' d='M10 15.17l9.2-9.2 1.4 1.42L10 18l-6.36-6.36 1.4-1.42z'/></svg>");
}

.village-toggle input[type=checkbox]:disabled {
  box-shadow: inset 0 0 0 1px var(--border-disabled-grey);
}

.village-toggle input[type=checkbox]:disabled:checked {
  background-color: var(--background-disabled-grey);

  --idle: transparent;
  --hover: var(--background-disabled-grey-hover);
  --active: var(--background-disabled-grey-active);
}

.village-toggle input[type=checkbox]:disabled:checked ~ .village-toggle__label::before {
  --data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg width='40' stroke='%23e5e5e5' height='24' viewBox='0 0 40 24' fill='%23e5e5e5' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='39' height='23' rx='11.5' /></svg>");
  background-image: var(--data-uri-svg);
}

:root[data-village-theme=dark] .village-toggle input[type=checkbox]:disabled:checked ~ .village-toggle__label::before {
  --data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg width='40' stroke='%232a2a2a' height='24' viewBox='0 0 40 24' fill='%232a2a2a' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='39' height='23' rx='11.5' /></svg>");
}

.village-toggle input[type=checkbox]:disabled:checked ~ .village-toggle__label::after {
  --data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23929292' d='M10 15.17l9.2-9.2 1.4 1.42L10 18l-6.36-6.36 1.4-1.42z'/></svg>");
  background-image: var(--data-uri-svg);
}

:root[data-village-theme=dark] .village-toggle input[type=checkbox]:disabled:checked ~ .village-toggle__label::after {
  --data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23666' d='M10 15.17l9.2-9.2 1.4 1.42L10 18l-6.36-6.36 1.4-1.42z'/></svg>");
}

.village-toggle input[type=checkbox]:disabled ~ .village-toggle__label::before {
  color: var(--text-disabled-grey);

  --data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg width='40' stroke='%23e5e5e5' height='24' viewBox='0 0 40 24' fill='transparent' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='39' height='23' rx='11.5' /></svg>");
  background-image: var(--data-uri-svg);
}

:root[data-village-theme=dark] .village-toggle input[type=checkbox]:disabled ~ .village-toggle__label::before {
  --data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg width='40' stroke='%232a2a2a' height='24' viewBox='0 0 40 24' fill='transparent' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='39' height='23' rx='11.5' /></svg>");
}

.village-toggle input[type=checkbox]:disabled ~ .village-toggle__label::after {
  color: var(--text-disabled-grey);
  box-shadow: inset 0 0 0 1px var(--border-disabled-grey);
}

.village-toggle--border-bottom {
  box-shadow: inset 0 -1px 0 0 var(--border-default-grey);
}

.village-toggle--error label,
.village-fieldset--error .village-toggle label {
  color: var(--text-default-error);
}

.village-toggle--error label::before,
.village-fieldset--error .village-toggle label::before {
  color: var(--text-default-error);

  --data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg width='40' stroke='hsl(0, 45%, 43%)' height='24' viewBox='0 0 40 24' fill='transparent' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='39' height='23' rx='11.5' /></svg>");
  background-image: var(--data-uri-svg);
}

:root[data-village-theme=dark] .village-toggle--error label::before,
:root[data-village-theme=dark] .village-fieldset--error .village-toggle label::before {
  --data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg width='40' stroke='hsl(0, 80%, 65%)' height='24' viewBox='0 0 40 24' fill='transparent' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='39' height='23' rx='11.5' /></svg>");
}

.village-toggle--error label::after,
.village-fieldset--error .village-toggle label::after {
  box-shadow: inset 0 0 0 1px var(--border-plain-error);
}

.village-toggle--error input[type=checkbox]:checked ~ .village-toggle__label::before,
.village-fieldset--error .village-toggle input[type=checkbox]:checked ~ .village-toggle__label::before {
  --data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg width='40' stroke='hsl(0, 45%, 43%)' height='24' viewBox='0 0 40 24' fill='hsl(180, 75%, 25%)' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='39' height='23' rx='11.5' /></svg>");
  background-image: var(--data-uri-svg);
}

:root[data-village-theme=dark] .village-toggle--error input[type=checkbox]:checked ~ .village-toggle__label::before,
:root[data-village-theme=dark] .village-fieldset--error .village-toggle input[type=checkbox]:checked ~ .village-toggle__label::before {
  --data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg width='40' stroke='hsl(0, 80%, 65%)' height='24' viewBox='0 0 40 24' fill='hsl(180, 80%, 75%)' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='39' height='23' rx='11.5' /></svg>");
}

.village-toggle--valid label,
.village-fieldset--valid .village-toggle label {
  color: var(--text-default-success);
}

.village-toggle--valid label::before,
.village-fieldset--valid .village-toggle label::before {
  color: var(--text-default-success);

  --data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg width='40' stroke='hsl(90, 45%, 43%)' height='24' viewBox='0 0 40 24' fill='transparent' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='39' height='23' rx='11.5' /></svg>");
  background-image: var(--data-uri-svg);
}

:root[data-village-theme=dark] .village-toggle--valid label::before,
:root[data-village-theme=dark] .village-fieldset--valid .village-toggle label::before {
  --data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg width='40' stroke='hsl(90, 80%, 65%)' height='24' viewBox='0 0 40 24' fill='transparent' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='39' height='23' rx='11.5' /></svg>");
}

.village-toggle--valid label::after,
.village-fieldset--valid .village-toggle label::after {
  box-shadow: inset 0 0 0 1px var(--border-plain-success);
}

.village-toggle--valid input[type=checkbox]:checked ~ .village-toggle__label::before,
.village-fieldset--valid .village-toggle input[type=checkbox]:checked ~ .village-toggle__label::before {
  --data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg width='40' stroke='hsl(90, 45%, 43%)' height='24' viewBox='0 0 40 24' fill='hsl(180, 75%, 25%)' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='39' height='23' rx='11.5' /></svg>");
  background-image: var(--data-uri-svg);
}

:root[data-village-theme=dark] .village-toggle--valid input[type=checkbox]:checked ~ .village-toggle__label::before,
:root[data-village-theme=dark] .village-fieldset--valid .village-toggle input[type=checkbox]:checked ~ .village-toggle__label::before {
  --data-uri-svg: url("data:image/svg+xml;charset=utf-8,<svg width='40' stroke='hsl(90, 80%, 65%)' height='24' viewBox='0 0 40 24' fill='hsl(180, 80%, 75%)' xmlns='http://www.w3.org/2000/svg'><rect x='0.5' y='0.5' width='39' height='23' rx='11.5' /></svg>");
}
@media (min-width: 36em) {
  /*! media sm */
}
@media (min-width: 48em) {
  /*! media md */
}
@media (min-width: 62em) {
  /*! media lg */
}
@media (min-width: 78em) {
  /*! media xl */
}
