

.zk-material {
  position: relative;
  padding: 0;
  margin: 5px;
  border: none;
  overflow: visible;
}

.zk-material input,
.zk-material textarea
{
  box-sizing: border-box;
  width: 100%;
  padding: 12px 10px 4px;
  border: none;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid #DDD;
  font-size: 120%;
  outline: none;
  cursor: text;
}

/* Claude: ring de outline solo con :focus-visible (teclado) — no aparece al hacer click con raton */
.zk-material input:focus-visible,
.zk-material textarea:focus-visible
{
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.zk-material    input::-webkit-input-placeholder,
.zk-material textarea::-webkit-input-placeholder
{
  transition: color 300ms ease;
}


.zk-material    input:not(:focus)::-webkit-input-placeholder,
.zk-material textarea:not(:focus)::-webkit-input-placeholder
{
  color: transparent;
}


.zk-material select {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 10px 4px;
  border-top: 0px;
  border-right: 0px;
  border-left: 0px;
  border-bottom: 1px solid #DDD;
  font-size: 120%;
  outline: none;
}

/* Claude: ring de outline solo con :focus-visible (teclado) — no aparece al hacer click con raton */
.zk-material select:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.zk-material select > option {
  font-size: 120%;
}

.zk-material hr {
  content: '';
  display: block;
  /*
  position: absolute;
  bottom: 0;
  left: 0;
  margin: 0;
  padding: 0;
  */
  margin:-1px 0 0;
  width: 100%;
  height: 2px;
  border: none;
  background: #607D8B;
  font-size: 1px;
  will-change: transform, visibility;
  transition: all 200ms ease-out;
  transform: scaleX(0);
  visibility: hidden;
  z-index: 10;
}
.zk-material.zk-error > hr
{
  background: hsl(var(--red),100%,var(--light30)) !important;
}

.zk-material.zk-error > label,
.zk-material.zk-error > div,
div.zk-error,
span.zk-error
{
  color: hsl(var(--red),100%,var(--light30)) !important;
}

.zk-material.zk-error select,
.zk-material.zk-error input,
.zk-material.zk-error textarea
{
  border-bottom:1px solid hsl(var(--red),100%,var(--light30)) !important;
}



.zk-material input:focus ~ hr,
.zk-material select:focus ~ hr,
.zk-material textarea:focus ~ hr {
  transform: scaleX(1);
  visibility: visible;
}
.zk-material label {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 120%;
  xcolor: #607D8B;
  transform-origin: 0 -220%;
  transition: transform 300ms ease;
  pointer-events: none;
}
.zk-material[data-thisfield-tip=money] > label {left: 1.8em; }
.zk-material[data-thisfield-tip=fecha] > label {left: 1.8em; }


.zk-material input:focus ~ label,
.zk-material input:valid ~ label,
.zk-material select:focus ~ label,
.zk-material select:valid ~ label,
.zk-material textarea:focus ~ label,
.zk-material textarea:valid ~ label
{
  transform: scale(0.7);
  left:10px;
}


.zk-material > .zk-helper {
    font-size:80%;
    padding-left:8px;
    color: #607D8B;
    }





.zkmaterial-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font: 14px 'Liberation Sans', Arial, Helvetica, sans-serif;
}

.zkmaterial-switch-input {
  position: absolute;
  opacity: 0;
}

.zkmaterial-switch-track {
  width: 52px;
  height: 32px;
  padding: 4px;
  box-sizing: border-box;
  border-radius: 20px;
  background: hsl(270, 4%, 47%);
}

/* Claude: el input esta oculto (opacity:0) asi que su propio outline nativo es invisible — el ring va sobre el track visible, solo con :focus-visible (teclado) */
.zkmaterial-switch-input:focus-visible + .zkmaterial-switch-track {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.zkmaterial-switch-track::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: white;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 0;
  transition: .2s;
}

.zkmaterial-switch-input:checked + .zkmaterial-switch-track {
  background: hsl(256, 34%, 48%);
}

.zkmaterial-switch-input:checked + .zkmaterial-switch-track::before {
  transform: translateX(20px);
  background-size: 14px 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='hsl(256,34%25,48%25)' d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
}
