/* === BASE === */
body {
  margin: 0;
  font-family: sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding: 16px 12px 24px;
  box-sizing: border-box;
  background: #f4f4f4;
}

/* === ROTATION BUTTONS === */
#rotation-controls {
  margin: 16px 0 8px;
  display: flex;
  gap: 10px;
}

/* === T6 CONTROL BUTTONS === */
#t6-controls {
  margin: 8px 0 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* === SVG WHEEL === */
#dim-wheel {
  background: white;
  border: 2px solid #aaa;
  border-radius: 50%;
  transform-origin: center center; /* matches TRANSFORM_ORIGIN in main.js */
}

.wheel-viewport {
  width: 600px;
  height: 600px;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
}

/* Wider viewport used for zoomed-in state */
.wheel-viewport.zoomed {
  width: 900px;
  height: 250px;
}

#info-panel {
  display: none;
  width: 900px;
  height: 1500px; /* Info panel height increased to show full overlay data without constant scrolling */
  overflow: auto;
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1.4;
  border: 1px solid #ccc;
  padding: 8px;
  background: #fff;
}


#info-panel .info-location {
  font-weight: bold;
  margin-bottom: 10px;
}

.bim-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.bim-card-title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
}

.bim-field {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 6px;
  font-size: 14px;
  margin-bottom: 4px;
}

.bim-label {
  font-weight: 600;
  opacity: 0.75;
}

.bim-value {
  font-weight: 400;
}

.wheel-viewport.zoomed + #info-panel {
  display: block;
}

/* === BUTTON STYLE === */
button {
  padding: 6px 12px;
  font-size: 1rem;
  border: 1px solid #888;
  background-color: #fff;
  cursor: pointer;
}

button:hover {
  background-color: #eee;
}

button.active {
  background-color: #ddd;
  border-color: #555;
}

.hidden {
  display: none !important;
}

#mobile-view {
  /* MOBILE SHELL SIZE HOOK: adjust max-width / width here for phone fit */
  width: min(100%, 520px);
  margin: 12px auto 0;
  padding: 8px;
  border: 1px solid #cfd3da;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  background: linear-gradient(180deg, #f6f8fc 0%, #fdfefe 100%);
  font-size: 0.96rem;
  box-sizing: border-box;
  color: #333;
}

.mobile-shell {
  --mobile-instinct-base: #68afe3;
  --mobile-instinct-grad-start: #edf4fb;
  --mobile-instinct-grad-end: #f8fbfe;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: 10px;
  padding: 6px;
  background: linear-gradient(
    180deg,
    var(--mobile-instinct-grad-start) 0%,
    var(--mobile-instinct-grad-end) 100%
  );
}

.mobile-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: stretch;
}

.mobile-topbar-meta {
  display: grid;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--mobile-instinct-base) 35%, #c7d4e6 65%);
  border-radius: 10px;
  background: color-mix(in srgb, var(--mobile-instinct-grad-end) 88%, #ffffff 12%);
  padding: 8px;
}

.mobile-meta-item {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  row-gap: 0;
}

.mobile-meta-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #45516b;
  font-weight: 700;
  white-space: nowrap;
}

.mobile-meta-value {
  font-weight: 700;
  color: #1f2a44;
}

.mobile-meta-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid #c3cad8;
  border-radius: 7px;
  background: #fff;
  color: #1f2a44;
  padding: 5px 8px;
  font-size: 0.88rem;
  font-weight: 600;
}

.mobile-meta-select:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 1px;
}

.mobile-nav-lane {
  display: flex;
  flex-direction: column;
  border: 1px solid color-mix(in srgb, var(--mobile-instinct-base) 35%, #c7d4e6 65%);
  border-radius: 10px;
  background: color-mix(in srgb, var(--mobile-instinct-grad-end) 88%, #ffffff 12%);
  padding: 5px;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.mobile-nav-gap {
  flex: 1 1 auto;
  min-height: 4px;
  pointer-events: none;
}

.mobile-nav-btn {
  width: 100%;
  min-height: 28px;
  padding: 2px 0;
  font-size: 0.94rem;
  line-height: 1;
  border: 1px solid color-mix(in srgb, var(--mobile-instinct-base) 35%, #8fa5c4 65%);
  border-radius: 8px;
  background: color-mix(in srgb, var(--mobile-instinct-grad-start) 35%, #ffffff 65%);
}

.mobile-nav-btn:active {
  background: color-mix(in srgb, var(--mobile-instinct-base) 16%, #ffffff 84%);
}

.mobile-nav-btn-up {
  align-self: start;
}

.mobile-nav-btn-down {
  align-self: end;
}

.mobile-report {
  display: grid;
  gap: 10px;
}

#mobile-view .bim-card {
  margin-bottom: 0;
  border: 1px solid #e6ebf3;
  border-radius: 10px;
  padding: 12px;
  background: #ffffff;
}

#mobile-view .bim-card-title {
  font-size: 15px;
  margin-bottom: 7px;
}

#mobile-view .bim-field {
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 6px;
}

#mobile-view .bim-label {
  font-size: 12px;
}

#mobile-view .bim-value {
  font-size: 13px;
  line-height: 1.35;
}

@media (min-width: 620px) {
  #mobile-view {
    width: min(100%, 560px);
    padding: 12px;
  }

  .mobile-nav-btn {
    min-height: 34px;
  }
}
