/*
 * DGM-Inventum contact form (/kontakt) — form EXT:dgm/Configuration/Forms/Inventum/kontakt.form.yaml,
 * templates EXT:dgm/Resources/Private/Frontend/InventumContact. Loaded by the form template only.
 *
 * The generic Inventum form skin (bottom of inventum.css) styles every TYPO3 form with
 * `#content__section.dgm-inventum-subpage form[action*="tx_form_formframework"] …` + !important.
 * Rules below that must win repeat a class (`.inv-cf-form.inv-cf-form`) to outrank it.
 * Tokens are local: `.dgm-inventum` would add overflow:clip and cut off the picture tooltips.
 */
.inv-cf {
  --cf-black: #161513;
  --cf-ink: #474645;
  --cf-muted: #84817d;
  --cf-line: #eae6df;
  --cf-field: #ded8ce;
  --cf-canvas: #fbfaf9;
  --cf-primary: #00abe3;
  --cf-primary-ink: #08739c;
  --cf-tint: #e7f4f9;
  --cf-danger: #d4462f;
  --cf-display: "Heading-Font", "Inter Tight", "Theme-Font", Inter, system-ui, sans-serif;
  --cf-text: "Theme-Font", Inter, system-ui, sans-serif;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  align-items: start;
  max-width: 1248px;
  margin: 0 auto;
  padding: 8px 24px 88px;
  color: var(--cf-ink);
  font-family: var(--cf-text);
  letter-spacing: -0.011em;
}
/* the content element frame around the plugin stays out of the way */
#content__section .frame:has(.inv-cf),
#content__section .frame:has(.inv-cf-done) { background: transparent !important; box-shadow: none !important; border: 0 !important; padding: 0 !important; max-width: none !important; }

#content__section .inv-cf form.inv-cf-form.inv-cf-form { max-width: none !important; margin: 0 !important; }

/* ---------- intro ---------- */
.inv-cf-intro { margin: 0 0 22px; }
.inv-cf .inv-cf-title { margin: 0; font: 700 clamp(1.6rem, 2.4vw, 2.05rem)/1.15 var(--cf-display); color: var(--cf-black); letter-spacing: -0.02em; }
.inv-cf .inv-cf-lead { margin: 10px 0 0; max-width: 60ch; font-size: 1.02rem; line-height: 1.6; color: var(--cf-ink); }

/* ---------- steps ---------- */
.inv-cf-steps { display: grid; gap: 18px; }
.inv-cf-step {
  padding: 26px 28px 28px;
  border-radius: 22px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--cf-line), 0 22px 44px -36px rgba(22, 21, 19, .35);
}
.inv-cf-step-head { display: flex; align-items: flex-start; gap: 14px; margin: 0 0 20px; }
.inv-cf-step-num {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 999px;
  background: var(--cf-tint); color: var(--cf-primary-ink);
  font: 700 .95rem/1 var(--cf-display);
}
.inv-cf .inv-cf-step-title { margin: 3px 0 0; font: 700 1.18rem/1.25 var(--cf-display); color: var(--cf-black); }
.inv-cf .inv-cf-step-note { margin: 3px 0 0; font-size: .9rem; line-height: 1.45; color: var(--cf-muted); }
.inv-cf-step-body { display: grid; gap: 20px; }
.inv-cf-step-body > * { margin: 0 !important; }

/* grid rows from the form framework (row / col-*) */
#content__section .inv-cf .inv-cf-form .row { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 18px; margin: 0 !important; }
#content__section .inv-cf .inv-cf-form .row > * { width: auto !important; max-width: none !important; flex: none !important; padding: 0 !important; margin: 0 !important; }
#content__section .inv-cf .inv-cf-form .row .mb-3,
#content__section .inv-cf .inv-cf-form .inv-cf-step-body > .mb-3 { margin-bottom: 0 !important; }

/* labels, help and errors */
#content__section .inv-cf .inv-cf-form p.inv-cf-label { margin: 0 0 10px; font: 600 .9rem/1.35 var(--cf-text); color: var(--cf-ink); }
#content__section .inv-cf .inv-cf-form label.form-label { display: block; margin: 0 0 6px; }
.inv-cf .required { margin-left: 2px; color: var(--cf-primary-ink); }
.inv-cf .form-text { display: block; margin-top: 6px; font-size: .8rem; color: var(--cf-muted); }
.inv-cf .invalid-feedback { display: block; margin-top: 8px; font-size: .82rem; font-weight: 600; color: var(--cf-danger); }
.inv-cf .inv-cf-sr { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }
#content__section .inv-cf .inv-cf-form .form-control::placeholder { color: #a8a39b; opacity: 1; }

/* ---------- answer chips ---------- */
/* card: icon chips with longer labels (two per row on desktop); tile: short choices with icons, one row of four */
.inv-cf-chips--card { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.inv-cf-chips--tile { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.inv-cf-chips--compact { display: flex; flex-wrap: wrap; gap: 8px; }

#content__section .inv-cf .inv-cf-form label.inv-cf-chip {
  position: relative; display: block; margin: 0; cursor: pointer;
  font: 600 .92rem/1.25 var(--cf-text) !important; color: var(--cf-black) !important;
}
#content__section .inv-cf .inv-cf-form input.inv-cf-chip-input.inv-cf-chip-input {
  position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important;
  margin: 0 !important; opacity: 0 !important; cursor: pointer; appearance: none;
}
.inv-cf-chip-box {
  display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 10px 12px 10px 10px;
  border-radius: 14px; background: var(--cf-canvas);
  box-shadow: inset 0 0 0 1px var(--cf-field);
  transition: box-shadow .16s ease, background-color .16s ease, transform .16s ease;
}
.inv-cf-chip-icon {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px;
  background: #fff; color: var(--cf-primary-ink); font-size: 15px;
  box-shadow: inset 0 0 0 1px var(--cf-line);
  transition: background-color .16s ease, color .16s ease;
}
.inv-cf-chip-text { flex: 1 1 auto; min-width: 0; }
.inv-cf-chip-check {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--cf-field); color: transparent; font-size: 11px;
  transition: background-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.inv-cf-chip:hover .inv-cf-chip-box { box-shadow: inset 0 0 0 1px var(--cf-primary); transform: translateY(-1px); }
.inv-cf-chip-input:checked + .inv-cf-chip-box { background: var(--cf-tint); box-shadow: inset 0 0 0 1.5px var(--cf-primary); }
.inv-cf-chip-input:checked + .inv-cf-chip-box .inv-cf-chip-icon { background: var(--cf-primary); color: #fff; box-shadow: none; }
.inv-cf-chip-input:checked + .inv-cf-chip-box .inv-cf-chip-check { background: var(--cf-primary); color: #fff; box-shadow: none; }
.inv-cf-chip-input:focus-visible + .inv-cf-chip-box { outline: 3px solid rgba(0, 171, 227, .4); outline-offset: 2px; }
.inv-cf-field.is-invalid .inv-cf-chip-box { box-shadow: inset 0 0 0 1px var(--cf-danger); }

/* compact pills (short answers like participant numbers) */
.inv-cf-chips--compact .inv-cf-chip-box { min-height: 42px; padding: 8px 16px; border-radius: 999px; gap: 8px; }
.inv-cf-chips--compact .inv-cf-chip-check { width: 0; height: 18px; margin-left: -8px; overflow: hidden; box-shadow: none; transition: width .16s ease, margin .16s ease, background-color .16s ease; }
.inv-cf-chips--compact .inv-cf-chip-input:checked + .inv-cf-chip-box .inv-cf-chip-check { width: 18px; margin-left: 0; order: -1; }

/* picture tooltips (mouse and keyboard; touch devices skip them) */
.inv-cf-tip {
  position: absolute; z-index: 40; left: 50%; bottom: calc(100% + 12px);
  width: 264px; padding: 8px; border-radius: 16px;
  background: var(--cf-black); color: #fff;
  box-shadow: 0 24px 50px -18px rgba(22, 21, 19, .55);
  opacity: 0; pointer-events: none;
  transform: translate(-50%, 6px);
  transition: opacity .18s ease, transform .18s ease;
}
.inv-cf-tip::after {
  content: ""; position: absolute; left: 50%; top: 100%; width: 12px; height: 12px;
  background: var(--cf-black); transform: translate(-50%, -6px) rotate(45deg); border-radius: 0 0 3px 0;
}
.inv-cf .inv-cf-tip-img { display: block; width: 100%; height: auto; aspect-ratio: 360 / 200; object-fit: cover; border-radius: 10px; }
.inv-cf-tip-text { display: block; padding: 8px 6px 4px; font: 500 .8rem/1.45 var(--cf-text); letter-spacing: 0; color: rgba(255, 255, 255, .92); }
@media (hover: hover) {
  .inv-cf-chip.has-tip:hover .inv-cf-tip { opacity: 1; transform: translate(-50%, 0); transition-delay: .2s; }
}
.inv-cf-chip.has-tip:has(.inv-cf-chip-input:focus-visible) .inv-cf-tip { opacity: 1; transform: translate(-50%, 0); }
@media (hover: none) { .inv-cf-tip { display: none; } }

/* ---------- message samples ---------- */
.inv-cf-samples { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 12px; }
#content__section .inv-cf .inv-cf-form button.inv-cf-sample {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 34px; padding: 6px 13px; border: 0; border-radius: 999px;
  background: #fff; color: var(--cf-primary-ink); cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--cf-field);
  font: 600 .82rem/1.2 var(--cf-text);
  transition: background-color .16s ease, box-shadow .16s ease;
}
#content__section .inv-cf .inv-cf-form button.inv-cf-sample i { font-size: 11px; opacity: .8; }
#content__section .inv-cf .inv-cf-form button.inv-cf-sample:hover { background: var(--cf-tint); box-shadow: inset 0 0 0 1px var(--cf-primary); }
#content__section .inv-cf .inv-cf-form button.inv-cf-sample.is-used { background: var(--cf-tint); }
#content__section .inv-cf .inv-cf-form button.inv-cf-sample:focus-visible { outline: 3px solid rgba(0, 171, 227, .4); outline-offset: 2px; }

/* ---------- privacy checkbox ---------- */
#content__section .inv-cf .inv-cf-form .form-check { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 0; }
#content__section .inv-cf .inv-cf-form .form-check label { font-weight: 500 !important; line-height: 1.5; }
#content__section .inv-cf .inv-cf-form .form-check input[type="checkbox"] { flex: none; margin: 3px 0 0 !important; }
.inv-cf .form-check a { color: var(--cf-primary-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- actions ---------- */
.inv-cf-actions { margin-top: 22px; }
.inv-cf-nav { display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; }
.inv-cf .inv-cf-nav-note { margin: 0; font-size: .85rem; color: var(--cf-muted); }
#content__section .inv-cf .inv-cf-form .btn.inv-cf-submit { min-height: 3.2rem !important; padding: .8rem 1.9rem !important; font-size: 1rem !important; gap: .65rem !important; box-shadow: 0 16px 30px -18px rgba(0, 137, 189, .9) !important; }

/* ---------- aside ---------- */
.inv-cf-aside { position: sticky; top: 110px; display: grid; gap: 14px; }
.inv-cf-card { padding: 22px; border-radius: 22px; background: #fff; box-shadow: inset 0 0 0 1px var(--cf-line); }
.inv-cf-card--direct { background: linear-gradient(160deg, #eef8fc 0%, #fff 70%); box-shadow: inset 0 0 0 1px #d7ebf3; }
.inv-cf-card--plain { background: transparent; box-shadow: inset 0 0 0 1px var(--cf-line); }
.inv-cf-faces { display: flex; margin: 0 0 14px; }
.inv-cf .inv-cf-face { width: 46px; height: 46px; border-radius: 999px; object-fit: cover; box-shadow: 0 0 0 3px #fff; }
.inv-cf .inv-cf-face + .inv-cf-face { margin-left: -10px; }
.inv-cf .inv-cf-card-title { margin: 0; font: 700 1.05rem/1.3 var(--cf-display); color: var(--cf-black); }
.inv-cf .inv-cf-card-text { margin: 6px 0 0; font-size: .92rem; line-height: 1.55; }
.inv-cf-direct { display: grid; gap: 8px; margin-top: 14px; }
.inv-cf a.inv-cf-direct-link {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px;
  border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--cf-line);
  color: var(--cf-black); font-weight: 600; font-size: .92rem; text-decoration: none;
  transition: box-shadow .16s ease, color .16s ease;
}
.inv-cf a.inv-cf-direct-link i { color: var(--cf-primary-ink); font-size: 13px; }
.inv-cf a.inv-cf-direct-link:hover { color: var(--cf-primary-ink); box-shadow: inset 0 0 0 1px var(--cf-primary); }
.inv-cf-next { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; counter-reset: cfnext; }
.inv-cf-next li { position: relative; padding-left: 36px; font-size: .92rem; line-height: 1.5; counter-increment: cfnext; }
.inv-cf-next li::before {
  content: counter(cfnext); position: absolute; left: 0; top: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 999px;
  background: var(--cf-tint); color: var(--cf-primary-ink); font: 700 .78rem/1 var(--cf-display);
}
.inv-cf a.inv-cf-detail-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--cf-primary-ink); font-weight: 650; text-decoration: none; }
.inv-cf a.inv-cf-detail-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- confirmation ---------- */
.inv-cf-done {
  max-width: 640px; margin: 24px auto 88px; padding: 40px 32px; text-align: center;
  border-radius: 24px; background: #fff; box-shadow: inset 0 0 0 1px #eae6df, 0 22px 44px -36px rgba(22, 21, 19, .35);
  color: #474645; font-family: "Theme-Font", Inter, system-ui, sans-serif;
}
.inv-cf-done-icon { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; margin-bottom: 16px; border-radius: 999px; background: #00abe3; color: #fff; font-size: 22px; }
.inv-cf-done .inv-cf-title { margin: 0; font: 700 1.6rem/1.2 "Heading-Font", "Inter Tight", "Theme-Font", Inter, sans-serif; color: #161513; }
.inv-cf-done .inv-cf-lead { margin: 10px auto 0; max-width: 46ch; font-size: 1.02rem; line-height: 1.6; }
.inv-cf-done .inv-cf-lead p { margin: 0; }
.inv-cf-done-direct { margin: 18px 0 0; font-size: .92rem; color: #84817d; }
.inv-cf-done-direct a { color: #08739c; font-weight: 600; text-decoration: none; }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .inv-cf { grid-template-columns: 1fr; gap: 24px; }
  .inv-cf-aside { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width: 640px) {
  .inv-cf { padding: 4px 20px 64px; }
  .inv-cf-step { padding: 20px 16px 22px; border-radius: 18px; }
  .inv-cf-step-head { gap: 12px; margin-bottom: 16px; }
  .inv-cf-chips--card, .inv-cf-chips--tile { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .inv-cf-chips--card .inv-cf-chip-box, .inv-cf-chips--tile .inv-cf-chip-box { flex-direction: column; align-items: flex-start; gap: 8px; min-height: 96px; padding: 12px; }
  .inv-cf-chips--tile .inv-cf-chip-box { min-height: 84px; }
  .inv-cf-chips--card .inv-cf-chip-check, .inv-cf-chips--tile .inv-cf-chip-check { position: absolute; top: 10px; right: 10px; }
  .inv-cf-chips--card .inv-cf-chip-text, .inv-cf-chips--tile .inv-cf-chip-text { padding-right: 18px; font-size: .86rem; overflow-wrap: anywhere; hyphens: auto; }
  .inv-cf-chips--compact .inv-cf-chip-box { min-height: 40px; padding: 7px 14px; }
  .inv-cf-nav { flex-direction: column-reverse; align-items: stretch; }
  #content__section .inv-cf .inv-cf-form .btn.inv-cf-submit { width: 100%; justify-content: center !important; }
}
@media (prefers-reduced-motion: reduce) {
  .inv-cf-chip-box, .inv-cf-tip, .inv-cf-chip-check, .inv-cf-sample { transition: none !important; }
  .inv-cf-chip:hover .inv-cf-chip-box { transform: none; }
}
