/* Fix Core Web Vitals — styles (same as fix-git-errors) */

.search-section {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e0e6ed);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07);
  margin-bottom: 1.5rem;
}

#searchInput {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1.5px solid var(--border, #e0e6ed);
  border-radius: 8px;
  background: #f9fafb;
  color: #111827;
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#searchInput:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* Fix cards */
.fix-card {
  border: 1px solid var(--border, #e0e6ed);
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: border-color 0.2s;
}
.fix-card:hover { border-color: #2563eb; }

.fix-card summary {
  padding: 1rem 1.25rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  background: #f9fafb;
  color: #111827;
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.fix-card summary::-webkit-details-marker { display: none; }
.fix-card[open] summary { border-bottom: 1px solid var(--border, #e0e6ed); background: #eff6ff; }

.fix-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.badge-lcp { background: #3b82f6; color: #ffffff; }
.badge-inp { background: #f97316; color: #ffffff; }
.badge-cls { background: #10b981; color: #ffffff; }

.fix-body {
  padding: 1.25rem;
  background: var(--card-bg, #fff);
}

/* Code block */
.code-block {
  background: #0f172a;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.code-block code {
  color: #86efac;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  flex: 1;
  word-break: break-all;
  white-space: pre-wrap;
  line-height: 1.5;
}
.copy-btn {
  background: #1e40af;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
}
.copy-btn:hover { background: #1d4ed8; }
.copy-btn.copied { background: #16a34a; }

/* Fix steps */
.fix-steps { margin: 0; padding: 0; list-style: none; }
.fix-steps li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}
.step-num {
  background: #2563eb;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.step-text { font-size: 0.9rem; color: #374151; line-height: 1.6; }
.step-text code {
  background: #eff6ff;
  color: #1d4ed8;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-size: 0.82rem;
  font-family: 'Courier New', monospace;
}

/* Tip / danger boxes */
.tip-box {
  background: #fefce8;
  border: 1px solid #fde047;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #713f12;
  margin-top: 0.75rem;
}
.danger-box {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #7f1d1d;
  margin-top: 0.75rem;
}

/* Category label */
.cat-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  padding: 1rem 0 0.4rem;
  border-bottom: 1px solid var(--border, #e0e6ed);
  margin-bottom: 0.75rem;
}

/* Inline fix card */
.fix-card-inline {
  border: 1px solid var(--border, #e0e6ed);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  background: var(--card-bg, #fff);
}
.fix-card-inline h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.75rem;
}
.inline-fixes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}
.inline-fix {
  background: #f9fafb;
  padding: 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.6;
}
.inline-fix strong {
  color: #059669;
  font-family: 'Courier New', monospace;
}

/* Dark mode */
html[data-theme="dark"] .search-section { background: #1f2937; border-color: #374151; }
html[data-theme="dark"] #searchInput { background: #111827; color: #f9fafb; border-color: #374151; }
html[data-theme="dark"] .fix-card { border-color: #374151; }
html[data-theme="dark"] .fix-card summary { background: #1f2937; color: #f9fafb; }
html[data-theme="dark"] .fix-card[open] summary { background: #1e3a5f; border-color: #374151; }
html[data-theme="dark"] .fix-body { background: #111827; }
html[data-theme="dark"] .tip-box { background: #422006; border-color: #92400e; color: #fde68a; }
html[data-theme="dark"] .danger-box { background: #450a0a; border-color: #991b1b; color: #fca5a5; }
html[data-theme="dark"] .cat-label { color: #94a3b8; border-color: #374151; }
html[data-theme="dark"] .fix-card-inline { background: #1f2937; border-color: #374151; }
html[data-theme="dark"] .inline-fix { background: #111827; }
html[data-theme="dark"] .inline-fix strong { color: #6ee7b7; }
html[data-theme="dark"] .fix-card-inline h4 { color: #f9fafb; }
