/* GdC Agamotto 360 */

.gdc-agamotto-360 {
  width: 100%;
  max-width: 100%;
  margin: 1.5rem 0;
  font-family: inherit;
}

.gdc-agamotto-viewport {
  position: relative;
  width: 100%;
  height: var(--gdc-agamotto-height, 560px);
  min-height: 320px;
  overflow: hidden;
  background: #111;
  border-radius: 10px;
  isolation: isolate;
  touch-action: none;
  user-select: none;
}

.gdc-agamotto-canvas-wrap,
.gdc-agamotto-canvas-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.gdc-agamotto-canvas-wrap canvas {
  cursor: grab;
}

.gdc-agamotto-dragging .gdc-agamotto-canvas-wrap canvas {
  cursor: grabbing;
}

.gdc-agamotto-ui {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 5;
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 14px;
  line-height: 1.2;
}

.gdc-agamotto-label {
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.gdc-agamotto-slider {
  width: 100%;
  accent-color: #ffffff;
}

.gdc-agamotto-loading,
.gdc-agamotto-error {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 2rem;
  background: #111;
  color: #fff;
  text-align: center;
}

.gdc-agamotto-loading {
  position: absolute;
  inset: 0;
  z-index: 4;
}

.gdc-agamotto-error {
  border-radius: 10px;
  color: #fff;
}

.gdc-agamotto-fullscreen {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  cursor: pointer;
  padding: 0;
}

.gdc-agamotto-fullscreen::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M8 3H5a2 2 0 0 0-2 2v3'/><path d='M21 8V5a2 2 0 0 0-2-2h-3'/><path d='M3 16v3a2 2 0 0 0 2 2h3'/><path d='M16 21h3a2 2 0 0 0 2-2v-3'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
}

.gdc-agamotto-is-fullscreen .gdc-agamotto-fullscreen::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 3v3a2 2 0 0 1-2 2H4'/><path d='M15 3v3a2 2 0 0 0 2 2h3'/><path d='M9 21v-3a2 2 0 0 0-2-2H4'/><path d='M15 21v-3a2 2 0 0 1 2-2h3'/></svg>");
}

/* Vollbild: Container UND Viewport auf 100% strecken, sonst bleibt der
   Viewport bei der festen data-height stehen (nur volle Breite, keine
   volle Höhe). */
.gdc-agamotto-360:fullscreen,
.gdc-agamotto-360:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  margin: 0;
  background: #000;
  display: flex;
}

.gdc-agamotto-360:fullscreen .gdc-agamotto-viewport,
.gdc-agamotto-360:-webkit-full-screen .gdc-agamotto-viewport {
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 0;
}

@media (max-width: 700px) {
  .gdc-agamotto-viewport {
    height: min(var(--gdc-agamotto-height, 560px), 70vh);
    min-height: 300px;
    border-radius: 8px;
  }

  .gdc-agamotto-ui {
    left: 10px;
    right: 10px;
    bottom: 10px;
    grid-template-columns: 1fr;
    gap: 6px;
    border-radius: 12px;
    font-size: 13px;
  }

  .gdc-agamotto-label-before {
    justify-self: start;
  }

  .gdc-agamotto-label-after {
    justify-self: end;
  }
}