/* Virgonia VTT v127t - local 3D dice canvas visibility fix.
   The base app hides the SDK canvas because previous builds used only the dddice room stream iframe.
   v127t uses the SDK canvas for the actual visible 3D roll, while keeping text/history/toasts independent. */
.dddice-overlay.is-visible .dddice-overlay-iframe {
  opacity: 0 !important;
}

.dddice-overlay.is-visible .dddice-overlay-canvas-hidden {
  opacity: 1 !important;
  pointer-events: none !important;
  z-index: 1 !important;
  width: 100vh !important;
  height: 100vw !important;
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform-origin: 50% 50% !important;
  transform: translate(-50%, -50%) rotate(-90deg) !important;
  background: transparent !important;
}

.dddice-overlay-caption {
  z-index: 5 !important;
}

.dddice-overlay-status {
  z-index: 6 !important;
}


/* v127v dice input cleanup: keep the dice entry field readable and easy to replace after rolls. */
.global-dice-control-panel .dice-formula-input {
  color: #eef2f7 !important;
  caret-color: #ffffff !important;
  background: rgba(10, 16, 24, 0.78) !important;
}
.global-dice-control-panel .dice-formula-input::selection {
  background: rgba(77, 141, 255, 0.72);
  color: #ffffff;
}


/* v127y iPad dice tap safety: make dice buttons/input respond cleanly to touch and keep the 3D layer non-interactive. */
.global-dice-control-panel .dice-quick-btn,
.global-dice-control-panel .dice-utility-btn,
.global-dice-control-panel .dice-visibility-toggle,
.global-dice-control-panel .dice-formula-input {
  touch-action: manipulation;
  -webkit-user-select: text;
}
.global-dice-control-panel .dice-quick-btn,
.global-dice-control-panel .dice-utility-btn,
.global-dice-control-panel .dice-visibility-toggle {
  -webkit-user-select: none;
  user-select: none;
}
.dddice-overlay,
.dddice-overlay * {
  pointer-events: none !important;
}
@supports (-webkit-touch-callout: none) {
  .dddice-overlay.is-visible .dddice-overlay-canvas-hidden {
    pointer-events: none !important;
  }
}
