/* Input com label flutuante — animação original, altura compacta, sem retângulo */

.input-container {
  --input-surface: #1a1f36;
  --input-border: rgba(255, 255, 255, 0.14);
  --input-border-focus: #22a832;
  --input-text: #fff;
  --input-label: rgba(255, 255, 255, 0.48);
  --input-label-active: rgba(255, 255, 255, 0.92);
  --input-ring: rgba(34, 168, 50, 0.18);

  position: relative;
  width: 100%;
  min-width: 0;
}

.input-container--light {
  --input-surface: #fff;
  --input-border: #e2e8f0;
  --input-border-focus: #22a832;
  --input-text: #1a1f36;
  --input-label: #8b92a6;
  --input-label-active: #22a832;
  --input-ring: rgba(34, 168, 50, 0.12);
}

.input-container--light.input-container--muted {
  --input-surface: #f8fafc;
  --input-text: #8b92a6;
  --input-label: #8b92a6;
  --input-label-active: #8b92a6;
  --input-border: #e8ecf1;
}

.input-container .styled_input_bar {
  display: block;
  width: 100%;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
  line-height: 44px;
  border: 1px solid var(--input-border);
  border-radius: 12px;
  background: transparent;
  color: var(--input-text);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-container .styled_input_bar::placeholder {
  color: transparent;
}

.input-container .styled_input_bar:focus {
  border-color: var(--input-border-focus);
  box-shadow: 0 0 0 3px var(--input-ring);
}

.input-container .input-label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  color: var(--input-label);
  pointer-events: none;
  white-space: nowrap;
  max-width: calc(100% - 28px);
  overflow: hidden;
  text-overflow: ellipsis;
  transition:
    top 0.3s ease,
    transform 0.3s ease,
    font-size 0.3s ease,
    color 0.3s ease,
    padding 0.3s ease,
    background-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* Animação de antes: sobe e “corta” a borda sem mancha (mesmo tom do card) */
.input-container .styled_input_bar:focus + .input-label,
.input-container .styled_input_bar:not(:placeholder-shown) + .input-label {
  top: 0;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 600;
  color: var(--input-label-active);
  padding: 0 6px;
  max-width: calc(100% - 40px);
  background-color: var(--input-surface);
  box-shadow: -2px 0 0 var(--input-surface), 2px 0 0 var(--input-surface);
}

.input-container .styled_input_bar:focus + .input-label {
  color: var(--input-label-active);
}

.input-container .styled_input_bar:not(:focus):not(:placeholder-shown) + .input-label {
  color: var(--input-label);
}

.input-container--password .styled_input_bar {
  padding-right: 48px;
}

.input-container--password .input-label {
  max-width: calc(100% - 56px);
}

.input-container--password .styled_input_bar:focus + .input-label,
.input-container--password .styled_input_bar:not(:placeholder-shown) + .input-label {
  max-width: calc(100% - 64px);
}

.input-container--password .password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}

.input-container--password .password-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.input-container--light.input-container--password .password-toggle:hover {
  background: rgba(26, 31, 54, 0.06);
}

.input-container--password .password-toggle img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.75;
}

.input-container--light.input-container--password .password-toggle img {
  filter: none;
  opacity: 0.7;
}

.input-container--password .password-toggle:hover img {
  opacity: 1;
}

.input-container--password .styled_input_bar[type='password'] {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: 0;
}

.input-container--password .styled_input_bar[type='text'] {
  font-family: inherit;
  letter-spacing: normal;
}

.input-container select.styled_input_bar {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%238b92a6' d='M13.069 5.157L8.384 9.768a.546.546 0 0 1-.768 0L2.93 5.158a.55.55 0 0 0-.771 0a.53.53 0 0 0 0 .759l4.684 4.61a1.65 1.65 0 0 0 2.312 0l4.684-4.61a.53.53 0 0 0 0-.76a.55.55 0 0 0-.771 0'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
}

.input-container:has(select.styled_input_bar:focus) .input-label,
.input-container:has(select.styled_input_bar:valid) .input-label {
  top: 0;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 600;
  color: var(--input-label-active);
  padding: 0 6px;
  background-color: var(--input-surface);
  box-shadow: -2px 0 0 var(--input-surface), 2px 0 0 var(--input-surface);
}
