/* Casita Gomez theme, with colors sampled from the store logo. Load after workspace.css. */
body.theme-market {
  --market-teal: #6bc2b2;
  --market-teal-hover: #86d2c4;
  --market-mint: #d2fbf5;
  --market-ink: #0b2130;
  --ws-bg: #1f445c;
  --ws-glow: rgba(210, 251, 245, .12);
  --ws-surface: #183a50;
  --ws-raised: #224d68;
  --ws-input: #12293a;
  --ws-line: rgba(210, 251, 245, .16);
  --ws-line-strong: rgba(210, 251, 245, .34);
  --ws-text: #f2fffc;
  --ws-muted: #cfe7e2;
  --ws-accent: #aee9a9;
  --ws-accent-strong: #c9f3c5;
  --ws-accent-soft: rgba(174, 233, 169, .12);
  --ws-on-accent: #0b2130;
  --ws-focus: #aee9a9;
  --accent: var(--ws-accent);
  --secondary: var(--ws-muted);
  --edge: var(--ws-line);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  place-items: initial;
  background-image: linear-gradient(rgba(11, 33, 48, .35) 1px, transparent 1px), linear-gradient(90deg, rgba(11, 33, 48, .35) 1px, transparent 1px), radial-gradient(56rem 30rem at 50% -6rem, var(--ws-glow), transparent 72%);
  background-size: 96px 96px, 96px 96px, auto;
}

.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:not(:first-child) { display: inline-flex; min-height: 44px; align-items: center; }
/* The brand link is the banner's first link, so undo the shared last-link pill button style. */
.theme-market .brand-banner > a:first-child, .theme-market .brand-banner > a:first-child:hover { padding: 0; border: 0; border-radius: 0; color: var(--ws-text); background: none; font-size: 1.375rem; }
.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; }
.theme-market .ws-mark { flex-shrink: 0; border: 2px solid var(--market-ink); border-radius: 50%; color: var(--market-ink); background: var(--market-mint); font-family: var(--ws-display); }

.store-photo { position: relative; margin: 0 0 28px; overflow: hidden; border: 1px solid var(--ws-line-strong); border-radius: 28px; background: var(--ws-bg); box-shadow: 0 28px 80px rgba(0, 0, 0, .35); }
.store-photo img { display: block; width: 100%; height: auto; transition: transform .7s ease; }
.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(--market-teal); font-style: normal; }
.theme-market .phase-number { color: var(--ws-accent); }
.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-teal); color: var(--market-ink); background: var(--market-teal); }
.theme-market #location-submit { color: var(--market-ink); background: var(--market-teal); }
.theme-market #location-submit:hover { background: var(--market-teal-hover); }
.theme-market .harness-grid .copy-prompt { border-color: var(--market-teal); color: var(--market-ink); background: var(--market-teal); }
.theme-market .harness-grid .copy-prompt:hover { border-color: var(--market-teal-hover); background: var(--market-teal-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-dot { background: var(--market-teal); }

.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, 1fr) minmax(0, 1.05fr); 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 .agent-intro > p:last-child br { display: none; }
  .store-photo { width: min(100%, 320px); margin: 0 auto 24px; border-radius: 22px; }
  .quick-questions .example-question { flex: 1 1 100%; text-align: left; }
}

@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-mint); --agent-avatar-fg: var(--market-ink); }
