/* Patchwork MCP — overrides on top of Modernize theme
   Only PW-specific components and tweaks live here.
   The Modernize theme (mtheme/assets/css/styles.css) provides:
   - Bootstrap 5, Plus Jakarta Sans, color themes, dark mode,
   - cards, buttons, dropdowns, forms, alerts, navbar, footer, etc. */

/* ── CSS Variable Aliases ────────────────────────────────────
   Many dashboard templates use inline styles with var(--pw-*).
   Map these to Modernize's Tailwind-based values so existing
   templates continue to work without mass-editing.            */
:root {
  --pw-bg:            #f9fafb;
  --pw-bg-surface:    #ffffff;
  --pw-bg-inset:      #f3f4f6;
  --pw-text:          #111827;
  --pw-text-heading:  #111827;
  --pw-text-muted:    #6b7280;
  --pw-text-faint:    #9ca3af;
  --pw-border:        #e5e7eb;
  --pw-border-subtle: #f3f4f6;

  --pw-blue:    #2563eb;
  --pw-green:   #10b981;
  --pw-red:     #ef4444;
  --pw-orange:  #f59e0b;
  --pw-yellow:  #eab308;
  --pw-teal:    #14b8a6;
  --pw-purple:  #8b5cf6;

  --pw-font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Consolas,
                  'Liberation Mono', Menlo, monospace;

  --pw-radius:    0.75rem;
  --pw-radius-sm: 0.375rem;

  --pw-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --pw-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* ── Main Content ────────────────────────────────────────────── */
.main-content {
  flex: 1;
  padding: 2rem 0;
}

/* ── PW Button Aliases ──────────────────────────────────────
   Dashboard templates use .btn-pw / .btn-pw-primary.
   Map these to look like Modernize btn-outline-secondary / btn-primary. */
.btn-pw {
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 1.25rem;
  border-radius: 0.375rem;
  border: 1px solid var(--pw-border);
  background: var(--pw-bg-surface);
  color: var(--pw-text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-pw:hover {
  background: var(--pw-bg-inset);
  border-color: var(--pw-text-faint);
  color: var(--pw-text-heading);
}

.btn-pw-primary {
  background: var(--pw-blue);
  border-color: var(--pw-blue);
  color: #fff;
}

.btn-pw-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

/* ── Stat Cards (PW-specific component) ─────────────────────── */
.stat-card {
  padding: 1.25rem;
  text-align: center;
}

.stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* ── Badges (PW gap types, resolutions, modes) ──────────────── */
.badge-gap {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-missing-tool     { background: #ef4444; color: #fff; }
.badge-incomplete       { background: #f59e0b; color: #fff; }
.badge-missing-param    { background: #eab308; color: #fff; }
.badge-wrong-format     { background: #14b8a6; color: #fff; }
.badge-other            { background: #9ca3af; color: #fff; }

.badge-blocked       { background: #ef4444; color: #fff; }
.badge-worked-around { background: #10b981; color: #fff; }
.badge-partial       { background: #f59e0b; color: #fff; }

.badge-dev       { background: #8b5cf6; color: #fff; }
.badge-published { background: #2563eb; color: #fff; }

/* ── Table header styling (PW-specific) ─────────────────────── */
.table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* ── Avatar dropdown (no caret, circle-only trigger) ─────────── */
.dropdown-toggle-no-caret::after {
  display: none;
}

/* ── Utilities ──────────────────────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, #2563eb, #1e3a8a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .stat-card .stat-value {
    font-size: 1.4rem;
  }
  .main-content {
    padding: 1rem 0;
  }
}
