/*
 * KI host theme overrides
 *
 * Bright showroom viewport with a right-side commerce/options panel.
 */

:host {
  --vtx-ki-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --bg: #ffffff;
  --surface: #f4f4f4;
  --surface2: #ffffff;
  --border: #e5e7eb;
  --text: #414b57;
  --text2: #6b7280;
  --accent: #ef4138;
  --accent-fg: #ffffff;
  --chrome: #ffffff;
  --chrome-b: #e5e7eb;
  --resize-bg: transparent;
  --resize-bgh: rgba(239, 65, 56, 0.18);
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --vtx-viewport3-bg: #ffffff;
  --vtx-viewport3-accent: #4b5563;
  --vtx-viewport3-accent-bg: rgba(75, 85, 99, 0.12);
  --vtx-viewport3-accent-bg-lt: rgba(75, 85, 99, 0.1);
  --vtx-viewport3-retail-surface: #f1f1f1;
  --vtx-viewport3-retail-surface-border: transparent;
  --vtx-viewport3-retail-shadow: none;
  --vtx-ctx-accent: #ef4138;
  --vtx-tab-color: #2e2e31;
  --vtx-tab-fg: #ffffff;
}

.vtx-host-wrap,
#workspace,
#viewport-wrap,
#viewport-mount,
.vtx-viewport3,
.vtx-viewport3-viewport,
.vtx-viewer-state {
  background: #ffffff !important;
  font-family: var(--vtx-ki-font-family);
}

#viewport-wrap {
  min-width: 52%;
}

.sidebar.side-left {
  display: none !important;
}

.sidebar.side-right {
  --sidebar-w: 560px !important;
  min-width: 420px;
  max-width: min(560px, 42vw);
  background: #f4f4f4;
  border-left: none;
  box-shadow: none !important;
}

.sidebar.sidebar-overlay.side-right {
  width: min(var(--sidebar-w, 560px), 42vw);
  max-width: min(600px, calc(100% - 64px));
  box-shadow: none !important;
}

.sidebar.side-right.collapsed {
  transform: translateX(calc(100% + 16px));
}

.sidebar.side-right .resize-handle,
.sidebar.side-right .panel-grip,
.sidebar.side-right .panel-icon-btn,
.collapse-tab.side-left {
  display: none !important;
}

.sidebar.side-right .panel-header {
  display: none !important;
}

.vtx-ki-summary {
  flex: 0 0 auto;
  min-height: 92px;
  display: flex;
  align-items: center;
  padding: 22px 28px;
  background: #2d2d2f;
  color: #ffffff;
}

.vtx-ki-summary-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vtx-ki-summary-metric span {
  color: #b8d6ee;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.07em;
  line-height: 1.1;
  text-transform: uppercase;
}

.vtx-ki-summary-metric strong {
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.05;
}

.vtx-ki-share {
  appearance: none;
  width: 100%;
  min-height: 48px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 1px 42px;
  align-items: center;
  gap: 10px;
  padding: 0 0 0 18px;
  border: 1px solid #e4e4e4;
  border-radius: 2px;
  background: #ffffff;
  color: #777d84;
  font: 400 16px/1 var(--vtx-ki-font-family);
  cursor: pointer;
  white-space: nowrap;
  text-align: left;
}

.vtx-ki-share-wrap {
  position: relative;
  width: 100%;
}

.vtx-ki-share-divider {
  align-self: stretch;
  width: 1px;
  background: #e0e0e0;
  margin: 0;
}

.vtx-ki-share svg:last-child {
  justify-self: center;
}

.vtx-ki-share-wrap.vtx-open .vtx-ki-share-caret {
  transform: rotate(180deg);
}

.vtx-ki-share-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  display: none;
  flex-direction: column;
  border: 1px solid #e4e4e4;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}

.vtx-ki-share-wrap.vtx-open .vtx-ki-share-menu {
  display: flex;
}

.vtx-ki-share-menu button {
  appearance: none;
  min-height: 42px;
  padding: 0 18px;
  border: none;
  border-bottom: 1px solid #ececec;
  background: #ffffff;
  color: #4f5b66;
  font: 400 14px/1.2 var(--vtx-ki-font-family);
  text-align: left;
  cursor: pointer;
}

.vtx-ki-share-menu button:last-child {
  border-bottom: none;
}

.vtx-ki-share-menu button:hover {
  background: #f7f7f7;
  color: #2d2d2f;
}

.panel-body {
  --vtx-expanders-primary: #ef4138;
  --vtx-expanders-primary-strong: #d92e26;
  --vtx-expanders-paper: #ffffff;
  --vtx-expanders-divider: #e6e8eb;
  --vtx-expanders-hover: #fbfbfb;
  --vtx-expanders-action-hover: #f7f7f7;
  --vtx-expanders-action-selected: #f1f1f1;
  --vtx-expanders-text-primary: #465260;
  --vtx-expanders-text-secondary: #606b76;
  --vtx-expanders-text-disabled: #aeb5bd;
  --vtx-expanders-search-bg: #ffffff;
  --vtx-expanders-search-border: #d8dce1;
  --vtx-shader-tip-bg: #2f2f31;
  --vtx-shader-tip-color: #ffffff;
  --vtx-shader-tip-border: #2f2f31;
  padding: 28px 28px 34px;
  background: #f5f5f5;
}

.vtx-expanders {
  gap: 10px;
  font-family: var(--vtx-ki-font-family);
}

.vtx-expanders-scroll {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vtx-expanders-group {
  flex: 0 0 auto;
  overflow: visible;
  border-radius: 3px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.vtx-expanders-header {
  min-height: 76px;
  padding: 18px 40px 16px 22px;
  border-bottom: none;
  background: #ffffff;
}

.vtx-expanders-header:hover {
  background: #ffffff;
}

.vtx-expanders-header-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: baseline;
}

.vtx-expanders-header-label {
  color: #465260;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.12;
}

.vtx-expanders-group:first-child .vtx-expanders-header-label {
  color: #ef4138;
}

.vtx-expanders-header-selected {
  color: #4f5b66;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.3;
}

.vtx-expanders-header-selected:not(:empty)::before {
  content: none;
}

.vtx-expanders-chevron {
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 999px;
  color: #8b949e;
  box-sizing: border-box;
}

.vtx-expanders-header-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  margin-left: 7px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f0f1f2;
  color: #8a929b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  vertical-align: 2px;
}

.vtx-expanders-header[aria-expanded="true"] .vtx-expanders-chevron {
  color: #9da4ac;
  background: #ffffff;
  box-shadow:
    0 0 0 1px #edf0f2,
    0 1px 4px rgba(15, 23, 42, 0.08);
}

.vtx-expanders-content {
  flex-flow: row wrap;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 22px 22px;
  background: #ffffff;
}

.vtx-expanders-option-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
}

.vtx-expanders-color-option {
  flex: 1 1 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 12px;
}

.vtx-expanders-content .vtx-expanders-color-option {
  margin-top: 0;
}

.vtx-expanders-color-option > .vtx-expanders-option {
  min-width: 0;
  min-height: auto;
  justify-content: flex-start;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.vtx-expanders-color-option > .vtx-expanders-option .vtx-expanders-option-label {
  font-size: 15px;
  color: #4f5b66;
}

.vtx-expanders-color-option > .vtx-expanders-option .vtx-expanders-option-swatch {
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border-radius: 999px;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: none;
}

.vtx-expanders-color-picker-shell {
  align-items: stretch;
  gap: 18px;
}

.vtx-expanders-color-picker-tabs {
  display: flex;
  align-items: flex-end;
  gap: 38px;
  border-bottom: 2px solid #eeeeee;
}

.vtx-expanders-color-picker-tab {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 0 12px;
  border: none;
  background: transparent;
  color: #465260;
  font: 700 14px/1 var(--vtx-ki-font-family);
  cursor: pointer;
}

.vtx-expanders-color-picker-tab.vtx-expanders-selected::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  background: #2f2f31;
}

.vtx-expanders-color-picker-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f0f1f2;
  color: #7a828a;
  font-size: 12px;
  font-weight: 700;
}

.vtx-expanders-color-picker-controls {
  width: 100%;
  grid-template-areas: "input";
  grid-template-columns: 1fr;
  margin: 0;
}

.vtx-expanders-color-picker-input-wrap {
  position: relative;
}

.vtx-expanders-color-picker-input-wrap::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  width: 14px;
  height: 14px;
  border: 2px solid #8a929b;
  border-radius: 999px;
  transform: translateY(-55%);
  pointer-events: none;
}

.vtx-expanders-color-picker-input-wrap::after {
  content: "";
  position: absolute;
  left: 31px;
  top: 50%;
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: #8a929b;
  transform: translateY(5px) rotate(45deg);
  transform-origin: left center;
  pointer-events: none;
}

.vtx-expanders-color-picker-input {
  width: 100%;
  min-height: 46px;
  padding: 0 18px 0 52px;
  border: 2px solid #d8d8d8;
  border-radius: 2px;
  color: #4f5b66;
  background: #ffffff;
  font-family: var(--vtx-ki-font-family);
  font-size: 15px;
  font-weight: 400;
  text-align: left;
  text-transform: none;
}

.vtx-expanders-color-picker-input::placeholder {
  color: #7b838c;
}

.vtx-expanders-color-picker-slider-block {
  display: none;
}

.vtx-expanders-color-picker-grid {
  width: 100%;
  max-height: 640px;
  grid-template-columns: repeat(10, 30px);
  gap: 14px 17px;
  justify-content: start;
  align-self: stretch;
  overflow-y: auto;
  padding: 4px 18px 4px 4px;
  margin: 0;
}

.vtx-expanders-color-picker-grid::-webkit-scrollbar {
  width: 12px;
}

.vtx-expanders-color-picker-grid::-webkit-scrollbar-track {
  background: #f2f2f2;
  border-radius: 999px;
}

.vtx-expanders-color-picker-grid::-webkit-scrollbar-thumb {
  background: #b9b9b9;
  border-radius: 999px;
}

.vtx-expanders-color-picker-cell {
  width: 30px;
  height: 30px;
  aspect-ratio: 1;
  border-radius: 999px;
  overflow: visible;
}

.vtx-expanders-color-picker-cell::before {
  border-radius: 999px;
  opacity: 1;
  box-shadow: none;
}

.vtx-expanders-color-picker-cell:hover::before {
  transform: scale(1.05);
  box-shadow: none;
}

.vtx-expanders-color-picker-cell.vtx-expanders-selected::before {
  transform: scale(1);
  box-shadow:
    0 0 0 4px #ffffff,
    0 0 0 7px #6f7378;
}

.vtx-expanders-option {
  flex: 0 1 auto;
  min-width: min(150px, 100%);
  min-height: 38px;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid #e8e8e8;
  border-radius: 2px;
  background: #ffffff;
}

.vtx-expanders-option:hover {
  border-color: #9ca3af;
}

.vtx-expanders-option.vtx-expanders-selected {
  border-color: #555b61;
  box-shadow: inset 0 0 0 1px #555b61;
}

.vtx-expanders-option-label {
  color: #6f7780;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
}

.vtx-expanders-option.vtx-expanders-selected .vtx-expanders-option-label {
  color: #39424c;
}

.vtx-expanders-option-check {
  display: none !important;
}

.vtx-expanders-option-swatch,
.vtx-exp-ctx-swatch-thumb {
  border-radius: 999px;
}

.vtx-expanders-shader-group-wrap {
  flex: 1 1 100%;
  gap: 16px;
  margin-top: 16px;
}

.vtx-expanders-search-wrap,
.vtx-expanders-slider-wrap,
.vtx-expanders-filter-section {
  flex: 1 1 100%;
}

.vtx-expanders-shader-group-label {
  display: none;
}

.vtx-expanders-shader-tabs {
  display: flex;
  align-items: flex-end;
  gap: 38px;
  margin-bottom: 18px;
  border-bottom: 2px solid #eeeeee;
}

.vtx-expanders-shader-tab {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 0 12px;
  border: none;
  background: transparent;
  color: #465260;
  font: 700 14px/1 var(--vtx-ki-font-family);
  cursor: pointer;
}

.vtx-expanders-shader-tab.vtx-expanders-selected::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  background: #2f2f31;
}

.vtx-expanders-shader-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: #f0f1f2;
  color: #7a828a;
  font-size: 12px;
  font-weight: 700;
}

.vtx-expanders-shader-group-body,
.vtx-expanders-shader-group-shell {
  align-items: stretch;
}

.vtx-expanders-shader-grid {
  display: grid;
  grid-template-columns: repeat(8, 34px);
  justify-content: start;
  align-items: start;
  gap: 15px 18px;
}

.vtx-expanders-shader-card {
  width: 34px;
  max-width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  box-shadow: none;
  background: transparent;
}

.vtx-expanders-shader-card:hover,
.vtx-expanders-shader-card.vtx-expanders-selected {
  box-shadow: none;
}

.vtx-expanders-shader-img-wrap {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: none;
}

.vtx-expanders-shader-card.vtx-expanders-selected .vtx-expanders-shader-img-wrap {
  box-shadow:
    0 0 0 3px #ffffff,
    0 0 0 5px #73777d;
}

.vtx-expanders-shader-check {
  display: none !important;
}

.vtx-expanders-pagination {
  padding-top: 14px;
  justify-content: center;
}

.vtx-expanders-pagination-label {
  font-size: 13px;
  color: #606b76;
}

.vtx-expanders-pagination-btn {
  border-color: #d9dde2;
  border-radius: 3px;
  color: #465260;
  font-size: 13px;
}

.vtx-expanders-filter-section,
.vtx-expanders-search-input,
.vtx-expanders-pagination-btn {
  border-radius: 3px;
}

.vtx-viewport3-toolbar,
.vtx-viewport3-toolbar-flyout {
  box-shadow: none !important;
}

.vtx-viewport3-drag-handle {
  color: #3f3f42;
}

@media (max-width: 1100px) {
  .sidebar.sidebar-overlay.side-right {
    width: min(520px, calc(100% - 48px));
    max-width: calc(100% - 48px);
  }

  .vtx-ki-summary {
    padding: 18px 24px;
  }
}

@media (max-width: 640px) {
  .sidebar.side-right {
    min-width: 0;
    max-width: 100vw;
  }

  .vtx-ki-summary {
    padding: 20px;
  }

  .panel-body {
    padding: 18px;
  }

  .vtx-expanders-header {
    min-height: 76px;
    padding: 18px 20px;
  }

  .vtx-expanders-content {
    padding: 0 20px 20px;
  }
}
