/* FDQ2 Branding overrides - maps plugin tokens to site design tokens (색상.txt 기반)
   This file intentionally keeps selectors minimal and maps existing --fdq2-* vars
   to brand tokens. Load this after app.css to override defaults. */
:root{
  --uf-primary: #8D7F71;         /* Urban Taupe */
  --uf-primary-deep: #817467;    /* Header safe */
  --uf-secondary: #8FA88F;       /* Sage Mist */
  --uf-accent: #C27A58;          /* Baked Clay */
  --uf-accent-deep: #A5674B;     /* CTA safe */
  --uf-base: #FAFAF5;            /* Page base */
  --uf-text: #332E2A;            /* Typography */
  --uf-text-muted: #706962;      /* Muted text */
  --uf-link: #8F4E39;            /* Link color (darker for better contrast) */
  --uf-success: #5F7D1F;
  --uf-info: #677584;
  --uf-error: #B22222;
}

/* Map plugin variables to brand tokens */
:root{
  --fdq2-primary: var(--uf-accent-deep, #A5674B);
  /* Hover color adjusted darker to keep white CTA text contrast >= 4.5 */
  --fdq2-primary-hover: #8A4C36;
  --fdq2-bg: var(--uf-base, #FAFAF5);
  --fdq2-card-bg: #ffffff;
  --fdq2-text: var(--uf-text, #332E2A);
  --fdq2-border: #e9efe6; /* Sage-tinted light line */
  --fdq2-correct: var(--uf-success, #5F7D1F);
  --fdq2-wrong: var(--uf-error, #B22222);
  --fdq2-shadow: 0 6px 18px rgba(51,46,42,0.06);
}

/* Small / muted text */
.fdq2-list-item-date,
.fdq2-progress,
.fdq2-review-my,
.fdq2-diff-label {
  color: var(--uf-text-muted, #706962) !important;
}

/* Links: match brand color but keep cards clean (no underlines) */
.fdq2-list-link { color: var(--uf-link, #A06549); text-decoration: none; }
.fdq2-list-link:hover { text-decoration: none; }

/* CTA: ensure adequate contrast and consistent hover */
.fdq2-start-btn,
.fdq2-submit {
  background: var(--fdq2-primary);
  color: #fff;
}
.fdq2-start-btn:hover,
.fdq2-submit:hover { background: var(--fdq2-primary-hover); }

/* Radios / checked */
.fdq2-opts input[type="radio"]:checked {
  border-color: var(--fdq2-primary);
  background: var(--fdq2-primary);
}

/* Neutralize pink shadows to keep earthy tone */
.fdq2-list-item:hover { box-shadow: 0 10px 30px rgba(51,46,42,0.08) !important; }
.fdq2-list-item { border: 1px solid var(--fdq2-border) !important; }

/* Admin panel drag/preview use branding color */
.fdq2p-list .drag-over { outline: 2px dashed var(--fdq2-primary) !important; }
.fdq2p-status { color: var(--fdq2-primary) !important; }

/* Accessibility helpers: make sure small CTAs remain tappable */
.fdq2-start-btn, .fdq2-submit { min-height: 44px; padding: 12px 16px; }

/* Typography: system font stack and sensible base */
.fdq2 { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; font-size:16px; line-height:1.6; color:var(--fdq2-text); }
.fdq2 h1, .fdq2 .fdq2-list-title { font-weight:700; line-height:1.2; color:var(--fdq2-text); }
.fdq2 .fdq2-title, .fdq2-list-item-title { color:var(--fdq2-text); }

/* Buttons & focus ring */
.fdq2-start-btn, .fdq2-submit, .fdq2-retry {
  border-radius: 12px;
  min-height: 44px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight:600;
  box-shadow: none;
}
.fdq2-start-btn:focus-visible, .fdq2-submit:focus-visible, .fdq2-retry:focus-visible {
  outline: 3px solid rgba(165,103,75,0.18);
  outline-offset: 2px;
}

/* Radio size & hit area */
.fdq2-opts label { padding: 14px 16px; border-radius:10px; }
.fdq2-opts input[type="radio"] { width:24px; height:24px; margin-right:12px; }
.fdq2-opts input[type="radio"] + span { flex:1; }

/* Card radius & neutral shadow */
.fdq2-list-item, .fdq2-cat-section, .fdq2-start, .fdq2-form, .fdq2-result-screen { border-radius: 12px; box-shadow: 0 6px 20px rgba(51,46,42,0.06); }

/* Fieldset / legend spacing */
.fdq2-q { margin-bottom: 24px; }
.fdq2-q legend { margin-bottom: 12px; font-size:1.15rem; }

/* Subtle transitions & reduced-motion */
.fdq2 * { transition: background 180ms ease, color 160ms ease, transform 160ms ease; }
@media (prefers-reduced-motion: reduce) { .fdq2 * { transition: none !important; } }

/* Focus for interactive labels/links */
.fdq2-list-link:focus-visible, .fdq2-opts label:focus-visible { outline: 3px solid rgba(129,116,103,0.12); outline-offset: 2px; }

/* Slightly reduce border radius on retry button for differentiation */
.fdq2-retry { border-radius: 10px; }

/* End of branding overrides */
