/* ==========================================================================
   Whiteboard Floating / Fullscreen
   File: assets/whiteboard-floating.css
   ========================================================================== */

.floating-global-tools {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  gap: 12px;
  z-index: 2147483645;
}

html[dir="ltr"] .floating-global-tools {
  right: auto;
  left: 24px;
}

.global-tool-btn {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 50%;
  background: var(--theme-primary, #059669);
  color: #ffffff;
  border: none;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, filter .2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.global-tool-btn:hover { transform: scale(1.08); }
.global-tool-btn:active { transform: scale(.96); }

.global-tool-btn svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.whiteboard-iframe-wrapper {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  background: var(--bg-surface, #ffffff);
  overflow: hidden;
  z-index: 2147483647;
  display: flex;
  flex-direction: column;
  direction: rtl;
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}

.whiteboard-iframe-wrapper.hidden {
  display: flex;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: scale(.98);
}

.whiteboard-iframe-wrapper .global-tool-header {
  background: var(--bg-header, #ffffff);
}

.whiteboard-iframe-wrapper .global-tool-iframe {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: none;
  flex: 1 1 auto;
}

@media (max-width: 640px) {
  .floating-global-tools {
    bottom: 14px;
    right: 14px;
    gap: 8px;
  }

  html[dir="ltr"] .floating-global-tools {
    left: 14px;
    right: auto;
  }

  .global-tool-btn {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .global-tool-btn svg {
    width: 23px;
    height: 23px;
  }
}
