/* ServiceLane 2D CAD controls. The sample selector is intentionally unavailable. */
.file-sidebar-column {
  display: none !important;
}

.sl-cad-tool {
  min-width: 34px;
}

.sl-cad-tool .ml-ex-ui-icon,
.ml-ex-ui-toolbar-btn .sl-tape-measure-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sl-abc-icon {
  min-width: 24px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.sl-ortho.is-active {
  border-color: #60a5fa !important;
  background: #2563eb !important;
  color: #ffffff !important;
}

@media (max-width: 760px) {
  .sl-cad-tool {
    min-width: 32px;
  }

  .sl-abc-icon {
    font-size: 8px;
  }
}

/* Clear, labelled primary controls */
#devToolbar {
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: thin;
}

#devToolbar .dev-toolbar-menu-wrap[hidden] {
  display: none !important;
}

#devToolbar .sl-top-tool {
  font-weight: 650;
  white-space: nowrap;
}

#devToolbar .sl-units-button {
  border-color: #4169e1;
  background: #eff6ff;
  color: #1e3a8a;
}

#devToolbar .sl-units-button.is-unknown {
  border-color: #f59e0b;
  background: #fff7ed;
  color: #9a3412;
}

.sl-units-panel {
  position: fixed;
  z-index: 1700;
  top: 58px;
  right: 16px;
  box-sizing: border-box;
  width: min(360px, calc(100vw - 24px));
  border: 2px solid #4169e1;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  padding: 0.85rem;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.sl-units-panel[hidden] {
  display: none !important;
}

.sl-units-panel strong {
  display: block;
  color: #234d73;
  font-size: 1rem;
}

.sl-units-panel p {
  margin: 0.45rem 0 0.7rem;
  color: #9a3412;
  line-height: 1.4;
}

.sl-units-panel div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.sl-units-panel button {
  border: 1px solid #4169e1;
  border-radius: 9px;
  background: #4169e1;
  color: #ffffff;
  padding: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}

.sl-units-panel small {
  display: block;
  margin-top: 0.65rem;
  color: #64748b;
  line-height: 1.35;
}

#devToolbar .sl-max-top-button {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  margin-left: auto;
  border-color: #38bdf8;
  background: #0c4a6e;
}

.sl-max-top-button img {
  width: 23px;
  height: 23px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 36%;
}

/* Branded empty drawing state */
.sl-empty-card {
  pointer-events: auto;
  box-sizing: border-box;
  width: min(500px, calc(100vw - 36px));
  max-width: calc(100% - 24px);
  max-height: calc(100% - 24px);
  overflow-y: auto;
  padding: 1.75rem 1.5rem 1.55rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  color: #0f172a;
  text-align: center;
  box-shadow: 0 22px 65px rgba(0, 0, 0, 0.5);
}

.sl-empty-home {
  display: inline-block;
  border-radius: 8px;
}

.sl-empty-home:focus-visible {
  outline: 3px solid #4169e1;
  outline-offset: 4px;
}

.sl-empty-logo {
  display: block;
  width: min(300px, 74%);
  height: auto;
  margin: 0 auto 0.8rem;
}

.sl-empty-kicker {
  margin: 0;
  color: #234d73;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.sl-empty-card > p {
  margin: 0.55rem 0 1.1rem;
  color: #475569;
  line-height: 1.45;
}

.sl-empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.sl-seo-details {
  margin-top: 1rem;
  border-top: 1px solid #cbd5e1;
  padding-top: 0.75rem;
  text-align: left;
}

.sl-seo-details summary {
  color: #234d73;
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.sl-seo-copy {
  margin-top: 0.85rem;
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.5;
}

.sl-seo-copy h2 {
  margin: 0.9rem 0 0.35rem;
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.3;
}

.sl-seo-copy h3 {
  margin: 0.75rem 0 0.2rem;
  color: #234d73;
  font-size: 0.9rem;
  line-height: 1.35;
}

.sl-seo-copy p {
  margin: 0 0 0.55rem;
  color: #475569;
}

.sl-seo-copy ol {
  margin: 0.3rem 0 0.65rem 1.25rem;
}

.sl-seo-copy li + li {
  margin-top: 0.25rem;
}

.sl-review-note {
  border-left: 3px solid #f59e0b;
  padding-left: 0.65rem;
  color: #334155 !important;
  font-weight: 650;
}

.sl-sample-button {
  pointer-events: auto;
  border: 1px solid #234d73;
  border-radius: 10px;
  background: #ffffff;
  color: #234d73;
  padding: 0.7rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.sl-sample-button:hover:not(:disabled) {
  background: #eaf2f8;
}

/* Max assistant */
body.sl-max-docked .app-shell {
  width: calc(100vw - 360px) !important;
  max-width: calc(100vw - 360px);
  flex: 0 0 calc(100vw - 360px);
  transition: width 160ms ease;
}

body.sl-max-docked #viewerPane {
  min-width: 0;
}

.sl-max-panel {
  position: fixed;
  z-index: 1000;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: 350px;
  overflow: hidden;
  border-left: 1px solid #334155;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.34);
  transition: width 160ms ease, height 160ms ease, transform 160ms ease;
}

.sl-max-panel.is-compact {
  top: auto;
  right: 12px;
  bottom: 12px;
  width: min(330px, calc(100vw - 24px));
  height: 214px;
  border: 1px solid #334155;
  border-radius: 14px;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.48);
}

.sl-max-panel[hidden] {
  display: none !important;
}

.sl-max-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem;
  background: linear-gradient(135deg, #0f172a, #0c4a6e);
  color: #ffffff;
}

.sl-max-header img {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  object-fit: cover;
  object-position: center 36%;
}

.sl-max-header div {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.sl-max-header strong {
  font-size: 1.12rem;
}

.sl-max-header span {
  margin-top: 0.08rem;
  font-size: 0.78rem;
  color: #bae6fd;
}

.sl-max-header button {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 1.1rem;
  cursor: pointer;
}

.sl-max-panel.is-full #slMaxExpand,
.sl-max-panel.is-compact #slMaxMinimize {
  display: none;
}

.sl-max-panel.is-compact .sl-max-header {
  padding: 0.48rem 0.58rem;
}

.sl-max-panel.is-compact .sl-max-header img {
  width: 34px;
  height: 34px;
}

.sl-max-panel.is-compact .sl-max-header span,
.sl-max-panel.is-compact .sl-max-privacy,
.sl-max-panel.is-compact .sl-max-prompts,
.sl-max-panel.is-compact .sl-max-status {
  display: none;
}

.sl-max-panel.is-compact .sl-max-chat {
  min-height: 54px;
  padding: 0.45rem 0.6rem 0;
}

.sl-max-panel.is-compact .sl-max-message {
  display: none;
  max-width: 100%;
  margin-bottom: 0.35rem;
  padding: 0.4rem 0.52rem;
  font-size: 0.78rem;
}

.sl-max-panel.is-compact .sl-max-message:last-child {
  display: block;
}

.sl-max-panel.is-compact .sl-max-form {
  padding: 0.45rem 0.6rem 0.55rem;
}

.sl-max-panel.is-compact .sl-max-form label {
  display: none;
}

.sl-max-privacy {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #cbd5e1;
  background: #e0f2fe;
  color: #0c4a6e;
  font-size: 0.74rem;
  line-height: 1.35;
}

.sl-max-chat {
  flex: 1;
  min-height: 130px;
  overflow-y: auto;
  padding: 0.8rem;
}

.sl-max-message {
  width: fit-content;
  max-width: 88%;
  margin-bottom: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.4;
  white-space: pre-wrap;
}

.sl-max-message.is-max {
  border: 1px solid #cbd5e1;
  background: #ffffff;
}

.sl-max-message.is-user {
  margin-left: auto;
  background: #234d73;
  color: #ffffff;
}

.sl-max-show-me {
  display: block;
  margin-top: 0.55rem;
  border: 0;
  border-radius: 8px;
  background: #0c4a6e;
  color: #ffffff;
  padding: 0.42rem 0.68rem;
  font-weight: 800;
  cursor: pointer;
}

.sl-max-prompts {
  display: flex;
  gap: 0.4rem;
  padding: 0 0.75rem 0.65rem;
  overflow-x: auto;
}

.sl-max-prompts button {
  flex: 0 0 auto;
  border: 1px solid #94a3b8;
  border-radius: 999px;
  background: #ffffff;
  color: #234d73;
  padding: 0.38rem 0.62rem;
  font-size: 0.72rem;
  cursor: pointer;
}

.sl-max-form {
  padding: 0.7rem 0.75rem;
  border-top: 1px solid #cbd5e1;
  background: #ffffff;
}

.sl-max-form label {
  display: block;
  margin-bottom: 0.35rem;
  color: #475569;
  font-size: 0.74rem;
  font-weight: 700;
}

.sl-max-form > div {
  display: flex;
  gap: 0.45rem;
}

.sl-max-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  padding: 0.62rem 0.68rem;
  font: inherit;
}

.sl-max-form button {
  border: 0;
  border-radius: 8px;
  background: #c8282f;
  color: #ffffff;
  padding: 0.62rem 0.85rem;
  font-weight: 800;
  cursor: pointer;
}

.sl-max-form button:disabled,
.sl-max-form input:disabled {
  opacity: 0.55;
}

.sl-max-status {
  padding: 0.38rem 0.75rem 0.2rem;
  background: #ffffff;
  color: #64748b;
  font-size: 0.68rem;
}

.sl-guide-spotlight {
  position: fixed;
  z-index: 1800;
  pointer-events: none;
  border: 3px solid #ffd84d;
  border-radius: 10px;
  box-shadow: 0 0 0 4px rgba(65, 105, 225, 0.9), 0 0 0 9999px rgba(2, 6, 23, 0.34);
  animation: sl-guide-pulse 1.25s ease-in-out infinite;
  transition: all 180ms ease;
}

@keyframes sl-guide-pulse {
  50% { box-shadow: 0 0 0 7px rgba(65, 105, 225, 0.72), 0 0 0 9999px rgba(2, 6, 23, 0.34); }
}

.sl-guide-card {
  position: fixed;
  z-index: 1801;
  box-sizing: border-box;
  border: 2px solid #4169e1;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  padding: 0.75rem;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
}

.sl-guide-card strong {
  color: #234d73;
}

.sl-guide-card p {
  margin: 0.45rem 0 0.7rem;
  line-height: 1.38;
}

.sl-guide-card > div {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
}

.sl-guide-card button {
  border: 1px solid #94a3b8;
  border-radius: 7px;
  background: #ffffff;
  color: #234d73;
  padding: 0.4rem 0.66rem;
  font-weight: 750;
  cursor: pointer;
}

.sl-guide-card #slGuideNext {
  border-color: #4169e1;
  background: #4169e1;
  color: #ffffff;
}

@media (max-width: 760px) {
  #devToolbar {
    display: flex !important;
    flex-wrap: nowrap;
    gap: 0.35rem;
  }

  #devToolbar .sl-max-top-button {
    margin-left: 0;
  }

  body.sl-max-docked .app-shell {
    width: 100vw;
  }

  .sl-max-panel.is-full {
    inset: 54px 0 0 0;
    width: auto;
    border-radius: 0;
  }

  .sl-max-panel.is-compact {
    inset: auto 8px 8px auto;
    width: min(330px, calc(100vw - 16px));
    height: 214px;
    border-radius: 14px;
  }

  .sl-empty-card {
    width: calc(100vw - 24px);
    max-width: calc(100% - 16px);
    padding: 1rem;
  }

  .sl-empty-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .sl-empty-actions button {
    width: 100%;
  }

  .sl-empty-logo {
    width: min(255px, 78%);
  }
}
