/* Reusable components: buttons, tags, chips, cards, panels, lists, FAQ, ads. */

/* Buttons */
.fo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.fo-btn--block { width: 100%; }
.fo-btn--ink { background: var(--ink); color: var(--white); border-color: var(--ink); }
.fo-btn--ink:hover { background: #000; border-color: #000; color: var(--white); }
.fo-btn--teal { background: var(--teal); color: var(--white); border-color: var(--teal); }
.fo-btn--teal:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: var(--white); }
.fo-btn--white { background: var(--white); color: var(--teal-dark); border-color: var(--white); }
.fo-btn--white:hover { background: var(--teal-soft); border-color: var(--teal-soft); color: var(--teal-dark); }
.fo-btn--outline { background: var(--white); color: var(--ink); border-color: var(--line-strong); }
.fo-btn--outline:hover { border-color: var(--ink); color: var(--ink); }
.fo-btn.is-disabled { opacity: 0.55; cursor: default; }
.fo-btn svg { width: 18px; height: 18px; }

.fo-icon-btn {
  width: 44px; height: 44px;
  border: 0; background: transparent;
  border-radius: var(--radius-input);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink); cursor: pointer;
}
.fo-icon-btn:hover { background: var(--sand); }

/* Tag (small label) and chips (pills) */
.fo-tag {
  align-self: flex-start;
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 700;
}
.fo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fo-chip {
  height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.fo-chip:hover { background: var(--teal-pale); color: var(--teal-dark); }

/* Cards and panels */
.fo-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 20px 16px;
  box-sizing: border-box;
}
.fo-panel {
  background: var(--white);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-panel);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
}
.fo-panel__title { font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
.fo-panel__text { font-size: 15px; line-height: 1.5; color: var(--ink-soft); }
.fo-panel__link { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--teal); font-weight: 700; font-size: 15px; text-decoration: none; }
.fo-panel__link:hover { text-decoration: underline; }
.fo-panel__note { font-size: 12px; line-height: 1.5; color: var(--muted); }
.fo-panel--compact { padding: 20px; gap: 12px; }
.fo-panel--compact .fo-panel__title { font-size: 20px; }
.fo-panel--compact .fo-panel__text { font-size: 14px; }
.fo-panel--compact .fo-panel__link { justify-content: flex-start; min-height: 0; font-size: 14px; }

/* Check list */
.fo-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--ink); }
.fo-checks li { display: flex; gap: 8px; align-items: center; }
.fo-checks svg { color: var(--teal); flex: none; }

/* Tool list rows */
.fo-list {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.fo-tool-row {
  min-height: 56px;
  box-sizing: border-box;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
}
.fo-tool-row:last-child { border-bottom: 0; }
.fo-tool-row:hover { background: var(--sand); color: var(--ink); }
.fo-tool-row__n { font-family: var(--font-mono); font-size: 13px; color: var(--muted-2); width: 20px; flex: none; }
.fo-tool-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fo-tool-row__name { font-weight: 700; font-size: 15px; }
.fo-tool-row__desc { font-size: 13px; color: var(--muted); }
.fo-tool-row__chev { color: var(--muted-3); flex: none; }

/* Category icon tiles and cards */
.fo-cat-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  flex: none;
  background: var(--teal-soft); color: var(--teal);
}
.fo-cat-icon--teal { background: var(--teal-soft); color: var(--teal); }
.fo-cat-icon--clay { background: var(--clay-bg); color: var(--clay-fg); }
.fo-cat-icon--blue { background: var(--blue-bg); color: var(--blue-fg); }
.fo-cat-icon--purple { background: var(--purple-bg); color: var(--purple-fg); }

.fo-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.fo-cat-card {
  min-height: 104px;
  box-sizing: border-box;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color var(--ease);
}
.fo-cat-card:hover { border-color: var(--ink); color: var(--ink); }
.fo-cat-card__text { display: flex; flex-direction: column; gap: 2px; }
.fo-cat-card__name { font-weight: 700; font-size: 15px; }
.fo-cat-card__count { font-size: 13px; color: var(--muted); }

/* FAQ (<details>) */
.fo-faq {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  padding: 0 14px;
}
.fo-faq summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
}
.fo-faq summary::-webkit-details-marker { display: none; }
.fo-faq summary::after { content: "+"; font-weight: 500; color: var(--muted); }
.fo-faq[open] summary::after { content: "−"; }
.fo-faq__body { padding: 0 0 14px; font-size: 14px; line-height: 1.6; color: var(--ink-soft); }

/* Ad and affiliate slots: fixed heights, no layout shift */
.fo-ad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
}
.fo-ad__label { font-size: var(--text-xs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); }
.fo-ad__box { max-width: 100%; box-sizing: border-box; overflow: hidden; border-radius: var(--radius-sm); }
.fo-ad__box--placeholder {
  border: 1.5px dashed var(--ad-line);
  background: var(--ad-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted-2);
}
.fo-ad__box--sponsored { border-color: var(--sponsored-line); background: var(--sponsored-bg); color: var(--sponsored-fg); }
.fo-ad__box img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fo-ad__box a { display: block; width: 100%; height: 100%; }
@media (max-width: 760px) {
  .fo-ad--leaderboard .fo-ad__box { width: 300px !important; height: 250px !important; }
}

/* Editor placeholder */
.fo-block-empty {
  padding: 24px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-card);
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}
