/*
 * Form Components
 * Tekvera Initiative Theme
 */

/* ── Base inputs ─────────────────────────────────────────────────────────── */
.tv-input,
.tv-select,
.tv-textarea {
  width: 100%;
  padding: 0.78rem 1.2rem;
  font-family: var(--tv-font-sans);
  font-size: var(--tv-text-base);
  color: var(--tv-text-primary);
  background-color: var(--tv-white);
  border: 1.5px solid var(--tv-border-dark);
  border-radius: var(--tv-radius-full);
  outline: none;
  transition:
    border-color var(--tv-duration-fast) var(--tv-ease-default),
    box-shadow var(--tv-duration-fast) var(--tv-ease-default);
  appearance: none;
  -webkit-appearance: none;
}

.tv-input::placeholder,
.tv-textarea::placeholder {
  color: var(--tv-text-muted);
}

.tv-input:hover,
.tv-select:hover,
.tv-textarea:hover {
  border-color: var(--tv-border-deep);
}

.tv-input:focus,
.tv-select:focus,
.tv-textarea:focus {
  border-color: var(--tv-green-600);
  box-shadow: 0 0 0 3px rgba(30, 114, 84, 0.12);
}

/* Textarea — no pill radius */
.tv-textarea {
  border-radius: var(--tv-radius-md);
  resize: vertical;
  min-height: 120px;
  line-height: var(--tv-leading-relaxed);
}

/* ── Newsletter inline form ───────────────────────────────────────────────── */
.tv-nl-form {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.tv-nl-form .tv-input {
  flex: 1;
  min-width: 0;
}

@media (max-width: 600px) {
  .tv-nl-form {
    flex-direction: column;
    width: 100%;
  }
  .tv-nl-form .tv-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Contact form ────────────────────────────────────────────────────────── */
.tv-contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.tv-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tv-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.tv-form-label {
  font-size: var(--tv-text-sm);
  font-weight: 600;
  color: var(--tv-text-secondary);
}

.tv-form-note {
  font-size: var(--tv-text-xs);
  color: var(--tv-text-tertiary);
  margin-top: 0.4rem;
}

@media (max-width: 600px) {
  .tv-form-row {
    grid-template-columns: 1fr;
  }
}

/* ── Success / error states ──────────────────────────────────────────────── */
.tv-form-success {
  background: var(--tv-green-50);
  border: 1px solid var(--tv-green-200);
  border-radius: var(--tv-radius-md);
  padding: 1rem 1.25rem;
  color: var(--tv-green-700);
  font-size: var(--tv-text-sm);
  display: none;
}

.tv-form-success.is-visible {
  display: block;
}

.tv-form-error {
  color: #c0392b;
  font-size: var(--tv-text-xs);
  margin-top: 0.3rem;
}
