/* Skyvra V3 release hardening.
   These overrides preserve the existing Skyvra project look while tightening
   layout behavior that caused blank bottom bands and fragile wire targets. */

html,
body,
#root {
  width: 100%;
  height: 100%;
}

body {
  overflow: hidden;
}

.projectsWorkspace,
.sharedShell,
.sharedShell .main {
  min-height: 100vh;
  height: 100vh;
}

.projectsBody {
  min-height: 0;
  height: calc(100vh - 58px);
}

.projectCanvasColumn,
.projectCanvasViewport {
  min-height: 0;
  height: 100%;
}

.projectCanvasViewport {
  background: #f7fcff;
}

.projectCanvasViewport.pcb {
  background: #0f7a46;
}

.projectWireLayer,
.projectPinLayer {
  overflow: visible;
}

.projectPinLayer .pinPadHit {
  fill: transparent;
  stroke: transparent;
  pointer-events: all;
}

.projectPinLayer .pinPad.wireMode .pinPadHit {
  cursor: crosshair;
}

.projectPartImage {
  object-fit: contain;
}

/* V3 recovery pass: restore the fuller project-tool feel without changing the
   Skyvra light workspace language. */
.projectTopBar {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-height: 70px;
  padding: 10px 16px !important;
}

.projectTopBar .projectNameInput {
  flex: 1 1 180px;
}

.projectTopBar .projectModeToggle {
  flex: 0 0 auto;
}

.projectTopBar button {
  white-space: nowrap;
}

.projectsBody {
  grid-template-columns: 76px minmax(270px, 320px) minmax(560px, 1fr) minmax(310px, 360px) !important;
}

.projectCanvasColumn {
  padding: 12px 14px 14px;
}

.projectToolBar {
  min-height: 50px;
  height: auto !important;
  gap: 7px !important;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: center;
  border-radius: 8px 8px 0 0;
  box-shadow: inset 0 -1px 0 #d8eaf7;
}

.projectToolBar::before {
  content: "";
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  background: url("/brand/skyvra-cloud-mascot.png") center / contain no-repeat;
}

.projectToolBar button {
  flex: 0 0 36px;
  width: 36px !important;
  min-width: 36px;
  min-height: 36px;
  border-radius: 7px !important;
  padding: 0 !important;
}

.projectToolBar button.active {
  background: #cfe7ff !important;
  box-shadow: inset 0 0 0 1px #88c7f7;
}

.toolHint {
  min-width: 180px;
  font-size: 12px !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zoomControls {
  flex: 0 0 auto;
}

.partsSearchRow input::placeholder {
  color: #6685a1;
}

.partsCatalogScroll {
  padding-right: 7px;
}

.catalogPartTile {
  min-height: 94px;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
}

.catalogThumb,
.catalogThumb.glyphThumb {
  width: 68px;
  height: 68px;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  overflow: visible !important;
}

.catalogThumb.glyphThumb img,
.catalogThumb img {
  max-width: 68px;
  max-height: 68px;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(15, 56, 92, .16));
}

.projectPartBody {
  background: transparent !important;
}

.projectPartBody.selected {
  outline: 3px solid #ffd166;
  outline-offset: 7px;
}

.projectPartName {
  max-width: 260px;
  font-size: 12px;
  top: calc(100% + 5px);
}

.projectPinLayer .pinPadHit {
  pointer-events: all;
}

.projectPinLayer .pinPadDot {
  stroke-width: 1.4;
}

.projectPinLayer .pinPad.wireMode .pinPadDot {
  stroke-width: 2;
}

.projectWirePath path:last-of-type {
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .85));
}

.projectAnnotation.line {
  border-radius: 999px;
}

.projectAiPanel {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  padding: 18px 16px 16px;
  background: linear-gradient(180deg, #eff9ff 0%, #eef8ff 72%, #f7fff9 100%);
}

.aiPanelHeader {
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.aiPanelHeader > button {
  margin-left: auto;
}

.aiModeRow {
  width: 100%;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.aiModeRow button {
  min-height: 28px !important;
  border-radius: 999px !important;
  padding: 0 10px !important;
  font-size: 12px;
}

.aiMascot {
  display: grid;
  justify-items: center;
  align-content: start;
  min-height: 310px;
  padding-top: 28px;
}

.aiMascot .skyvraCloud.cloudHero,
.aiMascot .skyvraCloud.cloudNav {
  width: 124px !important;
  height: 124px !important;
  margin: 0 auto 12px;
}

.aiMascot p {
  display: none;
}

.aiMascot::after {
  content: "Chat, simulation review, code, warnings, device checks, and project exports in one clean workspace.";
  white-space: pre-line;
  max-width: 260px;
  color: #92a7b8;
  font-size: 17px;
  line-height: 1.12;
  text-align: center;
}

.aiMascot::before {
  content: "Skyvra";
  order: 2;
  margin-top: 2px;
  color: #102a43;
  font-size: 42px;
  line-height: .96;
  font-weight: 900;
  letter-spacing: 0;
}

.aiMascot .skyvraCloud {
  order: 1;
}

.aiMascot::after {
  order: 3;
}

.projectAiMessages {
  padding-right: 4px;
}

.aiMsg {
  border: 1px solid #d6e8f5;
  border-radius: 10px;
  background: #ffffffc9;
  padding: 9px 10px;
}

.aiMsg.user {
  background: #eaf4ff;
}

.projectAiInput {
  min-height: 150px;
  grid-template-columns: 48px minmax(0, 1fr) 52px;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 56, 92, .08);
}

.projectAiInput textarea {
  min-height: 112px !important;
  border: 0 !important;
  resize: none !important;
  text-align: center;
  font-size: 18px;
  color: #12324f;
}

.projectAiInput textarea::placeholder {
  color: #aebdcc;
}

.projectAiInput label,
.projectAiInput button {
  width: 46px !important;
  height: 46px !important;
  min-height: 46px !important;
  border-radius: 12px !important;
}

.projectAiInput button {
  background: #22a8f5 !important;
  color: #fff !important;
}
