/* =========================
   GLOBAL FORM SYSTEM
========================= */

.tm-form,
.tm-check-form {
  display: flex;
  flex-direction: column;
  gap: var(--tm-space-4);
}

.tm-form-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 32px;
  margin: 0 0 10px;
  padding: 0 14px;
  border-radius: var(--tm-radius-pill);
  background: rgba(37, 99, 235, 0.08);
  color: var(--tm-color-primary);
  font-size: var(--tm-font-size-xs);
  font-weight: var(--tm-weight-bold);
  letter-spacing: .14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.tm-form-group {
  display: grid;
  gap: .55rem;
}

.tm-form-group label,
.tm-form-label:not(.tm-eyebrow) {
  color: var(--tm-color-text);
  font-size: var(--tm-font-size-sm);
  font-weight: var(--tm-weight-semibold);
  line-height: 1.35;
}

.tm-form input:not([type="checkbox"]):not([type="radio"]),
.tm-form select,
.tm-form textarea,
.tm-check-form input:not([type="checkbox"]):not([type="radio"]),
.tm-check-form select,
.tm-check-form textarea {
  width: 100%;
  min-height: 54px;
  padding: .85rem 1rem;
  border: 1px solid var(--tm-color-border-strong);
  border-radius: var(--tm-radius-sm);
  background: var(--tm-color-white);
  color: var(--tm-color-text);
  font: inherit;
  box-shadow: var(--tm-shadow-xs);
  transition:
    border-color var(--tm-transition-fast),
    box-shadow var(--tm-transition-fast),
    background-color var(--tm-transition-fast);
}

.tm-form textarea,
.tm-check-form textarea {
  min-height: 150px;
  line-height: 1.6;
  resize: vertical;
}

.tm-form input::placeholder,
.tm-form textarea::placeholder,
.tm-check-form input::placeholder,
.tm-check-form textarea::placeholder {
  color: #94a3b8;
}

.tm-form input:focus,
.tm-form select:focus,
.tm-form textarea:focus,
.tm-check-form input:focus,
.tm-check-form select:focus,
.tm-check-form textarea:focus {
  outline: none;
  border-color: var(--tm-color-primary);
  background: var(--tm-color-white);
  box-shadow: var(--tm-focus-ring);
}

.tm-website-check-field .tm-btn,
.tm-check-form button {
  width: 100%;
}

/* CHECK LIST */

.tm-check-list {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.tm-check-list li {
  position: relative;
  padding-left: 30px;
  color: #0f172a;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.45;
}

.tm-check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: #2563eb;
  font-weight: 900;
}

/* SMALL TEXT */

.tm-check-form small,
.tm-form small,
.tm-website-check-card small,
.tm-start-form-card small {
  display: block;
  margin-top: 14px;
  color: #64748b;
  font-size: 0.82rem;
  line-height: 1.6;
}

/* MOBILE */

@media (max-width: 760px) {

  .tm-website-check-card,
  .tm-start-form-card,
  .tm-check-hero-form-card,
  .tm-report-form-card {
    padding: 24px;
    border-radius: 24px;
  }

  .tm-form input:not([type="checkbox"]):not([type="radio"]),
  .tm-form select,
  .tm-check-form input:not([type="checkbox"]):not([type="radio"]),
  .tm-check-form select {
    min-height: 56px;
  }

  .tm-form textarea,
  .tm-check-form textarea {
    min-height: 140px;
  }
}

.tm-form-card {
  max-width: 560px;
  margin-top: 34px;
}

.tm-form-card form {
  display: grid;
  gap: 16px;
}

.tm-form-card input {
  min-height: 56px;
  padding: 0 20px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: #ffffff;
}

.tm-form-card button {
  width: 100%;
}

/* =========================
   FORM LAYOUTS
========================= */

.tm-form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tm-check-inline .tm-btn {
  min-width: 220px;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 760px) {

  .tm-form-grid-2,
  .tm-form-grid-3,
  .tm-check-inline {
    grid-template-columns: 1fr;
  }

  .tm-check-inline .tm-btn {
    width: 100%;
    min-width: 0;
  }

}

/* =========================
   FORM STATES
========================= */

.tm-form-state {
  padding: 18px 20px;
  border-radius: 18px;

  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.6;
}

.tm-success {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.tm-error {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.tm-loading {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

/* =========================
   FORM CONTROLS AND EXAMPLES
========================= */

.tm-form-demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.tm-form .tm-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tm-form button,
.tm-check-form button {
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.22);
}

.tm-form button:hover,
.tm-check-form button:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.28);
}

/* Checkbox */

.tm-checkbox {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 14px;
  align-items: start;

  padding: 18px;

  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 18px;

  background: #f8fafc;

  color: #475569;
  font-size: 0.94rem;
  line-height: 1.5;
}

.tm-checkbox input {
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 0;

  accent-color: #2563eb;
}

/* Demo Card */

.tm-form-demo-grid .tm-card {
  height: 100%;
}

@media (max-width: 760px) {
  .tm-form-demo-grid,
  .tm-form .tm-form-grid {
    grid-template-columns: 1fr;
  }
}

.tm-form-wide-card {
  grid-column: 1 / -1;
}

.tm-form-wide-card .tm-form {
  gap: 22px;
}

/* =========================
   WEBSITE CHECK FORM MODULE
========================= */

.tm-wc-start-card .tm-form-label {
  margin: 0;
  color: #2563eb;
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.tm-wc-start-card .tm-check-form,
.tm-wc-request-box .tm-check-form {
  display: grid;
  gap: 18px;
}

.tm-wc-start-card .tm-check-form input,
.tm-wc-start-card .tm-check-form button,
.tm-wc-request-box .tm-check-form input,
.tm-wc-request-box .tm-check-form button {
  width: 100%;
  box-sizing: border-box;
}

/* =========================================================
   PRODUCTION FORM SYSTEM
   Shared by contact and Website-Bericht landing forms.
========================================================= */

.tm-form-shell {
  position: relative;
  border: 1px solid rgba(148, 163, 184, .24);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 28px 80px rgba(15, 23, 42, .085);
}

.tm-form-shell-wide {
  width: min(100%, 1040px);
  margin-inline: auto;
  padding: clamp(30px, 3.4vw, 46px);
  border-radius: 34px;
}

.tm-form-shell-compact {
  padding: clamp(24px, 3.5vw, 36px);
  border-color: rgba(37, 99, 235, .14);
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .1);
}

.tm-form-system {
  display: grid;
  width: 100%;
}

.tm-form-system-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 26px;
}

.tm-form-system-stack {
  grid-template-columns: 1fr;
  gap: 16px;
}

.tm-form-system-grid > .tm-form-submit,
.tm-form-system-grid > .tm-form-privacy,
.tm-form-system-grid > .tm-form-message {
  grid-column: 1 / -1;
}

.tm-form-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.tm-form-field > span {
  display: block;
  color: #0f172a;
  font-size: .92rem;
  font-weight: 840;
  line-height: 1.3;
}

.tm-form-field > span strong {
  color: #2563eb;
  font-weight: 900;
}

.tm-form-field > span em,
.tm-form-field em {
  color: #64748b;
  font-style: normal;
  font-weight: 700;
}

.tm-form-system input[type="text"],
.tm-form-system input[type="email"],
.tm-form-system input[type="tel"],
.tm-form-system input[type="url"],
.tm-form-system input[type="search"],
.tm-form-system select,
.tm-form-system textarea {
  width: 100%;
  border: 1px solid rgba(203, 213, 225, .86);
  border-radius: 16px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .025);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.tm-form-system input[type="text"],
.tm-form-system input[type="email"],
.tm-form-system input[type="tel"],
.tm-form-system input[type="url"],
.tm-form-system input[type="search"],
.tm-form-system select {
  min-height: 58px;
  padding: 0 18px;
}

.tm-form-system textarea {
  min-height: 142px;
  padding: 17px 18px;
  line-height: 1.6;
  resize: vertical;
}

.tm-form-system input::placeholder,
.tm-form-system textarea::placeholder {
  color: #94a3b8;
}

.tm-form-system input[type="text"]:focus,
.tm-form-system input[type="email"]:focus,
.tm-form-system input[type="tel"]:focus,
.tm-form-system input[type="url"]:focus,
.tm-form-system input[type="search"]:focus,
.tm-form-system select:focus,
.tm-form-system textarea:focus {
  outline: none;
  border-color: rgba(37, 99, 235, .68);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .11);
}

.tm-form-submit {
  width: 100%;
  min-height: 58px;
  justify-content: center;
  margin-top: 4px;
}

.tm-form-submit > span {
  margin-left: 10px;
}

.tm-form-privacy {
  max-width: 760px;
  margin: 0 auto;
  color: #64748b;
  font-size: .82rem;
  line-height: 1.55;
}

.tm-form-privacy a {
  color: #2563eb;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tm-form-privacy a:focus-visible,
.tm-form-submit:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .28);
  outline-offset: 4px;
}

.tm-form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.tm-form-message {
  margin-bottom: 20px;
  padding: 18px 20px;
  border-radius: 18px;
  font-size: .95rem;
  line-height: 1.5;
}

.tm-form-message p {
  margin: 0;
}

.tm-form-message p + p {
  margin-top: 6px;
}

.tm-form-message-error {
  border: 1px solid rgba(220, 38, 38, .22);
  background: rgba(254, 242, 242, .94);
  color: #991b1b;
}

@media (max-width: 980px) {
  .tm-form-system-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .tm-form-shell-wide {
    padding: 14px;
    border-radius: 22px;
  }

  .tm-form-system-grid {
    gap: 11px;
  }

  .tm-form-field > span {
    font-size: .84rem;
  }

  .tm-form-system input[type="text"],
  .tm-form-system input[type="email"],
  .tm-form-system input[type="tel"],
  .tm-form-system input[type="url"],
  .tm-form-system input[type="search"],
  .tm-form-system select {
    min-height: 52px;
    font-size: 16px;
  }

  .tm-form-system textarea {
    min-height: 118px;
    font-size: 16px;
  }

  .tm-form-submit {
    min-height: 54px;
    border-radius: 999px;
  }

  .tm-form-privacy {
    font-size: .76rem;
  }
}

@media (max-width: 640px) {
  .tm-form-shell-compact {
    padding: 22px;
    border-radius: 20px;
  }
}
