/*
 * TC Messestand – Styles
 * Alle Regeln sind auf .tc-messestand begrenzt,
 * damit sie weder das Theme beeinflussen noch vom Theme überschrieben werden.
 *
 * Schrift, Akzent- und Textfarbe kommen aus den globalen Elementor-Stilen (Kit) der Website
 * (--e-global-*). Die Fallbacks entsprechen den Kit-Werten von winmod.de, damit der Stand
 * auch ohne Elementor korrekt aussieht.
 */
.tc-messestand{
  --panel:#ffffff;
  --text:var(--e-global-color-text,#4F4F4F);
  --line:#d9dfe6;
  --accent:var(--e-global-color-primary,#FF0066);
  --secondary:var(--e-global-color-secondary,#28699F);
  --radius-pill:500px;
  --stage-height:720px;
  --font-button-size:var(--e-global-typography-accent-font-size,13px);
  --font-button-weight:var(--e-global-typography-accent-font-weight,500);
  --font-text:var(--e-global-typography-text-font-family,"Figtree"),"Segoe UI",Arial,sans-serif;
  --font-text-weight:var(--e-global-typography-text-font-weight,400);
  --font-heading-line-height:var(--e-global-typography-primary-line-height,1.1em);
  --font-sub:var(--e-global-typography-secondary-font-family,"Figtree"),"Segoe UI",Arial,sans-serif;
  --font-sub-weight:var(--e-global-typography-secondary-font-weight,600);
}
.tc-messestand,.tc-messestand *{box-sizing:border-box}
.tc-messestand{margin:0;font-family:var(--font-text);font-weight:var(--font-text-weight);color:var(--text)}
.tc-messestand button{font:inherit}
.tc-messestand .cat-copy strong,.tc-messestand .subcopy strong,.tc-messestand .drawer-title,.tc-messestand .active-info strong,.tc-messestand .model-placeholder strong{font-family:var(--font-sub);font-weight:var(--font-sub-weight)}

/* Theme-Reset: viele Themes stylen <button> global (Padding, Großbuchstaben, Schatten, nowrap …) */
.tc-messestand button{margin:0;text-transform:none;letter-spacing:normal;min-height:0;min-width:0;text-decoration:none;white-space:normal}
.tc-messestand canvas{max-width:none}

.tc-messestand .shell{width:min(1750px,100%);margin:0 auto;background:var(--panel);overflow:hidden}
.tc-messestand .navigator{display:grid;grid-template-columns:420px 1fr;align-items: start;background:#929ba5;}

/* ===== SEITENLEISTE ===== */
/* Seitenleiste nie höher als die Bühne samt 10px-Borders oben und unten der Bühnenspalte; aufgeklappte Kategorien scrollen innerhalb */
.tc-messestand .sidebar{position:relative;z-index:5;padding:0 10px;border-top:10px solid transparent;border-bottom:10px solid transparent;min-height:0;max-height:calc(var(--stage-height) + 20px);overflow-y:auto;color:#fff}
/* Abstand oben und unten als transparente Border statt Padding: die Border liegt außerhalb des Scrollbereichs, oben und unten bleiben so immer 10px grau frei */
.tc-messestand .category-stack{display:grid;gap:12px}

/* Kategorie-Karten in Hellblau (winmod.de #CEDFF2), Text #4F4F4F.
   Rahmen ist immer 2px (in Kartenfarbe), damit beim Hover nur die Farbe wechselt und nichts springt. */
.tc-messestand .category-card{border-radius:0;background:#d3d8db;color:#4F4F4F;overflow:hidden;transition:.18s ease}
.tc-messestand .category-card:hover{border-color:#28699F}
.tc-messestand .category-btn{width:100%;border:0;background:#d3d8db;color:#4F4F4F;display:grid;grid-template-columns:40px 1fr 24px;align-items:center;gap:13px;padding:16px;text-align:left;cursor:pointer}
.tc-messestand .number{width:32px;height:32px;border:1px solid var(--accent);border-radius:50%;display:grid;place-items:center;font-size:.78rem;font-weight:700;color:#fff;background:var(--accent)}
.tc-messestand .cat-copy strong{display:block;font-size:1rem;line-height:1.2;margin-bottom:4px}
.tc-messestand .cat-copy span{display:block;font-size:.8rem;color:#4F4F4F;line-height:1.35}
/* Pfeil als zentriertes SVG in einem Quadrat, damit er sich beim Aufklappen auf der Stelle dreht */
.tc-messestand .arrow{width:24px;height:24px;display:grid;place-items:center;color:#4F4F4F;transition:transform .2s ease}
.tc-messestand .arrow svg{display:block;width:16px;height:16px}
.tc-messestand .category-card.active .arrow{color:var(--accent);transform:rotate(90deg)}
.tc-messestand .category-sub{max-height:0;overflow:hidden;transition:max-height .28s ease, padding .28s ease;padding:0 16px}
.tc-messestand .category-card.active .category-sub{max-height:620px;padding:0 16px 16px}
.tc-messestand .subgrid{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding-top:2px}

/* Unterpunkte: weiß, 2px weißer Rahmen; Hover und aktiver Punkt nur Rahmen in Primärfarbe */
.tc-messestand .subitem{border:0;background:#fff;border-radius:0;min-height:56px;padding:11px 10px;display:flex;align-items:flex-start;gap:9px;font-size:.8rem;line-height:1.28;color:#4F4F4F;transition:.17s ease;cursor:pointer;text-align:left}
.tc-messestand .subitem:hover{color:#28699F}
.tc-messestand .subitem.active{background:#CEDFF2;color:#28699F}
.tc-messestand .subcopy strong{display:block;font-size:.84rem;line-height:1.25;margin-bottom:0}

/* ===== BÜHNE ===== */
.tc-messestand .stage-column{display:flex;flex-direction:column;min-width:0;background:rgb(119 147 178);border-top:10px solid #919aa4;border-bottom:10px solid #64707d}
.tc-messestand .stage{height:var(--stage-height);flex:0 0 auto;position:relative;overflow:hidden;background:linear-gradient(#919aa4 0%,#64707d 100%)}
.tc-messestand .scene{position:absolute;inset:0;overflow:hidden}
.tc-messestand .model-viewport{position:absolute;inset:0;z-index:2;overflow:hidden;cursor:grab;touch-action:none;user-select:none;outline:none}
.tc-messestand .model-viewport:active{cursor:grabbing}
.tc-messestand .model-viewport:focus-visible{box-shadow:none;outline:none}

.tc-messestand .model-controls{position:absolute;z-index:12;right:24px;bottom:30px;display:flex;flex-direction:column;gap:8px}
/* Steuer-Buttons: weiße Pille mit Icon in #4F4F4F, 2px Rahmen */
.tc-messestand .model-control{width:43px;height:43px;padding:0;border:2px solid #fff;background:#fff;border-radius:var(--radius-pill);color:#4F4F4F;display:grid;place-items:center;font-size:1.1rem;font-weight:700;cursor:pointer;box-shadow:0 9px 22px rgba(44,52,62,.09);transition:.16s ease}
/* Hover invertiert: Füllung #4F4F4F, Icon weiß */
.tc-messestand .model-control:hover{border-color:#4F4F4F;color:#fff;background:#4F4F4F}
.tc-messestand .model-control:focus-visible{outline:3px solid color-mix(in srgb,#4F4F4F 35%,transparent);outline-offset:2px}
.tc-messestand .model-control.reset{font-size:var(--font-button-size);font-weight:var(--font-button-weight);line-height:1}
.tc-messestand .model-control[disabled]{opacity:.42;cursor:not-allowed}

.tc-messestand .active-info{position:absolute;z-index:9;left:38px;bottom:30px;max-width:395px;background:rgba(255,255,255,.93);border:1px solid #d7dde3;border-radius:0;padding:15px 17px;box-shadow:0 15px 32px rgba(47,56,68,.11);backdrop-filter:blur(12px);display:none}
.tc-messestand .active-info .mini{font-size:.67rem;text-transform:uppercase;letter-spacing:.13em;color:var(--accent);font-weight:600;margin-bottom:5px}
.tc-messestand .active-info strong{display:block;font-size:1.02rem;margin-bottom:3px;color:var(--secondary)}
.tc-messestand .active-info span{font-size:.8rem;color:#717b88;line-height:1.45}

/* ===== DRAWER ===== */
.tc-messestand .drawer{position:absolute;z-index:10;top:0px;left:10px;width:min(460px,32vw);background:#CEDFF2;color:#fff;transform:translateX(0);transition:transform .25s ease, opacity .2s ease}
.tc-messestand .drawer.hidden{transform:translateX(calc(100% + 24px));opacity:0;pointer-events:none}
.tc-messestand .drawer-inner{padding:17px;height:100%;display:flex;flex-direction:column}
.tc-messestand .drawer-top{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:4px}
.tc-messestand .drawer-actions{display:flex;align-items:center;gap:10px}
.tc-messestand .drawer-close{width:28px;height:28px;padding:0;border-radius:50%;border:1px solid #697381;background:transparent;color:#697381;cursor:pointer;display:grid;place-items:center;font-size:1.1rem;line-height:1;transition:.18s ease}
.tc-messestand .drawer-close:hover{border-color:#697381;color:#fff;background:#697381}
.tc-messestand .drawer-title{font-size:1.2rem;line-height:var(--font-heading-line-height);letter-spacing:normal;font-weight:600;margin:0;color:#28699F}
.tc-messestand .drawer-badge{font-size:.72rem;color:#fff;background:var(--accent);border-radius:999px;padding:5px 10px;font-weight:800;white-space:nowrap;}
.tc-messestand .drawer-body{padding-top:8px;color:#4F4F4F;font-size:.8rem;line-height:1.62}
.tc-messestand .drawer-body p{margin:0px;color:inherit;line-height:1.4}

/* ===== 3D-VIEWER ===== */
.tc-messestand .three-mount{position:absolute;inset:0;z-index:1}
.tc-messestand .three-mount canvas{display:block;width:100%;height:100%;outline:none}
.tc-messestand .model-placeholder{
  position:absolute;z-index:0;left:50%;top:54%;transform:translate(-50%,-50%);width:min(620px,72%);aspect-ratio:1.7/1;
  border:1px dashed #c8cfd8;border-radius:0;background:linear-gradient(145deg,rgba(255,255,255,.86),rgba(222,227,233,.72));
  display:grid;place-items:center;text-align:center;padding:28px;color:#7b8591;box-shadow:0 28px 60px rgba(45,54,65,.08);transition:opacity .25s ease;
}
/* Während des Ladens nur die Lade-Pille zeigen; die Platzhalter-Karte erscheint nur bei einem Fehler */
.tc-messestand .model-placeholder:not(.error){opacity:0;pointer-events:none}
.tc-messestand .model-placeholder strong{display:block;color:var(--secondary);font-size:1.12rem;margin-bottom:7px}
.tc-messestand .model-placeholder code{font-family:Consolas,Monaco,monospace;background:#f6f7f9;border:1px solid #e1e5ea;border-radius:0;padding:3px 7px;color:var(--accent)}
.tc-messestand .model-status{margin-top:9px;font-size:.76rem;color:#9aa2ad}
.tc-messestand .viewer-loading{position:absolute;z-index:6;left:50%;top:50%;transform:translate(-50%,-50%);padding:10px 14px;border-radius:var(--radius-pill);background:rgba(255,255,255,.92);border:1px solid #dfe4ea;color:#687381;font-size:.76rem;box-shadow:0 10px 28px rgba(44,52,62,.08);pointer-events:none;transition:opacity .2s ease}
.tc-messestand .viewer-loading.hidden{opacity:0}

/* ===== HOTSPOTS ===== */
.tc-messestand .hotspot-overlay{position:absolute;inset:0;z-index:5;pointer-events:none}
/* Hotspots erst zeigen, wenn das Modell geladen ist */
.tc-messestand .model-placeholder:not(.loaded) ~ .hotspot-overlay{visibility:hidden}
.tc-messestand .hotspot-3d{
  position:absolute;left:50%;top:50%;transform:translate(-25px,-50%);pointer-events:auto;display:flex;align-items:center;gap:9px;
  border:0;background:transparent;box-shadow:none;padding:0;cursor:pointer;white-space:nowrap;transition:opacity .15s ease;
}
.tc-messestand .hotspot-3d.hidden{opacity:0;pointer-events:none}
.tc-messestand .hotspot-dot{
  width:50px;height:50px;border-radius:50%;background:var(--accent);color:#fff;display:grid;place-items:center;font-weight:700;
  box-shadow:0 0 0 8px color-mix(in srgb,var(--accent) 10%,transparent),0 9px 28px color-mix(in srgb,var(--accent) 25%,transparent);position:relative;flex:0 0 auto;
  transition:transform .2s ease;
}
.tc-messestand .hotspot-dot::after{content:"";position:absolute;inset:-10px;border-radius:50%;border:1px solid color-mix(in srgb,var(--accent) 32%,transparent);animation:tc-messestand-pulse 2s infinite}
.tc-messestand .hotspot-3d.active .hotspot-dot,.tc-messestand .hotspot-3d:hover .hotspot-dot{transform:scale(1.08)}
/* Einmaliger blauer Puls beim Auswählen einer Kategorie (Klasse .pulse setzt navigator.js) */
.tc-messestand .hotspot-3d.pulse .hotspot-dot{animation:tc-messestand-pulse-once .9s ease-out 1}
@keyframes tc-messestand-pulse-once{
  0%{background:var(--secondary);box-shadow:0 0 0 0 color-mix(in srgb,var(--secondary) 70%,transparent)}
  60%{background:var(--secondary)}
  100%{background:var(--accent);box-shadow:0 0 0 8px color-mix(in srgb,var(--secondary) 0%,transparent)}
}
/* Hotspot-Texte ausblenden */
.tc-messestand .hotspot-label{display:none}
@keyframes tc-messestand-pulse{0%{transform:scale(.9);opacity:.8}100%{transform:scale(1.35);opacity:0}}

/* ===== RESPONSIVE ===== */
@media(max-width:1220px){
  .tc-messestand .navigator{grid-template-columns:460px 1fr}
  .tc-messestand .drawer{width:min(340px,46vw)}
}
@media(max-width:1080px){
  .tc-messestand .navigator{grid-template-columns:1fr}
  .tc-messestand .sidebar{max-height:none;overflow:visible}
  .tc-messestand .drawer{top:0px;right:10px;left:10px;width:auto;bottom:auto;border:1px solid #d8dee5}
  .tc-messestand .drawer.hidden{transform:translateY(calc(-100% - 24px))}
  .tc-messestand .active-info{bottom:260px}
}
@media(max-width:760px){
  .tc-messestand .model-controls{right:12px;bottom:16px}
  .tc-messestand .model-control{width:40px;height:40px}
  .tc-messestand .subgrid{grid-template-columns:1fr}
  /* Drawer oben andocken (unten liegen die Steuer-Buttons), Höhe begrenzen */
  .tc-messestand .drawer{top:0px;left:10px;right:10px;bottom:auto;max-height:60%;overflow-y:auto}
  .tc-messestand .active-info{left:14px;right:14px;bottom:280px;max-width:none}
}
