/* 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);
}

/* ── Dark Mode ─────────────────────────────────────────────── */
[data-bs-theme="dark"] {
  --pw-bg:            #1a1d23;
  --pw-bg-surface:    #22262e;
  --pw-bg-inset:      #2a2e36;
  --pw-text:          #e5e7eb;
  --pw-text-heading:  #f3f4f6;
  --pw-text-muted:    #9ca3af;
  --pw-text-faint:    #6b7280;
  --pw-border:        #374151;
  --pw-border-subtle: #2a2e36;
}

/* ── 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 {
  background: var(--pw-bg-surface);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--pw-shadow-sm);
}

.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;
  color: var(--pw-text-muted);
}

/* ── 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;
  display: inline-block;
}

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

.badge-blocked       { background: #ef4444; color: #fff; }
.badge-worked-around,
.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; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  border-color: var(--pw-border);
  background: var(--pw-bg-surface);
}

.card-header {
  background: var(--pw-bg-surface);
  border-color: var(--pw-border);
  font-weight: 600;
}

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

/* ── Nav tabs in dashboard ──────────────────────────────────── */
.nav-tabs .nav-link.active {
  background: var(--pw-bg-surface);
}

/* ── 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;
}

/* ══════════════════════════════════════════════════════════════
   LANDING PAGE
   ══════════════════════════════════════════════════════════════ */

/* ── Hero ──────────────────────────────────────────────────── */
.lp-hero {
  text-align: center;
  padding: 5rem 0 3rem;
}

.lp-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--pw-blue);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  margin-bottom: 1.5rem;
}

[data-bs-theme="dark"] .lp-hero-badge {
  background: rgba(37, 99, 235, 0.15);
  border-color: rgba(37, 99, 235, 0.3);
}

.lp-hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--pw-text-heading);
  margin-bottom: 1.25rem;
}

.lp-hero-sub {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--pw-text-muted);
  max-width: 560px;
  margin: 0 auto 2rem;
}

.lp-hero-cta {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.lp-hero-note {
  font-size: 0.8rem;
  color: var(--pw-text-faint);
  margin: 0;
}

/* ── Language Bar ──────────────────────────────────────────── */
.lp-languages {
  text-align: center;
  padding: 2.5rem 0;
  border-top: 1px solid var(--pw-border-subtle);
  border-bottom: 1px solid var(--pw-border-subtle);
}

.lp-languages-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pw-text-faint);
  margin-bottom: 1rem;
}

.lp-languages-row {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.lp-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--pw-text-muted);
}

.lp-lang i {
  font-size: 1.25rem;
}

/* ── Section Layout ───────────────────────────────────────── */
.lp-section {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--pw-border-subtle);
}

.lp-section:last-of-type {
  border-bottom: none;
}

.lp-section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.lp-section-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--pw-text-heading);
  margin-bottom: 0.5rem;
}

.lp-section-sub {
  font-size: 1.05rem;
  color: var(--pw-text-muted);
  margin: 0;
}

/* ── Step Cards (How It Works) ────────────────────────────── */
.lp-step-card {
  background: var(--pw-bg-surface);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  padding: 2rem 1.5rem;
  text-align: center;
  height: 100%;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.lp-step-card:hover {
  box-shadow: var(--pw-shadow-md);
  transform: translateY(-2px);
}

.lp-step-num {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.lp-step-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--pw-text-heading);
  margin-bottom: 0.5rem;
}

.lp-step-body {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--pw-text-muted);
  margin: 0;
}

.lp-step-body code {
  font-family: var(--pw-font-mono);
  font-size: 0.82rem;
  background: var(--pw-bg-inset);
  padding: 0.15rem 0.4rem;
  border-radius: var(--pw-radius-sm);
}

/* ── Feature Cards ────────────────────────────────────────── */
.lp-feature-card {
  background: var(--pw-bg-surface);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  padding: 1.75rem 1.5rem;
  height: 100%;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.lp-feature-card:hover {
  box-shadow: var(--pw-shadow-md);
  transform: translateY(-2px);
}

.lp-feature-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--pw-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.lp-feature-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--pw-text-heading);
  margin-bottom: 0.4rem;
}

.lp-feature-body {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--pw-text-muted);
  margin: 0;
}

/* ── Pricing Cards ────────────────────────────────────────── */
.lp-price-card {
  background: var(--pw-bg-surface);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-radius);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.lp-price-card:hover {
  box-shadow: var(--pw-shadow-md);
  transform: translateY(-2px);
}

.lp-price-featured {
  border-color: var(--pw-blue);
  border-width: 2px;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.1), var(--pw-shadow-md);
}

.lp-price-badge {
  position: absolute;
  top: -0.65rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--pw-blue);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}

.lp-price-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--pw-text-heading);
  margin-bottom: 0.5rem;
}

.lp-price-amount {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.lp-price-dollar {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--pw-text-heading);
}

.lp-price-period {
  font-size: 0.9rem;
  color: var(--pw-text-muted);
}

.lp-price-desc {
  font-size: 0.85rem;
  color: var(--pw-text-muted);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.lp-price-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  flex: 1;
}

.lp-price-features li {
  font-size: 0.85rem;
  color: var(--pw-text);
  padding: 0.35rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lp-price-features li i.ti-check {
  color: var(--pw-green);
  font-size: 1rem;
  flex-shrink: 0;
}

.lp-price-features li i.ti-x {
  color: var(--pw-text-faint);
  font-size: 1rem;
  flex-shrink: 0;
}

.lp-price-na {
  color: var(--pw-text-faint) !important;
}

/* ── FAQ ──────────────────────────────────────────────────── */
.lp-faq {
  max-width: 680px;
  margin: 0 auto;
}

.lp-faq-item {
  border-bottom: 1px solid var(--pw-border);
  padding: 0;
}

.lp-faq-item:last-child {
  border-bottom: none;
}

.lp-faq-item summary {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--pw-text-heading);
  cursor: pointer;
  padding: 1rem 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lp-faq-item summary::-webkit-details-marker {
  display: none;
}

.lp-faq-item summary::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--pw-text-faint);
  flex-shrink: 0;
  margin-left: 1rem;
  transition: transform 0.2s ease;
}

.lp-faq-item[open] summary::after {
  content: '\2212'; /* minus sign */
}

.lp-faq-item p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--pw-text-muted);
  padding: 0 0 1rem;
  margin: 0;
}

.lp-faq-item code {
  font-family: var(--pw-font-mono);
  font-size: 0.82rem;
  background: var(--pw-bg-inset);
  padding: 0.15rem 0.4rem;
  border-radius: var(--pw-radius-sm);
}

/* ── Final CTA ────────────────────────────────────────────── */
.lp-cta {
  text-align: center;
  padding: 4.5rem 0 3rem;
}

.lp-cta-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--pw-text-heading);
  margin-bottom: 0.5rem;
}

.lp-cta-sub {
  font-size: 1.05rem;
  color: var(--pw-text-muted);
  margin-bottom: 1.5rem;
}

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

  /* Landing page mobile */
  .lp-hero {
    padding: 3rem 0 2rem;
  }
  .lp-hero-title {
    font-size: 2.25rem;
  }
  .lp-hero-sub {
    font-size: 1rem;
  }
  .lp-hero-cta {
    flex-direction: column;
    align-items: center;
  }
  .lp-hero-cta .btn {
    width: 100%;
    max-width: 280px;
  }
  .lp-languages-row {
    gap: 1.25rem;
  }
  .lp-section {
    padding: 3rem 0;
  }
  .lp-section-title {
    font-size: 1.5rem;
  }
  .lp-cta-title {
    font-size: 1.5rem;
  }
}
