/* A & R Market theme, with colors sampled from the storefront photo. Load after workspace.css. */
body.theme-market {
  --market-red: #be0b14;
  --market-red-hover: #d3122c;
  --market-white: #fff;
  --ws-bg: #011d11;
  --ws-glow: rgba(155, 216, 253, .13);
  --ws-surface: #082a1b;
  --ws-raised: #0f3a28;
  --ws-input: #00160d;
  --ws-line: rgba(237, 234, 229, .14);
  --ws-line-strong: rgba(237, 234, 229, .32);
  --ws-text: #f7f4ee;
  --ws-muted: #d9e6dd;
  --ws-accent: #9bd8fd;
  --ws-accent-strong: #c5e9ff;
  --ws-accent-soft: rgba(155, 216, 253, .12);
  --ws-on-accent: #00160d;
  --ws-focus: #9bd8fd;
  --accent: var(--ws-accent);
  --secondary: var(--ws-muted);
  --edge: var(--ws-line);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  place-items: initial;
}

.theme-market .brand-banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.theme-market .brand-banner > a:first-child { display: inline-flex; min-height: 44px; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; }
.theme-market .brand-banner > a:last-child { display: inline-flex; min-height: 44px; align-items: center; }
.theme-market .brand-banner .agent-badge { display: inline-block; width: auto; margin: 0 0 0 2px; padding: 3px 10px; font-family: var(--ws-body); font-size: .75rem; letter-spacing: .03em; line-height: 1.4; }
.call-extra { margin-left: .3em; }
.theme-market .ws-mark { flex-shrink: 0; color: var(--market-white); background: var(--market-red); font-family: var(--ws-display); }

.store-photo { position: relative; margin: 0 0 28px; overflow: hidden; border: 1px solid var(--ws-line-strong); border-radius: 22px; background: var(--ws-raised); box-shadow: 0 28px 80px rgba(0, 0, 0, .45); }
.store-photo img { display: block; width: 100%; height: auto; transition: transform .7s ease; }
.store-photo::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); background: linear-gradient(180deg, transparent 72%, rgba(1, 29, 17, .32)); pointer-events: none; }
.store-photo:hover img { transform: scale(1.015); }

.theme-market .flow-label { margin: 0 0 14px; color: var(--ws-accent); }
.theme-market .agent-title h1 em { color: var(--ws-accent); font-style: normal; }
.theme-market .phase-number { color: var(--ws-accent); }

.question-heading { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.theme-market #usage-count { display: block; margin: 0; color: var(--ws-accent); font-size: .875rem; font-weight: 500; text-align: right; }
.theme-market #question-hint { margin: 10px 0 18px; font-size: .875rem; }

.quick-questions { display: flex; flex-wrap: wrap; gap: 8px; }
.theme-market .example-question { min-height: 44px; padding: 8px 15px; border: 1px solid var(--ws-line-strong); border-radius: 999px; color: var(--ws-text); background: var(--ws-raised); font-size: .875rem; font-weight: 500; transition: color .2s, background .2s, border-color .2s; }
.theme-market .example-question:hover { border-color: var(--ws-accent); color: var(--ws-accent); background: var(--ws-accent-soft); }

.theme-market .flow-steps [aria-current=step] .step-circle { border-color: var(--market-red); color: var(--market-white); background: var(--market-red); }
.theme-market #location-submit { color: var(--market-white); background: var(--market-red); }
.theme-market #location-submit:hover { background: var(--market-red-hover); }
.theme-market .harness-grid .copy-prompt { border-color: var(--market-red); color: var(--market-white); background: var(--market-red); }
.theme-market .harness-grid .copy-prompt:hover { border-color: var(--market-red-hover); background: var(--market-red-hover); }
.theme-market .harness-grid .copy-prompt.is-copied { border-color: var(--ws-accent); color: var(--ws-on-accent); background: var(--ws-accent); }

.theme-market #app-help { border-color: var(--ws-accent); color: var(--ws-text); background: var(--ws-raised); }
.theme-market #app-help h2, .theme-market #app-help p { color: var(--ws-text); }
.theme-market .help-actions button { border-color: var(--ws-accent); color: var(--ws-accent); }

.theme-market .scope-note a { color: var(--ws-accent); white-space: nowrap; }
.theme-market .scope-dot { background: var(--market-red); }

.theme-market .workspace-footer { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 20px; }
.theme-market .workspace-footer nav { display: flex; flex-wrap: wrap; gap: 0 18px; margin: 0; }
.theme-market .workspace-footer > span { text-align: left; }
.theme-market .phase h2:focus, .theme-market .phase h2:focus-visible { outline: none; }

@media (min-width: 960px) {
  .theme-market main:has(> .store-photo) { display: grid; width: min(100% - 48px, 1160px); grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); column-gap: clamp(36px, 5vw, 64px); align-items: start; }
  .theme-market main:has(> .store-photo) > * { grid-column: 2; min-width: 0; }
  .theme-market main:has(> .store-photo) > .store-photo { position: sticky; top: 104px; grid-column: 1; grid-row: 1 / span 8; margin: 0; }
  .theme-market .workspace-footer { width: min(100% - 48px, 1160px); }
  .theme-market .agent-title h1 { font-size: clamp(2.25rem, 3.2vw, 2.625rem); }
  .theme-market .harness-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
  .theme-market .brand-banner { gap: 10px; }
  .theme-market .brand-banner > a:first-child { gap: 8px; font-size: 1.0625rem; }
  .theme-market .brand-banner > a:last-child { padding: 0 14px; }
  .call-extra { display: none; }
  .theme-market .agent-intro > p:last-child br { display: none; }
  .store-photo { margin-bottom: 24px; border-radius: 16px; }
  .quick-questions .example-question { flex: 1 1 100%; text-align: left; }
  .theme-market .scope-note a { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .store-photo:hover img { transform: none; }
}


/* Chat styles live in ../../assets/css/agent-chat.css. */
body.theme-market { --agent-avatar-bg: var(--market-red); --agent-avatar-fg: var(--market-white); }
