/*
 * DGM Exhibitions inquiry form (dgm.de/exhibitions): form EXT:dgm/Configuration/Forms/Exhibitions/*.form.yaml,
 * template ExhibitionInquiry/Templates/Form.fluid.html + the InventumContact partials (inv-cf-* classes).
 * Loaded by the form template only. Colours follow the page theme (--primary, --primary-50 … from
 * styling_static_2/<page_color>/style.css), so every catalog page gets its own event colour.
 *
 * The global form skin (typo3-form-tailwind4.css) styles `.frame-type-form_formframework form …` with !important;
 * rules that must win here use `.xf form.inv-cf-form …` (higher specificity) plus !important.
 */
.xf-section {
  --xf-primary: var(--primary, #00abe3);
  --xf-primary-ink: var(--primary-700, #08739c);
  --xf-on-primary: var(--primary-foreground, #fff);
  --xf-tint: var(--primary-50, #e7f4f9);
  --xf-tint-line: var(--primary-200, #b9dff0);
  --xf-black: #0f172a;
  --xf-ink: #475569;
  --xf-muted: #64748b;
  --xf-line: #e2e8f0;
  --xf-field: #cbd5e1;
  --xf-canvas: #f8fafc;
  --xf-danger: #dc2626;
  --xf-display: "Heading-Font", "Inter Tight", "Theme-Font", Inter, system-ui, sans-serif;
  --xf-text: "Theme-Font", Inter, system-ui, sans-serif;
  scroll-margin-top: 88px;
  padding: 72px 0 112px;
  background:
    radial-gradient(1100px 420px at 50% 0%, color-mix(in srgb, var(--xf-primary) 7%, transparent), transparent 70%),
    linear-gradient(180deg, #fff 0%, var(--xf-canvas) 100%);
  color: var(--xf-ink);
  font-family: var(--xf-text);
}
.xf-section [hidden] { display: none !important; }

/* the content element frame around the plugin stays out of the way */
.frame-type-form_formframework:has(.xf-section),
.frame:has(> .xf-section),
.frame:has(.xf-done) {
  max-width: none !important; margin: 0 !important; padding: 0 !important;
  border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important;
}
.xf form.inv-cf-form.xf-form { max-width: none !important; margin: 0 !important; padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; }

.xf { max-width: 1200px; margin: 0 auto; padding: 0 24px; letter-spacing: -0.011em; }

/* ---------- section head (same pattern as the catalog sections) ---------- */
.xf-head { max-width: 44rem; margin: 0 auto 44px; text-align: center; }
.xf-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--xf-primary) 30%, transparent);
  background: color-mix(in srgb, var(--xf-primary) 5%, transparent);
  color: var(--xf-primary); font: 700 11px/1.2 var(--xf-text); letter-spacing: .1em; text-transform: uppercase;
}
.xf-section .xf-title { margin: 14px 0 0; font: 700 clamp(1.6rem, 2.8vw, 2.35rem)/1.15 var(--xf-display); letter-spacing: -0.02em; color: var(--xf-black); text-wrap: balance; }
.xf-section .xf-lead { margin: 14px auto 0; max-width: 40rem; font-size: 1.05rem; line-height: 1.65; color: var(--xf-ink); }

.xf-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }

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

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

/* labels, fields, help and errors */
.xf form.inv-cf-form p.inv-cf-label { margin: 0 0 10px !important; font: 600 .9rem/1.35 var(--xf-text) !important; color: var(--xf-black) !important; }
.xf form.inv-cf-form .form-label { display: block !important; margin: 0 0 6px !important; font: 600 .9rem/1.35 var(--xf-text) !important; color: var(--xf-black) !important; }
.xf form.inv-cf-form .form-control {
  min-height: 48px; padding: .72rem .9rem !important; border: 1px solid var(--xf-field) !important; border-radius: 12px !important;
  background: #fff !important; color: var(--xf-black) !important; font: 400 1rem/1.4 var(--xf-text) !important; box-shadow: none !important;
}
.xf form.inv-cf-form textarea.form-control { min-height: 9rem !important; }
.xf form.inv-cf-form .form-control:hover { border-color: color-mix(in srgb, var(--xf-primary) 45%, var(--xf-field)) !important; }
.xf form.inv-cf-form .form-control:focus {
  border-color: var(--xf-primary) !important; outline: none !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--xf-primary) 16%, transparent) !important;
}
.xf form.inv-cf-form .form-control::placeholder { color: #94a3b8 !important; opacity: 1; }
.xf form.inv-cf-form .required { margin-left: 2px; color: var(--xf-primary) !important; }
.xf form.inv-cf-form .form-text { display: block; margin-top: 6px !important; font-size: .8rem !important; color: var(--xf-muted) !important; }
.xf form.inv-cf-form .invalid-feedback,
.xf form.inv-cf-form .inv-cf-field .invalid-feedback { display: block !important; margin-top: 8px !important; font-size: .82rem !important; font-weight: 600 !important; color: var(--xf-danger) !important; }
.xf form.inv-cf-form .form-control.is-invalid { border-color: var(--xf-danger) !important; }
.xf .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; }

/* ---------- answer chips ---------- */
.xf .inv-cf-chips--card { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 228px), 1fr)); gap: 10px; }
.xf .inv-cf-chips--tile { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.xf .inv-cf-chips--compact { display: flex; flex-wrap: wrap; gap: 8px; }

.xf form.inv-cf-form label.inv-cf-chip {
  position: relative; display: block; margin: 0 !important; cursor: pointer;
  font: 600 .92rem/1.25 var(--xf-text) !important; color: var(--xf-black) !important;
}
.xf form.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; z-index: 1;
}
.xf .inv-cf-chip-box {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 12px 10px 10px;
  border-radius: 14px; background: var(--xf-canvas); box-shadow: inset 0 0 0 1px var(--xf-field);
  transition: box-shadow .16s ease, background-color .16s ease, transform .16s ease;
}
.xf .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(--xf-primary); font-size: 15px; box-shadow: inset 0 0 0 1px var(--xf-line);
  transition: background-color .16s ease, color .16s ease;
}
.xf .inv-cf-chip-text { flex: 1 1 auto; min-width: 0; }
.xf .inv-cf-chip-meta { display: block; margin-top: 3px; font: 500 .78rem/1.3 var(--xf-text); color: var(--xf-muted); letter-spacing: 0; }
.xf .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(--xf-field); color: transparent; font-size: 11px;
  transition: background-color .16s ease, color .16s ease, box-shadow .16s ease;
}
.xf .inv-cf-chip:hover .inv-cf-chip-box { box-shadow: inset 0 0 0 1px var(--xf-primary); transform: translateY(-1px); }
.xf .inv-cf-chip-input:checked + .inv-cf-chip-box { background: var(--xf-tint); box-shadow: inset 0 0 0 1.5px var(--xf-primary); }
.xf .inv-cf-chip-input:checked + .inv-cf-chip-box .inv-cf-chip-icon { background: var(--xf-primary); color: var(--xf-on-primary); box-shadow: none; }
.xf .inv-cf-chip-input:checked + .inv-cf-chip-box .inv-cf-chip-check { background: var(--xf-primary); color: var(--xf-on-primary); box-shadow: none; }
.xf .inv-cf-chip-input:checked + .inv-cf-chip-box .inv-cf-chip-meta { color: var(--xf-primary-ink); }
.xf .inv-cf-chip-input:focus-visible + .inv-cf-chip-box { outline: 3px solid color-mix(in srgb, var(--xf-primary) 40%, transparent); outline-offset: 2px; }
.xf .inv-cf-field.is-invalid .inv-cf-chip-box { box-shadow: inset 0 0 0 1px var(--xf-danger); }
.xf .inv-cf-chip-box.is-flash { animation: xf-flash 1.4s ease-out 1; }
@keyframes xf-flash {
  0% { box-shadow: inset 0 0 0 1.5px var(--xf-primary), 0 0 0 0 color-mix(in srgb, var(--xf-primary) 45%, transparent); }
  100% { box-shadow: inset 0 0 0 1.5px var(--xf-primary), 0 0 0 14px transparent; }
}

/* compact pills (budget) */
.xf .inv-cf-chips--compact .inv-cf-chip-box { min-height: 42px; padding: 8px 16px; border-radius: 999px; gap: 8px; }
.xf .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; }
.xf .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) */
.xf .inv-cf-tip {
  position: absolute; z-index: 40; left: 50%; bottom: calc(100% + 12px); width: 264px; padding: 8px; border-radius: 16px;
  background: var(--xf-black); color: #fff; box-shadow: 0 24px 50px -18px rgba(15, 23, 42, .55);
  opacity: 0; pointer-events: none; transform: translate(-50%, 6px); transition: opacity .18s ease, transform .18s ease;
}
.xf .inv-cf-tip::after {
  content: ""; position: absolute; left: 50%; top: 100%; width: 12px; height: 12px;
  background: var(--xf-black); transform: translate(-50%, -6px) rotate(45deg); border-radius: 0 0 3px 0;
}
.xf .inv-cf-tip-img { display: block; width: 100%; height: auto; aspect-ratio: 360 / 200; object-fit: cover; border-radius: 10px; }
.xf .inv-cf-tip-text { display: block; padding: 8px 6px 4px; font: 500 .8rem/1.45 var(--xf-text); letter-spacing: 0; color: rgba(255, 255, 255, .92); }
@media (hover: hover) {
  .xf .inv-cf-chip.has-tip:hover .inv-cf-tip { opacity: 1; transform: translate(-50%, 0); transition-delay: .25s; }
}
.xf .inv-cf-chip.has-tip:has(.inv-cf-chip-input:focus-visible) .inv-cf-tip { opacity: 1; transform: translate(-50%, 0); }
@media (hover: none) { .xf .inv-cf-tip { display: none; } }

/* ---------- message samples ---------- */
.xf .inv-cf-samples { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 12px; }
.xf form.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(--xf-primary-ink); cursor: pointer; box-shadow: inset 0 0 0 1px var(--xf-field);
  font: 600 .82rem/1.2 var(--xf-text); transition: background-color .16s ease, box-shadow .16s ease;
}
.xf form.inv-cf-form button.inv-cf-sample i { font-size: 11px; color: var(--xf-primary); }
.xf form.inv-cf-form button.inv-cf-sample:hover,
.xf form.inv-cf-form button.inv-cf-sample.is-used { background: var(--xf-tint); box-shadow: inset 0 0 0 1px var(--xf-primary); }
.xf form.inv-cf-form button.inv-cf-sample:focus-visible { outline: 3px solid color-mix(in srgb, var(--xf-primary) 40%, transparent); outline-offset: 2px; }

/* ---------- privacy checkbox ---------- */
.xf form.inv-cf-form .form-check { display: flex; align-items: flex-start; gap: 12px; margin: 0 !important; padding: 0 !important; }
.xf form.inv-cf-form .form-check-wrapping-label,
.xf form.inv-cf-form .form-check label { display: flex !important; align-items: flex-start; gap: 12px !important; font: 500 .92rem/1.5 var(--xf-text) !important; color: var(--xf-ink) !important; }
.xf form.inv-cf-form input.form-check-input { flex: none; width: 1.15rem !important; height: 1.15rem !important; margin: 3px 0 0 !important; accent-color: var(--xf-primary) !important; }
.xf form.inv-cf-form .form-check-label { display: block !important; font: 500 .92rem/1.5 var(--xf-text) !important; color: var(--xf-ink) !important; }
.xf form.inv-cf-form .form-check-label a,
.xf form.inv-cf-form .form-check a { color: var(--xf-primary-ink) !important; font-weight: 600; text-decoration: underline !important; text-underline-offset: 2px; }

/* the floating CTA of the catalog page points here: hide it while the form is on screen */
.xf-form-in-view .dgm-floating-cta { opacity: 0 !important; visibility: hidden !important; transition: opacity .2s ease, visibility 0s linear .2s; }

/* ---------- actions ---------- */
.xf .inv-cf-actions { margin-top: 22px; }
.xf .inv-cf-nav { display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; }
.xf .inv-cf-nav-note { margin: 0; font-size: .85rem; color: var(--xf-muted); }
.xf form.inv-cf-form button.inv-cf-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: .65rem; min-height: 3.25rem; padding: .8rem 1.9rem;
  border: 0; border-radius: 12px; background: var(--xf-primary); color: var(--xf-on-primary); cursor: pointer;
  font: 600 1rem/1.2 var(--xf-text); box-shadow: 0 18px 32px -18px color-mix(in srgb, var(--xf-primary) 90%, transparent);
  transition: transform .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.xf form.inv-cf-form button.inv-cf-submit:hover { background: color-mix(in srgb, var(--xf-primary) 86%, #000); transform: translateY(-1px); }
.xf form.inv-cf-form button.inv-cf-submit:focus-visible { outline: 3px solid color-mix(in srgb, var(--xf-primary) 40%, transparent); outline-offset: 3px; }

/* ---------- aside ---------- */
.xf-aside { position: sticky; top: 104px; display: grid; gap: 14px; }
.xf-card { padding: 22px; border-radius: 22px; background: #fff; box-shadow: inset 0 0 0 1px var(--xf-line), 0 24px 48px -40px rgba(15, 23, 42, .35); }
.xf-card--direct {
  background: linear-gradient(160deg, color-mix(in srgb, var(--xf-primary) 9%, #fff) 0%, #fff 72%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--xf-primary) 18%, var(--xf-line));
}
.xf-card--plain { background: transparent; box-shadow: inset 0 0 0 1px var(--xf-line); }
.xf-person { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.xf .xf-face { flex: none; width: 56px; height: 56px; border-radius: 999px; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 8px 18px -10px rgba(15, 23, 42, .5); }
.xf .xf-card-title { margin: 0; font: 700 1.05rem/1.3 var(--xf-display); color: var(--xf-black); }
.xf .xf-card-role { margin: 2px 0 0; font-size: .85rem; color: var(--xf-muted); }
.xf .xf-card-text { margin: 0; font-size: .92rem; line-height: 1.55; }
.xf-direct { display: grid; gap: 8px; margin-top: 14px; }
.xf a.xf-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(--xf-line); color: var(--xf-black); font-weight: 600; font-size: .92rem; text-decoration: none;
  transition: box-shadow .16s ease, color .16s ease;
}
.xf a.xf-direct-link i { color: var(--xf-primary); font-size: 13px; }
.xf a.xf-direct-link:hover { color: var(--xf-primary-ink); box-shadow: inset 0 0 0 1px var(--xf-primary); }
.xf-summary-body { display: grid; gap: 12px; margin-top: 12px; }
.xf .xf-summary-label { margin: 0; font: 700 .7rem/1.2 var(--xf-text); letter-spacing: .08em; text-transform: uppercase; color: var(--xf-muted); }
.xf-summary-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.xf-summary-tag { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 10px; border-radius: 999px; background: var(--xf-tint); color: var(--xf-primary-ink); font-size: .8rem; font-weight: 600; line-height: 1.25; }
.xf-next { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; counter-reset: xfnext; }
.xf-next li { position: relative; padding-left: 36px; font-size: .92rem; line-height: 1.5; counter-increment: xfnext; }
.xf-next li::before {
  content: counter(xfnext); position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 999px; background: var(--xf-tint); color: var(--xf-primary-ink); font: 700 .78rem/1 var(--xf-display);
}

/* ---------- confirmation ---------- */
.xf-done {
  max-width: 640px; margin: 0 auto; padding: 44px 32px; text-align: center; border-radius: 24px; background: #fff;
  box-shadow: inset 0 0 0 1px var(--xf-line), 0 24px 48px -38px rgba(15, 23, 42, .35);
}
.xf-done-icon { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; margin-bottom: 16px; border-radius: 999px; background: var(--xf-primary); color: var(--xf-on-primary); font-size: 22px; }
.xf-done .xf-lead p { margin: 0; }
.xf-done-direct { margin: 18px 0 0; font-size: .92rem; color: var(--xf-muted); }
.xf-done-direct a { color: var(--xf-primary-ink); font-weight: 600; text-decoration: none; }

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