@font-face {
  font-family: "ADS Nunito Sans";
  src: url("../fonts/NunitoSans-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "ADS Rajdhani";
  src: url("../fonts/Rajdhani-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "ADS Roboto Slab";
  src: url("../fonts/RobotoSlab-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

.ads-studio {
  --ads-bg: #080d16;
  --ads-panel: #111a29;
  --ads-panel-soft: #172235;
  --ads-border: rgba(119, 218, 255, 0.2);
  --ads-cyan: #4fd7ff;
  --ads-text: #f6f9ff;
  --ads-muted: #9eb0c8;
  box-sizing: border-box;
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto;
  padding: clamp(24px, 4vw, 54px);
  color: var(--ads-text);
  background:
    radial-gradient(circle at 15% 0%, rgba(34, 197, 255, 0.14), transparent 30%),
    linear-gradient(145deg, #0b1220, var(--ads-bg));
  border: 1px solid var(--ads-border);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.ads-studio *,
.ads-studio *::before,
.ads-studio *::after {
  box-sizing: border-box;
}

.ads-studio__intro {
  max-width: 720px;
  margin-bottom: 32px;
}

.ads-studio__eyebrow {
  margin: 0 0 8px;
  color: var(--ads-cyan);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ads-studio h1 {
  margin: 0 0 12px;
  color: var(--ads-text);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.02;
}

.ads-studio__intro > p:last-child {
  margin: 0;
  color: var(--ads-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.ads-studio__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(22px, 4vw, 44px);
  align-items: start;
}

.ads-preview-card,
.ads-configurator {
  border: 1px solid var(--ads-border);
  border-radius: 22px;
  background: rgba(17, 26, 41, 0.9);
}

.ads-preview-card {
  position: sticky;
  top: 24px;
  overflow: hidden;
}

.ads-preview-card__stage {
  position: relative;
  display: grid;
  min-height: 410px;
  padding: 40px;
  place-items: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle, rgba(79, 215, 255, 0.13), transparent 60%);
  background-size: 28px 28px, 28px 28px, auto;
}

.ads-three-preview {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
  touch-action: none;
}

.ads-preview-card__stage.is-three-ready .ads-three-preview {
  display: block;
}

.ads-preview-card__stage.is-three-ready .ads-nameplate {
  display: none;
}

.ads-three-preview canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  cursor: grab;
}

.ads-three-preview canvas:active {
  cursor: grabbing;
}

.ads-nameplate {
  display: grid;
  width: min(100%, 520px);
  aspect-ratio: 160 / 55;
  padding: 18px;
  place-items: center;
  overflow: hidden;
  color: var(--ads-text-color);
  background: var(--ads-base-color);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 18px 38px rgba(0, 0, 0, 0.4);
  transform: perspective(900px) rotateX(4deg);
}

.ads-nameplate[data-ads-size="small"] {
  aspect-ratio: 90 / 30;
}

.ads-nameplate[data-ads-size="medium"] {
  aspect-ratio: 125 / 43;
}

.ads-nameplate__content {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  gap: 0.28em;
}

.ads-nameplate__content.is-symbol-right {
  flex-direction: row-reverse;
}

.ads-nameplate__symbol {
  flex: 0 0 auto;
  font-size: 0.8em;
}

.ads-nameplate__symbol svg {
  display: block;
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.ads-nameplate span[data-ads-preview-text] {
  max-width: 100%;
  overflow: hidden;
  font-family: var(--ads-font-family);
  font-size: clamp(1.25rem, 4.2vw, 3.15rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.25),
    0 5px 9px rgba(0, 0, 0, 0.22);
  white-space: nowrap;
}

.ads-nameplate[data-ads-style="engraved"] .ads-nameplate__content {
  text-shadow:
    0 -2px 2px rgba(0, 0, 0, 0.75),
    0 1px 0 rgba(255, 255, 255, 0.12);
  transform: translateY(1px) scale(0.99);
}

.ads-nameplate[data-ads-style="flat"] .ads-nameplate__content {
  text-shadow: none;
  transform: none;
}

.ads-field[hidden] {
  display: none !important;
}

.ads-preview-card__note {
  margin: 0;
  padding: 16px 20px;
  color: var(--ads-muted);
  border-top: 1px solid var(--ads-border);
  font-size: 0.78rem;
  line-height: 1.45;
}

.ads-configurator {
  display: grid;
  gap: 20px;
  padding: clamp(20px, 3vw, 30px);
}

.ads-field {
  display: grid;
  gap: 8px;
}

.ads-field label {
  color: var(--ads-text);
  font-size: 0.9rem;
  font-weight: 750;
}

.ads-text-entry {
  position: static !important;
  display: flex !important;
  visibility: visible !important;
  align-items: center !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 50px !important;
  min-height: 50px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  overflow: hidden !important;
  opacity: 1 !important;
  clip: auto !important;
  clip-path: none !important;
  color: var(--ads-text) !important;
  background: #0c1421 !important;
  border: 1px solid rgba(158, 176, 200, 0.25) !important;
  border-radius: 12px !important;
  outline: 0;
  font: inherit !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.ads-text-entry__editor {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 1.25em !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  color: inherit !important;
  outline: 0 !important;
  caret-color: var(--ads-cyan);
  font: inherit !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
}

.ads-text-entry__editor:empty::before {
  color: #75869d;
  content: attr(data-placeholder);
  pointer-events: none;
}

.ads-text-entry:focus-within {
  border-color: var(--ads-cyan) !important;
  outline: 3px solid rgba(79, 215, 255, 0.12) !important;
}

.ads-text-entry.is-invalid {
  border-color: #ff7f7f !important;
}

.ads-field input,
.ads-field textarea,
.ads-field select {
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: 0 14px;
  color: var(--ads-text);
  background: #0c1421;
  border: 1px solid rgba(158, 176, 200, 0.25);
  border-radius: 12px;
  box-shadow: none;
  font: inherit;
  resize: none;
}

/* Manche Shop-Themes verstecken leere Textfelder mit globalen Regeln. */
.ads-studio .ads-configurator input[type="text"],
.ads-studio .ads-configurator textarea[data-ads-text] {
  position: static !important;
  display: block !important;
  visibility: visible !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 50px !important;
  min-height: 50px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  overflow: visible !important;
  opacity: 1 !important;
  clip: auto !important;
  clip-path: none !important;
  color: var(--ads-text) !important;
  background: #0c1421 !important;
  border: 1px solid rgba(158, 176, 200, 0.25) !important;
  border-radius: 12px !important;
  line-height: 48px !important;
  white-space: nowrap !important;
}

.ads-field input:focus,
.ads-field textarea:focus,
.ads-field select:focus {
  border-color: var(--ads-cyan);
  outline: 3px solid rgba(79, 215, 255, 0.12);
}

.ads-field__meta {
  display: flex;
  justify-content: space-between;
  color: var(--ads-muted);
  font-size: 0.75rem;
}

.ads-field__error {
  margin: 0;
  color: #ff9f9f;
  font-size: 0.78rem;
}

.ads-field__hint {
  margin: 0;
  color: var(--ads-muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.ads-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 2px;
  border-top: 1px solid var(--ads-border);
}

.ads-summary span {
  color: var(--ads-muted);
}

.ads-summary strong {
  color: var(--ads-text);
  font-size: 1.35rem;
}

.ads-submit {
  width: 100%;
  min-height: 54px;
  padding: 12px 20px;
  color: #041019;
  background: linear-gradient(135deg, #7de5ff, #29b8ee);
  border: 0;
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(41, 184, 238, 0.2);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.ads-submit:hover,
.ads-submit:focus-visible {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.ads-production-test {
  display: grid;
  gap: 7px;
  padding: 18px 20px 20px;
  background: linear-gradient(135deg, rgba(79, 215, 255, 0.13), rgba(79, 215, 255, 0.04));
  border-top: 1px solid rgba(79, 215, 255, 0.35);
}

.ads-production-test > strong {
  color: var(--ads-text);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ads-export {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  color: #041019;
  background: linear-gradient(135deg, #7de5ff, #29b8ee);
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.ads-export:hover,
.ads-export:focus-visible {
  filter: brightness(1.08);
  outline: 2px solid rgba(79, 215, 255, 0.16);
}

.ads-export:disabled {
  cursor: wait;
  opacity: 0.6;
}

.ads-production-test p {
  margin: 0;
  color: var(--ads-muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.ads-production-test .ads-production-test__status:not(:empty) {
  color: var(--ads-text);
}

@media (max-width: 820px) {
  .ads-studio {
    width: min(100% - 20px, 680px);
    margin: 16px auto;
    padding: 22px 16px;
    border-radius: 20px;
  }

  .ads-studio__layout {
    grid-template-columns: 1fr;
  }

  .ads-preview-card {
    position: static;
  }

  .ads-preview-card__stage {
    min-height: 260px;
    padding: 24px 16px;
  }

  .ads-nameplate {
    border-radius: 13px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .ads-submit {
    transition: filter 160ms ease, transform 160ms ease;
  }
}
