@import url('../assembly-controls.css');
.p360-plan-workspace { display: grid; grid-template-columns: 170px minmax(0, 1fr); min-height: 740px; height: calc(100dvh - 176px); border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.p360-plan-workspace .editor-layers { overflow-y: auto; padding: 18px 12px; }
.p360-plan-workspace .tree-item { font-size: 11px; padding: 9px; overflow-wrap: anywhere; }
.p360-plan-workspace .editor-help { padding-inline: 6px; }
.p360-plan-workspace .editor-help .btn { padding-inline: 0; font-size: 10px; }
.p360-plan-frame { min-width: 0; min-height: 0; }
.p360-room-content { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.p360-room-content > .p360-plan-frame { flex: 1; }
.p360-room-content [hidden] { display: none !important; }
.p360-room-viewbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; padding: 6px 12px; border-bottom: 1px solid var(--line); }
.p360-room-viewbar > span { font-size: 11px; color: var(--muted); }
.p360-room-select { display: none; min-width: 0; max-width: 160px; min-height: 36px; font-size: 12px; padding: 6px; }
.p360-room-views { display: flex; gap: 4px; padding: 3px; background: var(--surface-alt); border-radius: 9px; }
.p360-room-views button { display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 7px 12px; border: 1px solid transparent; border-radius: 7px; background: transparent; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; }
.p360-room-views [aria-pressed=true] { background: var(--surface); border-color: var(--line); color: var(--accent); }
.p360-room-preview { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 14px; gap: 12px; }
.p360-preview-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; }
.p360-preview-tools label { display: flex; gap: 8px; align-items: center; }
.p360-preview-tools select { min-height: 36px; padding: 6px 10px; }
.p360-preview-canvas { min-height: 200px; flex: 1; overflow: hidden; border-radius: 10px; background: #e9e8e2; }
.p360-preview-canvas canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.p360-room-preview > p { font-size: 12px; color: var(--muted); margin: 0; }
.p360-preview-tools { position: relative; }
.p360-preview-tools :is(.p360-preview-layers,.assembly-controls) { position: static; }
.p360-preview-layers > summary { cursor: pointer; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.p360-preview-layer-menu { position: absolute; z-index: 6; top: calc(100% + 6px); right: 0; width: 340px; max-width: 100%; max-height: 50dvh; overflow: auto; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 40px #18213924; }
.p360-preview-tools .assembly-menu { max-width: 100%; }
.p360-preview-tools :is(.btn,.p360-select-trigger,.p360-preview-layers > summary,.assembly-controls > summary) { min-height: 40px; padding: 9px 12px; font-size: 12px; line-height: 20px; box-sizing: border-box; }
.p360-preview-layer-menu details { border-top: 1px solid var(--line); padding: 6px 0; }
.p360-preview-layer-menu summary,.p360-preview-layer-menu label { display: flex; align-items: center; gap: 8px; }
.p360-preview-layer-menu label { flex: 1; min-width: 0; padding: 4px 0; font-size: 12px; }
.p360-preview-layer-menu input { width: 16px; height: 16px; flex: none; }
.p360-preview-layer-menu button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 5px 8px; border-radius: 6px; cursor: pointer; font-size: 11px; }
.p360-preview-layer-menu label button { margin-left: auto; }
.p360-preview-layer-actions { display: flex; justify-content: space-between; margin-bottom: 8px; }
.p360-module-back { margin-bottom: 14px; }
.demo-storage-info { position: relative; color: var(--muted); font-size: 11px; }
.demo-storage-info > summary { display: flex; align-items: center; gap: 6px; min-height: 36px; cursor: pointer; list-style: none; }
.demo-storage-info > summary::-webkit-details-marker { display: none; }
.demo-storage-info > summary .icon { width: 15px; color: var(--accent); }
.demo-storage-info > p { position: absolute; top: 100%; right: 0; z-index: 10; width: min(300px, 80vw); padding: 16px; margin: 4px 0 0; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 30px #10172720; font-size: 13px; line-height: 1.6; }
.sidebar .mobile-home { display: none; }
@media (max-width: 760px) {
  .topbar .breadcrumb { min-width: 0; }
  .topbar .breadcrumb b { overflow: hidden; text-overflow: ellipsis; }
  .topbar .breadcrumb .icon-btn { flex: none; }
  .demo-storage-info { position: static; }
  .demo-storage-info > summary { width: 40px; justify-content: center; }
  .demo-storage-info > summary > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .topbar .demo-storage-info > p { left: 10px; right: 10px; width: auto; max-width: 400px; margin: 4px 0 0 auto; max-height: calc(100dvh - 72px); overflow: auto; color: var(--text); }
  .sidebar .mobile-home { display: flex; }
}
.p360-editor-frame { width: 100%; height: 100%; border: 0; display: block; background: var(--surface); }
.p360-module-frame { height: max(650px, calc(100dvh - 250px)); min-width: 0; }
.p360-studio-window[open] { display: flex; flex-direction: column; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: var(--surface); }
.p360-studio-window iframe { display: block; border: 0; width: 100%; height: 100%; min-height: 0; flex: 1; }
.p360-window-head { flex: none; display: flex; justify-content: space-between; align-items: center; padding: 10px 24px; border-bottom: 1px solid var(--line); }
.p360-window-open { overflow: hidden; }
.room-grid:has(.p360-room-card) { grid-template-columns: repeat(auto-fit,minmax(min(100%,330px),1fr)); }
.p360-room-card { display: grid; grid-template-columns: 110px minmax(0, 1fr) 20px; padding: 18px; gap: 14px; align-items: center; }
.p360-room-card small { display: block; margin-top: 10px; font-size: 11px; color: var(--accent); }
.p360-room-card > .icon { color: var(--muted); }
.project-subnav .project-links { display: flex; gap: 8px; margin-left: auto; }
.p360-room-card .room-mini { width: 100%; height: 90px; }
.p360-room-card .room-mini svg { width: 100%; height: 100%; }
.p360-room-form { display: grid; gap: 16px; }
.p360-room-form label { display: grid; gap: 8px; }
.p360-album-rooms { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.p360-saved-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.p360-saved-shots article { padding: 0; overflow: hidden; }
.p360-saved-shots article > div { padding: 16px; }
.p360-saved-shots img { display: block; width: 100%; height: 220px; object-fit: contain; background: var(--surface-alt); }
.p360-saved-shots h3 { margin: 0 0 6px; }
.p360-saved-shots p { color: var(--muted); font-size: 12px; }
.p360-previous-shots { margin-top: 32px; }
.p360-previous-shots summary { cursor: pointer; padding-block: 16px; }
@media (max-width: 1150px) {
  .p360-room-viewbar { flex-wrap: wrap; }
  .p360-room-viewbar > span { display: none; }
  .p360-room-select { display: block; }
  .p360-plan-workspace { grid-template-columns: minmax(0, 1fr); }
  .p360-plan-workspace > .editor-layers { display: none; }
}
@media (max-width: 650px) {
  .p360-plan-workspace { height: calc(100dvh - 220px); min-height: 620px; }
  .p360-room-card { grid-template-columns: 70px minmax(0, 1fr) 18px; padding: 12px; gap: 10px; }
  .p360-room-viewbar > span { display: none; }
  .p360-window-head { padding: 10px; }
}
.p360-module-frame:has(iframe[src*="inline=1"]) { min-height: 400px; height: 600px; border: 0; border-radius: 0; background: transparent; overflow: visible; }
@media(max-width: 760px) { body:not(.menu-open) .sidebar { box-shadow: none; } }
@media (min-width: 761px) and (max-width: 1024px) {
  .workspace { display: block; }
  .workspace-body { width: 100%; }
  .sidebar { width: 224px; transform: translateX(-100%); transition: transform .2s; }
  .menu-open .sidebar { transform: translateX(0); }
  .menu-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: #17203360; z-index: 19; border: 0; }
  .mobile-menu { display: inline-flex; }
}
.p360-plan-workspace:has([data-room-plan][data-flowing=true]:not([hidden])) { height: auto; min-height: 0; }
.p360-room-content > .p360-plan-frame[data-flowing=true] { flex: none; }
@media (max-width: 760px) {
  .editor-heading { gap: 8px; margin-bottom: 10px; }
  .editor-heading .actions { gap: 6px; margin-left: 0; }
  .editor-heading .actions .btn { min-height: 34px; padding: 6px 9px; font-size: 11px; }
  .p360-room-viewbar { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); padding: 6px; gap: 6px; }
  .p360-room-views { min-width: 0; padding: 2px; gap: 2px; }
  .p360-room-views button { flex: 1; justify-content: center; min-width: 0; min-height: 32px; padding: 5px 6px; gap: 4px; font-size: 11px; white-space: nowrap; }
  .p360-room-views .icon { display: none; }
  .p360-room-viewbar > .p360-select { width: 100%; min-width: 0; }
  .p360-room-viewbar .p360-select-trigger { min-height: 34px; padding: 6px 8px; font-size: 12px; }
  .p360-module-back { margin-bottom: 8px; }
  .p360-plan-workspace { border-radius: 12px; }
  .p360-preview-layers { position: static; }
  .p360-preview-layer-menu { width: 100%; max-width: 100%; }
  .project-subnav { gap: 8px 12px; padding-block: 12px; margin-bottom: 16px; }
  .project-subnav .project-links { flex-basis: 100%; margin-left: 0; }
  .project-subnav .project-links .btn { flex: 1; justify-content: center; }
}
