/*
 * tg-forms.css — scoped enhancements for the rebuilt application/contact forms.
 * Deliberately limited to the new form scope (.tg-form). Does NOT restyle the
 * rest of the site. Works alongside the original Powermail class names that the
 * existing css_custom.css already targets.
 */
.tg-form { max-width: 640px; }
.tg-form .tg-field { margin: 0 0 1.25rem; }
.tg-form label.tg-label {
  display: block;
  font-weight: 600;
  margin: 0 0 .35rem;
  line-height: 1.3;
}
.tg-form .tg-req { color: #c0392b; margin-left: .15rem; }
.tg-form .tg-hint { display: block; font-weight: 400; font-size: .85em; opacity: .8; }

.tg-form input[type="text"],
.tg-form input[type="email"],
.tg-form input[type="tel"],
.tg-form input[type="date"],
.tg-form select,
.tg-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: .7rem .8rem;
  border: 1px solid #b9c0c4;
  border-radius: 6px;
  font: inherit;
  background: #fff;
  color: inherit;
}
.tg-form textarea { min-height: 7rem; resize: vertical; }

.tg-form input:focus,
.tg-form select:focus,
.tg-form textarea:focus {
  outline: 3px solid rgba(0, 0, 0, .12);
  outline-offset: 1px;
  border-color: #6b7a81;
}

/* file input */
.tg-form input[type="file"] { font: inherit; }
.tg-form .tg-file-note { font-size: .85em; opacity: .8; margin-top: .3rem; }

/* consent row */
.tg-form .tg-consent { display: flex; align-items: flex-start; gap: .6rem; }
.tg-form .tg-consent input[type="checkbox"] { margin-top: .25rem; flex: 0 0 auto; }
.tg-form .tg-consent label { font-weight: 400; }

/* validation states */
.tg-form .tg-field.tg-invalid input,
.tg-form .tg-field.tg-invalid select,
.tg-form .tg-field.tg-invalid textarea { border-color: #c0392b; }
.tg-form .tg-error {
  display: none;
  color: #c0392b;
  font-size: .85em;
  margin-top: .35rem;
}
.tg-form .tg-field.tg-invalid .tg-error { display: block; }

/* disabled appointment select (Berlin, no data available) */
.tg-form select:disabled { background: #eef1f2; color: #777; cursor: not-allowed; }

/* submit */
.tg-form .tg-submit {
  appearance: none;
  border: 0;
  border-radius: 6px;
  padding: .85rem 1.6rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  background: #1a1a1a;
  color: #fff;
}
.tg-form .tg-submit:hover { background: #333; }
.tg-form .tg-submit:disabled { opacity: .6; cursor: progress; }

/* result banners */
.tg-form-result { margin: 0 0 1.25rem; padding: 1rem 1.1rem; border-radius: 6px; font-weight: 500; }
.tg-form-result[hidden] { display: none; }
.tg-form-result.tg-ok   { background: #e7f6ec; border: 1px solid #45a163; color: #1d6b38; }
.tg-form-result.tg-fail { background: #fdecea; border: 1px solid #e0796f; color: #a5281b; }

@media (max-width: 480px) {
  .tg-form .tg-submit { width: 100%; }
}
