/* Logo Studio (js/logo-studio.js): Einstieg in der Logo-Sektion und bildschirmfüllender Arbeitsbereich.
   Wird nach dem <style> in index.html geladen und nutzt dessen Variablen. */

/* ---- Einstieg unter den Logo-Plätzen ----
   Steht in der Seite der Kundenmarke: Masse und Farben wie .logo-slot und .rule-card (css/brand.css),
   die Schaltfläche ist ein .text-btn wie «Ersetzen» und «Entfernen» der Logo-Plätze. */
.studio-entry { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-5); padding: var(--space-4); background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.studio-entry__text { min-width: 0; }
.studio-entry__title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; color: var(--color-text); }
.studio-entry__hint { margin: 2px 0 0; font-size: 13px; line-height: 1.35; color: var(--color-text-secondary); }
.studio-entry__status { margin: 8px 0 0; font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--color-text-secondary); }
.studio-entry__status.is-ready { color: var(--color-success); }
.studio-entry__actions { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }

/* ---- Einstieg im Einstellungs-Panel, Reiter «Inhalt» ----
   Bausteine aus css/ui.css, nur Abstand zwischen Hinweis und erster .export-row */
.studio-panel .setting-hint { margin-bottom: 12px; }
.studio-panel #logoStudioPanelStatus { display: block; margin-top: 4px; font-weight: 600; }

/* ---- Arbeitsbereich ----
   Kopfzeile wie .topnav (index.html): Navigationsfarbe, 66 px hoch, Projektname wie .topnav__brand, Reiter als
   Textlinks wie .topnav__link mit Unterstreichung in --nav-accent, Schliessen als Pille wie .nav-btn--solid.
   Das Markup bleibt: Die Reiter tragen .ui-segmented, Schliessen trägt .settings-btn--reset aus css/ui.css;
   beides wird hier unter .studio-workspace per Spezifität überschrieben. Darunter die Fläche des Studios in
   der Seitenfläche des Projekts, damit beim Laden nichts weiss aufblitzt. */
.studio-workspace { position: fixed; inset: 0; z-index: 600; display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--color-surface); font-family: var(--font-family-base, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif); font-weight: 400; }
.studio-workspace[hidden] { display: none; }
/* Eigene Ebene, damit der Schatten über dem iframe liegt */
.studio-workspace__bar { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "title tabs close"; align-items: center; gap: 16px; padding: 0 24px; background: var(--nav-bg); color: var(--nav-ink); box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1); }
.studio-workspace__title { grid-area: title; display: flex; align-items: center; min-width: 0; }
/* «Logo Studio» bleibt für aria-labelledby im Dokument, ist aber nur für Screenreader da */
.studio-workspace__title strong { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Projektname wie .topnav__brand, in voller Navigationsfarbe */
.studio-workspace__project { min-width: 0; font-size: 22px; font-weight: 600; letter-spacing: 0.5px; line-height: 1.2; color: var(--nav-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Reiter wie .topnav__link: volle Höhe, alle in --nav-ink, aktiv und Hover mit 3 px Unterstreichung */
.studio-workspace .studio-workspace__tabs.ui-segmented { grid-area: tabs; align-self: stretch; display: flex; gap: 0; padding: 0; background: transparent; border-radius: 0; }
.studio-workspace .studio-workspace__tabs.ui-segmented > button { flex: none; min-height: 0; height: 100%; padding: 0 20px; display: flex; align-items: center; justify-content: center; background: transparent; border: none; border-top: 3px solid transparent; border-bottom: 3px solid transparent; border-radius: 0; box-shadow: none; color: var(--nav-ink); font-family: inherit; font-size: 17px; font-weight: 600; line-height: 1.2; white-space: nowrap; cursor: pointer; transition: border-color 0.2s ease; }
.studio-workspace .studio-workspace__tabs.ui-segmented > button:hover,
.studio-workspace .studio-workspace__tabs.ui-segmented > button[aria-selected="true"],
.studio-workspace .studio-workspace__tabs.ui-segmented > button[aria-selected="true"]:hover { color: var(--nav-ink); background: transparent; box-shadow: none; border-bottom-color: var(--nav-accent); }
.studio-workspace .studio-workspace__tabs.ui-segmented > button:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }
/* Schliessen wie .nav-btn--solid; der Fokusring in --nav-ink, weil die Schrift der Pille die Leistenfarbe hat */
.studio-workspace .studio-workspace__close.settings-btn { grid-area: close; justify-self: end; height: 38px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px; background: var(--nav-ink); color: var(--nav-bg); border: 1px solid var(--nav-ink); border-radius: 999px; font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1; transition: background 0.2s ease; }
.studio-workspace .studio-workspace__close.settings-btn:hover { background: color-mix(in srgb, var(--nav-ink) 86%, transparent); }
.studio-workspace .studio-workspace__close.settings-btn:focus-visible { outline: 2px solid var(--nav-ink); outline-offset: 2px; }
.studio-workspace__stage { min-height: 0; background: var(--color-surface); }
.studio-workspace__frame { display: block; width: 100%; height: 100%; border: 0; background: var(--color-surface); }
@media (min-width: 768px) {
  .studio-workspace__bar { height: 66px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .studio-workspace__bar { gap: 12px; padding: 0 16px; }
  .studio-workspace .studio-workspace__tabs.ui-segmented > button { padding: 0 14px; font-size: 16px; }
  .studio-workspace__project { font-size: 20px; }
}
/* Schmal: Projektname und Schliessen in der ersten Zeile, die Reiter gleichmässig über die Breite darunter */
@media (max-width: 767px) {
  .studio-workspace__bar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title close" "tabs tabs"; row-gap: 4px; padding: 10px 12px 0; }
  .studio-workspace__project { font-size: 18px; }
  .studio-workspace .studio-workspace__tabs.ui-segmented > button { flex: 1 1 0; min-width: 0; min-height: 44px; height: auto; padding: 0 6px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .studio-workspace .studio-workspace__tabs.ui-segmented > button, .studio-workspace .studio-workspace__close.settings-btn { transition: none; }
}
