.tf {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tf__field {
  position: relative;
  height: 56px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--tf-background-default);
  border: 1px solid var(--tf-border-placeholder);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px; /* 🔑 acerca label y texto */
}

.tf__label {
  line-height: 1;
  pointer-events: none;
  text-align: left;
  font-family: var(--label-font-family);
  font-size: var(--label-font-size);
  font-weight: var(--label-font-weight);
  color: var(--tf-label-placeholder);
}

.tf input,
.tf textarea {
  border: none;
  outline: none;
  background: transparent;
  line-height: 1.4;
  padding: 0;
  color: var(--tf-input-default);
  font-family: var(--tfield-font-family);
  font-size: var(--tfield-font-size);
  font-weight: var(--tfield-font-weight);
  resize: none;
}


.tf select {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--tfield-font-family);
  font-size: var(--tfield-font-size);
  font-weight: var(--tfield-font-weight);

}

.tf select {
  color: var(--tf-text-placeholder);
}

/* cuando ya hay selección real */
.tf--typed select,
.tf--validated select {
  color: var(--tf-input-default);
}


.tf__icon {
  position: absolute;
  right: 16px; /* mismo padding md1 */
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: none; /* 🔑 oculto por defecto */
}

.tf__icon svg {
  width: 100%;
  height: 100%;
}

.tf--textarea .tf__icon {
  top: 12px;
  transform: none;
}


.tf input::placeholder {
  color: var(--tf-text-placeholder);
}


/* =========================
   TEXTAREA VARIANT
========================= */

.tf--textarea .tf__field {
  height: auto;
  min-height: 120px;
  justify-content: flex-start;
  padding: 12px 16px;
}

.tf--textarea textarea {
  min-height: 96px;
  padding: 8px 32px 8px 0; /* espacio para icono */
  resize: vertical;
}


/* INPUT PLACEHOLDER */
.tf--placeholder .tf__field{
  border: 1px solid var(--tf-border-placeholder);
}
.tf--placeholder .tf__label{
  color: var(--tf-label-placeholder);
}
.tf--placeholder .tf__support-text{
  color: var(--tf-support-default);
}

/* INPUT FOCUS */
.tf--focus .tf__field{
  border: 1px solid var(--tf-border-focus);
}
.tf--focus .tf__label{
  color: var(--tf-label-focus);
}
.tf--focus .tf__support-text{
  color: var(--tf-support-default);
}

/* INPUT TYPED */
.tf--typed .tf__field{
  border: 1px solid var(--tf-border-typed);
}
.tf--typed .tf__label{
  color: var(--tf-label-typed);
}
.tf--typed .tf__support-text{
  color: var(--tf-support-default);
}

/* INPUT VALIDATED */
.tf--validated .tf__field{
  border: 1px solid var(--tf-border-validated);
}
.tf--validated .tf__label{
  color: var(--tf-label-validated);
}
.tf--validated .tf__support-text{
  color: var(--tf-support-default);
}
.tf--validated .tf__icon--validated {
  display: inline-flex;
  color: var(--tf-icon-validated);

}
.tf--validated input {
  padding-right: 24px; /* 16 icon + 8 gap */
}



/* INPUT DISABLED */
.tf--disabled .tf__field{
  border: 1px solid var(--tf-border-disabled);
  background: var(--tf-background-disabled);
  cursor: not-allowed;
  pointer-events: none;
}
.tf--disabled .tf__label{
  color: var(--tf-label-disabled);
}
.tf--disabled .tf__support-text{
  color: var(--tf-support-default);
}

/* INPUT BLOCKED */
.tf--blocked .tf__field{
  border: 1px solid var(--tf-border-blocked);
  background: var(--tf-background-blocked);
  cursor: not-allowed;
  pointer-events: none;
}
.tf--blocked .tf__label{
  color: var(--tf-label-blocked);
}
.tf--blocked .tf__support-text{
  color: var(--tf-support-default);
}
.tf--blocked .tf__icon--blocked {
  display: inline-flex;
  color: var(--tf-icon-blocked);

}
.tf--blocked input {
  padding-right: 24px; /* 16 icon + 8 gap */
}

/* INPUT ERROR */
.tf--error .tf__field{
  border: 1px solid var(--tf-border-error);
}
.tf--error .tf__label{
  color: var(--tf-label-error);
}
.tf--error .tf__support-text{
  color: var(--tf-support-error);
}


.tf__support {
  padding: 8px 16px; /* sm2 md1 */
  display: flex;
  justify-content: space-between;
  font-family: var(--support-font-family);
  font-size: var(--support-font-size);
  font-weight: var(--support-font-weight);
  color: var(--tf-support-default);
}



