/* =========================================================
   Revomart Marketplace theme foundation — M1.1
   Path: /css/marketplace-theme.css

   Requires: /css/revomart-tokens.css (load first)

   Scope: Marketplace public, Demand workspace, Executor workspace,
   Marketplace activation only.

   M1.1: low-risk foundation only.
   Does NOT convert .btn.primary / .btn-primary to gold.
   Does NOT redesign headers or page-specific components.
   ========================================================= */

:root {
  --mk-action: var(--rm-navy-900);
  --mk-cta: var(--rm-gold-500);
  --mk-cta-hover: var(--rm-gold-hover);
  --mk-workspace-bg: var(--rm-paper);
  --mk-radius: 12px;
  --mk-shadow: 0 8px 24px rgba(14, 26, 43, 0.06);

  /* Token hooks for later Marketplace header phases (M1.2–M1.4). Unused visually here. */
  --mk-header-bg: var(--rm-surface);
  --mk-header-border: var(--rm-border);
  --mk-header-text: var(--rm-text);
  --mk-header-muted: var(--rm-text-muted);
}

/* ---------- Workspace / product page foundation ---------- */

body:not(.home-page) {
  color: var(--rm-text);
  background-color: var(--mk-workspace-bg);
  font-family:
    "IBM Plex Sans",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Public Marketplace hub: keep home.css atmospheric background; brand text + font only. */
body.home-page {
  color: var(--rm-text);
  font-family:
    "IBM Plex Sans",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Muted text helpers commonly used in workspaces */
.muted,
.text-muted,
.rv-muted,
.ac-muted,
.ma-note,
.ma-lead {
  color: var(--rm-text-muted);
}

/* Standard card / panel surfaces — structural classes only */
.card,
.panel,
.detail-card,
.role-card,
.ma-choice,
.ac-action {
  background-color: var(--rm-surface);
  border-color: var(--rm-border);
}

/* Soft default border color for common workspace chrome */
.rv-header {
  border-bottom-color: var(--rm-border);
  background-color: var(--rm-surface);
}

.ma-header {
  border-bottom-color: var(--rm-border);
  background-color: var(--rm-surface);
}

/* Focus ring — brand-adjacent, not gold CTA, not Tailwind blue */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid rgba(14, 26, 43, 0.28);
  outline-offset: 2px;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="image"]):focus,
textarea:focus,
select:focus {
  border-color: var(--rm-navy-800);
  box-shadow: 0 0 0 3px rgba(14, 26, 43, 0.1);
}

/*
 * Intentionally NOT overridden in M1.1:
 * - .btn.primary / .btn-primary → gold
 * - header logo gradient / nav active blue
 * - page-specific badges, status chips, chat bubbles
 * - inline <style> hex colors
 */
