@import url("../compare.css");
:root {
  font-family: Arial, sans-serif;
  color: #263c32;
  background: #f6f5ef;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  height: 76px;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid #d9ded4;
}
header a {
  font-size: 11px;
  letter-spacing: 0.12em;
}
h1 {
  font-size: 25px;
  margin: 0;
  font-weight: 500;
}
h2 {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 16px;
}
h3 {
  font-size: 14px;
  margin: 20px 0 8px;
}
a {
  color: inherit;
}
button,
input,
select,
textarea {
  font: inherit;
  border: 1px solid #ccd2c8;
  border-radius: 4px;
  padding: 9px;
  background: #fff;
  color: #263c32;
  min-height: 38px;
}
button {
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover {
  background: #e3e9df;
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
.primary,
.active {
  background: #285d4b;
  color: white;
}
button.primary:hover {
  background: #39745e;
}
input,
select,
textarea {
  max-width: 100%;
  width: 100%;
}
input[type="checkbox"] {
  width: auto;
  min-height: 0;
}
label {
  display: block;
  font-size: 12px;
  margin: 10px 0;
}
label input,
label select {
  margin-top: 5px;
}
header #save-status {
  margin-left: auto;
  font-size: 12px;
}
.topbar {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 10px 18px;
  border-bottom: 1px solid #d9ded4;
  flex-wrap: wrap;
}
.topbar input {
  width: 200px;
}
.topbar select {
  width: 210px;
}
main {
  display: grid;
  grid-template-columns: 270px minmax(300px, 1fr) 290px;
  height: calc(100dvh - 145px);
  min-height: 540px;
  max-width: none;
  margin: 0;
  padding: 0;
  gap: 0;
}
aside {
  padding: 20px;
  overflow: auto;
  background: #fafaf6;
  border-radius: 0;
  border: 0;
}
#catalogue {
  border-right: 1px solid #d9ded4;
}
#inspector {
  border-left: 1px solid #d9ded4;
}
.panel-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.muted,
small {
  color: #657166;
  font-size: 12px;
  line-height: 1.6;
}
details {
  margin: 12px 0;
  border-bottom: 1px solid #ddd;
  padding-bottom: 12px;
}
summary {
  cursor: pointer;
}
#category {
  margin-top: 8px;
}
.product {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  text-align: left;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #ddd;
  border-radius: 0;
  background: transparent;
  padding: 16px 0;
  min-height: 110px;
}
.product img {
  width: 58px;
  height: 62px;
  object-fit: contain;
}
.product strong {
  display: block;
  font-size: 13px;
  line-height: 1.4;
}
.product small {
  display: block;
}
.product .price {
  display: block;
  margin-top: 5px;
  font-weight: bold;
}
.fit {
  font-size: 10px;
  letter-spacing: 0.05em;
  color: #32725b;
}
.bad {
  color: #a9442d;
}
#workspace {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #e8e8df;
}
.viewbar {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  z-index: 2;
}
.viewbar button {
  font-size: 12px;
  padding: 8px;
}
#canvas {
  position: relative;
  flex: 1;
  min-height: 380px;
  overflow: hidden;
}
#canvas canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.scene-caption {
  padding: 12px 20px;
  background: #f2f2eacc;
  display: grid;
  gap: 5px;
  font-size: 11px;
}
.scene-caption strong {
  font-size: 14px;
}
#notice {
  position: absolute;
  bottom: 100px;
  left: 20px;
  right: 20px;
  background: #fffdf0;
  padding: 12px;
  box-shadow: 0 3px 14px #0001;
  display: none;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10px;
}
.actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.total {
  font-size: 28px;
  padding: 15px 0;
  border-top: 1px solid #ccc;
}
.warning {
  color: #93442d;
  background: #fff3e8;
  padding: 10px;
  font-size: 12px;
  line-height: 1.5;
  margin: 8px 0;
}
.line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 12px;
}
dialog {
  border: 1px solid #ccd2c8;
  border-radius: 8px;
  width: min(980px, 95vw);
  max-height: 90dvh;
  padding: 24px;
  color: #263c32;
  background: #fafaf6;
}
dialog::backdrop {
  background: #142b2366;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}
.modal-head h2 {
  margin: 0;
}
#modal-body {
  margin-top: 20px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}
th,
td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}
#modal-body {
  overflow-x: auto;
}
.mobile-tabs {
  display: none;
}
textarea {
  min-height: 80px;
}
.swatch {
  height: 60px;
  background: #d4d8cf;
  border-radius: 4px;
}
.surface-select {
  margin: 10px 0;
}
.dimensions {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #ba853d;
  outline-offset: 2px;
}
@media (max-width: 1150px) {
  main {
    grid-template-columns: 230px minmax(280px, 1fr) 250px;
    height: calc(100dvh - 195px);
  }
  aside {
    padding: 14px;
  }
  .topbar {
    padding: 8px;
  }
  .topbar button {
    font-size: 12px;
  }
}
@media (max-width: 800px) {
  header {
    height: 65px;
    padding: 10px 14px;
    gap: 14px;
  }
  header a {
    font-size: 9px;
  }
  h1 {
    font-size: 19px;
  }
  header #save-status {
    display: none;
  }
  .topbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    height: 54px;
  }
  .topbar > * {
    flex-shrink: 0;
  }
  .topbar input {
    width: 150px;
  }
  .topbar select {
    width: 170px;
  }
  main {
    display: block;
    height: calc(100dvh - 175px);
    min-height: 0;
  }
  main > aside,
  main > #workspace {
    height: 100%;
    display: none;
  }
  main > #workspace {
    display: flex;
  }
  body[data-panel="catalogue"] main > #workspace,
  body[data-panel="inspector"] main > #workspace {
    display: none;
  }
  body[data-panel="catalogue"] #catalogue,
  body[data-panel="inspector"] #inspector {
    display: block;
  }
  #canvas {
    min-height: 200px;
  }
  .mobile-tabs {
    height: 56px;
    display: flex;
    justify-content: space-around;
    background: #f8f8f2;
    padding: 6px;
    border-top: 1px solid #ccc;
  }
  .mobile-tabs button {
    width: 30%;
  }
  .viewbar {
    left: 8px;
    right: 8px;
    gap: 3px;
  }
  .viewbar button {
    font-size: 11px;
    padding: 6px;
  }
  .scene-caption {
    font-size: 10px;
  }
  .product {
    grid-template-columns: 70px 1fr;
  }
  .fields {
    grid-template-columns: 1fr 1fr;
  }
}
@media print {
  body > header,
  .topbar,
  main,
  .mobile-tabs,
  .modal-head button,
  .export-actions {
    display: none !important;
  }
  dialog {
    position: static;
    max-width: none;
    width: 100%;
    max-height: none;
    border: 0;
    padding: 0;
  }
  dialog::backdrop {
    display: none;
  }
  #modal-body {
    overflow: visible;
  }
  a {
    overflow-wrap: anywhere;
  }
  th,
  td {
    padding: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

.delete-fixture {
  justify-self: start;
  background: #fff3eb;
  color: #923e29;
  border-color: #c99885;
  font-weight: 600;
  min-height: 44px;
}
.delete-fixture[hidden] {
  display: none;
}

#selection-actions[hidden] {
  display: none;
}
.ai-photo {
  display: block;
  width: 100%;
  max-height: 65vh;
  object-fit: contain;
  margin: 12px 0;
}

.supplier-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.supplier-results .product {
  grid-template-columns: 84px 1fr;
  align-items: start;
}
.supplier-results .product img {
  width: 84px;
  height: 90px;
}
.panel-head {
  gap: 8px;
}
@media (max-width: 800px) {
  .supplier-results {
    grid-template-columns: 1fr;
  }
}
