/**
 * Toolbar Styles
 * Floating toolbar with fullscreen, rotate, and share buttons
 */

/* Toolbar container */
.sign-toolbar {
  --toolbar-bg: #1e1e1e;
  --toolbar-border: rgba(255, 255, 255, 0.1);
  --toolbar-btn-bg: transparent;
  --toolbar-btn-color: rgba(255, 255, 255, 0.6);
  --toolbar-btn-hover-bg: rgba(255, 255, 255, 0.1);
  --toolbar-btn-hover-color: #00e676; /* Match Primary Green */

  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--toolbar-border);
  background: rgba(30, 30, 30, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: auto;
}

/* Cursor sync — hide toolbar when cursor is hidden */
body.cursor-hidden .sign-toolbar {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(10px);
}

/* Toolbar buttons */
.sign-toolbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: var(--toolbar-btn-bg);
  color: var(--toolbar-btn-color);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.sign-toolbar-btn:hover {
  background: var(--toolbar-btn-hover-bg);
  color: var(--toolbar-btn-hover-color);
  transform: translateY(-2px);
}

.sign-toolbar-btn:active {
  transform: scale(0.92) translateY(0);
}

.sign-toolbar-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Toast notification */
.sign-toolbar-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  z-index: 10000;
  padding: 10px 20px;
  border-radius: 100px;
  background: rgba(30, 30, 30, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sign-toolbar-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Cast button active state — breathing pulse */
.sign-toolbar-btn.casting-active {
  color: #2979ff;
  animation: cast-pulse 2s ease-in-out infinite;
}

@keyframes cast-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Rotation classes applied to #sign-container */
#sign-container.rotated-90 {
  width: 100vh;
  height: 100vw;
  transform: translate(calc((100vw - 100vh) / 2), calc((100vh - 100vw) / 2)) rotate(90deg);
}

#sign-container.rotated-180 {
  transform: rotate(180deg);
}

#sign-container.rotated-270 {
  width: 100vh;
  height: 100vw;
  transform: translate(calc((100vw - 100vh) / 2), calc((100vh - 100vw) / 2)) rotate(270deg);
}