/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

html {
  scrollbar-gutter: stable;
}

body:has(> turbo-frame#modal:not(:empty)) {
  overflow: hidden;
}

.spatial-toolbar { position: absolute; top: 20px; right: 88px; z-index: 30; display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: #fff; box-shadow: 0 4px 18px #172b2420; }
.spatial-toolbar button { padding: 9px 16px; border-radius: 8px; color: #334155; font-size: 14px; font-weight: 600; cursor: pointer; }
.spatial-toolbar button[aria-pressed="true"] { background: #1e3932; color: white; }
.spatial-toolbar button:hover { background: #dce9e0; color: #1e3932; }
.spatial-toolbar button:focus-visible, .spatial-viewport canvas:focus-visible { outline: 3px solid #237554; outline-offset: 3px; }
.spatial-viewport { position: absolute; inset: 0; overflow: hidden; background: #dce3d5; }
.spatial-viewport canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.spatial-help { position: absolute; bottom: 100px; left: 50%; transform: translateX(-50%); z-index: 20; max-width: calc(100% - 32px); width: max-content; padding: 10px 18px; border-radius: 12px; background: #263c33; color: #fff; font-size: 12px; text-align: center; pointer-events: none; }
.spatial-label { position: absolute; left: 0; top: 0; pointer-events: none; padding: 4px 9px; border-radius: 6px; background: #263c33; color: white; font: 500 12px system-ui; white-space: nowrap; }
.spatial-label[data-room] { color: #263c33; background: #fffffff0; font-weight: 650; }
.spatial-active #canvas { opacity: 0; pointer-events: none; }

.spatial-active { overflow: clip; }
.spatial-tooltip { position: absolute; left: 16px; top: 20px; max-width: min(300px, calc(100% - 32px)); padding: 12px 16px; border-radius: 10px; background: #263c33; color: white; font: 500 13px system-ui; pointer-events: none; z-index: 2; }
@media (max-width: 640px) {
  .spatial-toolbar { top: 74px; left: 12px; right: auto; max-width: calc(100% - 24px); flex-wrap: wrap; }
  .spatial-toolbar button { padding: 9px 12px; }
  .spatial-tooltip { top: 130px; }
  .spatial-help { bottom: 110px; }
}
