/* Configure page — denser chrome, still catalog-light (not Ideal essay). */
@import url("./styles.css?v=market-list-2");

.cfg-page {
  display: grid;
  grid-template-columns: var(--cfg-w) 1fr var(--rail-w);
  min-height: calc(100vh - 100px);
  background: #fff;
}
.cfg-main {
  min-width: 0;
  padding: 12px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.cfg-main-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
}
.cfg-main-bar .crumb {
  padding: 0;
  flex: 1;
  min-width: 0;
}

/* Temporary gray Cart plate (top-right) — icon TBD by designer */
.cfg-cart-plate-wrap {
  flex-shrink: 0;
  margin: 0 2px 0 0;
}
.cfg-cart-plate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid #b0b0b0;
  background: #c8c8c8;
  color: #333;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.cfg-cart-plate:hover {
  background: #bebebe;
}
.cfg-cart-plate:focus-visible {
  outline: 2px solid #888;
  outline-offset: 2px;
}

.cfg-main h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.live-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: #f7f9fc;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue-dk);
}

.preview-tabs {
  display: flex;
  gap: 0;
  border: 1px solid var(--line);
  border-bottom: none;
  width: fit-content;
  max-width: 100%;
}
.preview-tab {
  height: 30px;
  padding: 0 12px;
  border: none;
  border-right: 1px solid var(--line);
  background: #f0f2f5;
  color: #445;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.preview-tab:last-child {
  border-right: none;
}
.preview-tab.is-on {
  background: #fff;
  color: var(--blue-dk);
}
.preview-tab:focus-visible {
  outline: 2px solid #888;
  outline-offset: -2px;
}

.preview-slot {
  min-height: 220px;
  border: 1px solid var(--line);
  background: var(--slot);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 4px;
}
.preview-slot svg {
  width: 100%;
  height: auto;
  max-height: 520px;
  display: block;
}

.cfg-section {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue-dk);
}

.sheet-face-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 12px;
  line-height: 1.45;
  color: #445;
}
.preview-slot.is-empty::after {
  content: "Preview";
  font-size: 12px;
  color: #8a96a3;
  font-weight: 600;
}

.param-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  max-width: 640px;
}

.param {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
}
.param input, .param select {
  height: 32px;
  border: 1px solid var(--line);
  padding: 0 8px;
  font-size: 13px;
  font-weight: 400;
  background: #fff;
}
.param input[readonly] {
  background: #f3f3f3;
  color: #333;
  cursor: default;
}

.dl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.dl-row button, .dl-row a.btn {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.dl-row button.sec {
  background: #fff;
  color: var(--blue-dk);
}
.dl-row button:disabled {
  opacity: 0.5;
  cursor: default;
}

.hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: #666;
  line-height: 1.35;
  max-width: 52rem;
}

.status {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  background: #fff;
  font-size: 12px;
  color: var(--muted);
  white-space: pre-wrap;
}
.status.err {
  border-color: #c62828;
  color: #8b0000;
  background: #fff5f5;
}
.status.ok {
  border-color: #2e7d32;
  color: #1b5e20;
  background: #f1f8f4;
}

.ref-note {
  font-size: 11px;
  color: var(--muted);
  max-width: 520px;
}

.ce-access-banner {
  margin: 12px 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #f7f9fc;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text);
}
.ce-access-banner.ce-access-unlocked {
  border-color: #2e7d32;
  background: #f1f8f4;
}
.ce-access-banner.ce-access-ready {
  border-color: #b7cde8;
  background: #f4f8ff;
}
.ce-access-banner.ce-access-locked,
.ce-access-banner.ce-access-warn {
  border-color: #d6a36c;
  background: #fff8ef;
}
.ce-access-banner.ce-access-unlimited {
  border-color: #1a4b8c;
  background: #f2f6fc;
}
.ce-access-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.ce-access-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  background: #e3e8f0;
  color: #1f2d3d;
}
.ce-access-pill.pill-ok {
  background: #1b6e2d;
  color: #fff;
}
.ce-access-pill.pill-blue {
  background: var(--blue-dk);
  color: #fff;
}
.ce-access-pill.pill-warn {
  background: #9a4d08;
  color: #fff;
}
.ce-access-pill.pill-pro {
  background: #102a4c;
  color: #fff;
}
.ce-access-text {
  flex: 1 1 280px;
}
.ce-access-link {
  font-size: 11px;
  font-weight: 700;
  color: var(--blue-dk);
  text-decoration: underline;
  white-space: nowrap;
}
.ce-access-sub {
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
}
.dl-row.ce-dl-unlocked #btn-package {
  background: #1b6e2d;
  border-color: #1b6e2d;
}
.dl-row.ce-dl-auth-required button {
  cursor: not-allowed;
  opacity: 0.55;
}

.stage-block {
  border: 1px solid var(--line);
  padding: 10px;
  max-width: 640px;
}
.stage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.stage-block h2 {
  margin: 0;
  font-size: 13px;
}
.stage-n {
  margin: 0;
  min-width: 110px;
}
.stage-row {
  display: grid;
  grid-template-columns: 48px 1fr 1fr;
  gap: 8px;
  align-items: end;
  margin-bottom: 6px;
}
.stage-row-h {
  margin-bottom: 4px;
}
.stage-row label { font-size: 11px; font-weight: 600; color: var(--muted); }
.stage-row input { height: 30px; border: 1px solid var(--line); padding: 0 6px; width: 100%; }

@media (max-width: 900px) {
  .cfg-page { grid-template-columns: 1fr; }
  .cfg {
    display: block;
    position: static;
    width: 100%;
    height: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .cfg-scroll { max-height: none; overflow: visible; }
  .cfg-main { padding-bottom: 76px; }
  .cfg-page > .rail {
    position: fixed;
    z-index: 20;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: row;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.18);
  }
  .cfg-page > .rail button {
    flex: 1;
    height: 48px;
    border-right: 1px solid #444;
    border-bottom: 0;
    font-size: 11px;
  }
}
