@import url('./tokens.css');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: var(--app-height, 100%);
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  /* none: Chrome on Pixel 9 Pro still pinch-zooms the page with "manipulation"
     despite user-scalable=no, which jumps the map/export crop. Sheets set their
     own pan via overflow; touch-action is not inherited. */
  touch-action: none;
  -webkit-font-smoothing: antialiased;
}

.file-warning {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 8px 16px;
  background: #3a2a10;
  border-bottom: 1px solid var(--border-strong);
  color: #f0e0b0;
  font-size: 0.82rem;
  text-align: center;
  z-index: 1000;
}

.file-warning code {
  background: rgba(0, 0, 0, 0.3);
  padding: 1px 5px;
  border-radius: 4px;
}

body {
  display: block;
}

/* Press feedback follows the element's own radius. The browser tap color is a blue rectangle. */
a:active,
button:not(:disabled):active,
[role="button"]:active,
summary:active,
label:active,
.project-list-item:active,
.lage-dock-slot:active,
.lage-sheet-item:active,
.lage-more-tool:active,
.canvas-tb-btn:active,
.corner-handle:active,
.style-fan-tile:active {
  filter: brightness(1.18);
}

.corner-handle-rotate:active,
.viewport.rotating .corner-handle-rotate {
  filter: none;
}

body.app-is-loading #workspace {
  visibility: hidden;
  pointer-events: none;
}

.app-loading {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.app-loading.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.app-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 36px;
  text-align: center;
}

.app-loading-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: app-loading-spin 0.75s linear infinite;
}

@keyframes app-loading-spin {
  to { transform: rotate(360deg); }
}

.app-loading-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.app-loading-text {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}



/* Dark scrollbars (Firefox + WebKit) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.42);
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-corner {
  background: transparent;
}
