/* geoBIM.app — share link view (share-view.js) */

body.share-view .share-hidden { display: none !important; }

/* Customers measure, comment, look at sun & shadows and pick a base map,
   nothing else. Share links always use the panel UI (panels-ui-loader.js): the
   rail keeps Layers (base maps only, see below), Measure, Comments, Sun &
   time and Visibility (hide elements), the phone tab bar Layers, Measure, Sun &
   time and "More" (with Comments and Visibility). No bottom
   toolbar, no Walk / Transform actions; the Loaded widget is reduced (below). */
body.share-view #bottomToolbar,
body.share-view #floatingAssetsPanel,
body.share-view [data-node="m:saved"],
body.share-view .panels-rail-action,
body.share-view .panels-rail-sep,
body.share-view .panels-rail-btn[data-section]:not([data-section="layers"]):not([data-section="drawing"]):not([data-section="comments"]):not([data-section="lighting"]):not([data-section="visibility"]),
body.share-view .panels-tabs .panels-tab:not([data-section="layers"]):not([data-section="drawing"]):not([data-section="lighting"]):not([data-section="more"]),
body.share-view .panels-more .panels-tab:not([data-section="comments"]):not([data-section="visibility"]) {
  display: none !important;
}

/* Loaded widget (panels-assets.js), reduced: per model fly to, show/hide and
   the section tool (alignment-section.js: IfcAlignment axis, line, plan).
   No remove, sequencing, section planes, details or "Clamp all to terrain". */
body.share-view #pnlLoadedWidget .assets-panel-actions,
body.share-view #pnlLoadedWidget .modern-asset-details,
body.share-view #pnlLoadedWidget .modern-asset-chevron,
body.share-view #pnlLoadedWidget .modern-asset-controls > :not([onclick*="zoomToAsset"]):not(.asset-btn-visibility):not(.axis-card-btn) {
  display: none !important;
}

/* Layers panel: only the base map list (no terrain, WMS, GIS files, 3D
   layers, own imagery) */
body.share-view .panels-panel[data-section="layers"] .pnl-branch:not([data-node="imagery"]):not([data-node="imagery:base"]) {
  display: none !important;
}

/* Comments: customers can't edit or delete (Firestore rules: owner only) */
body.share-view button[onclick*="editComment"],
body.share-view button[onclick*="deleteComment"],
body.share-view #deleteAllCommentsBtn { display: none !important; }

.share-banner {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-panels);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  max-width: min(560px, calc(100vw - 32px));
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-overlay);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
  font-size: 13px;
}

.share-banner > svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--brand-teal);
}

.share-banner-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px var(--space-sm);
  min-width: 0;
}

.share-banner-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-banner-label { color: var(--text-secondary); }
.share-banner-meta { color: var(--text-muted); font-size: 12px; }
.share-banner-warn { color: var(--warning); font-size: 12px; cursor: help; }

.share-error {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlays);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  background: rgba(0, 0, 0, 0.6);
}

.share-error-card {
  max-width: 420px;
  padding: var(--space-2xl);
  background: var(--bg-overlay);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  color: var(--text-primary);
  text-align: center;
}

.share-error-card svg {
  width: 32px;
  height: 32px;
  color: var(--brand-teal);
}

.share-error-card h1 {
  margin: var(--space-md) 0 var(--space-sm);
  font-size: 18px;
}

.share-error-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

@media (max-width: 768px) {
  .share-banner { top: 56px; font-size: 12px; }
}
