/*
  06-components.css
  Reusable pieces: 3D icon tiles, buttons, feature cards, the FAQ
  accordion and the comparison table.
  Icon tile rule: the glyph always inherits the tile colour, and tiles
  are teal or navy gradients, so the glyph colour is always white.
  A dark glyph on a dark tile is invisible. Do not change that.
*/

/* 3D icon tile */
.tm-icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(145deg, var(--tm-primary-bright), var(--tm-primary-dark));
  box-shadow: var(--tm-shadow-tile);
}
.tm-icon-tile svg {
  display: block;
  color: #ffffff;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
}
.tm-icon-tile-navy {
  background: linear-gradient(145deg, #17405c, #081a29);
}
.tm-icon-tile-amber {
  background: linear-gradient(145deg, var(--tm-amber-bright), var(--tm-amber));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -3px 6px rgba(0, 0, 0, 0.15), 0 10px 20px rgba(217, 130, 11, 0.3);
}
.tm-icon-tile-lg { width: 64px; height: 64px; border-radius: 20px; }

/* Colour rhythm for the homepage card grids: tiles cycle teal, navy,
   amber and a deep teal to navy blend by position, so long card rows
   feel richer with no markup change. The navy and amber values match
   the tile variants above, and every glyph stays white. */
.tm-trust-grid > :nth-child(2) .tm-icon-tile,
.tm-why-grid > :nth-child(2) .tm-icon-tile,
.tm-usecases-grid > :nth-child(2) .tm-icon-tile,
.tm-tips-grid > :nth-child(2) .tm-icon-tile {
  background: linear-gradient(145deg, #17405c, #081a29);
}
.tm-trust-grid > :nth-child(3) .tm-icon-tile,
.tm-why-grid > :nth-child(3) .tm-icon-tile,
.tm-usecases-grid > :nth-child(3) .tm-icon-tile,
.tm-tips-grid > :nth-child(3) .tm-icon-tile {
  background: linear-gradient(145deg, var(--tm-amber-bright), var(--tm-amber));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -3px 6px rgba(0, 0, 0, 0.15), 0 10px 20px rgba(217, 130, 11, 0.3);
}
.tm-trust-grid > :nth-child(4) .tm-icon-tile,
.tm-why-grid > :nth-child(4) .tm-icon-tile,
.tm-usecases-grid > :nth-child(4) .tm-icon-tile,
.tm-tips-grid > :nth-child(4) .tm-icon-tile {
  background: linear-gradient(145deg, var(--tm-primary), var(--tm-navy));
}

/* Buttons */
.tm-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.tm-btn-primary {
  color: #ffffff;
  background: linear-gradient(145deg, var(--tm-primary-bright), var(--tm-primary-dark));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 12px 24px rgba(14, 124, 123, 0.32);
}
.tm-btn-primary:hover {
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 18px 32px rgba(14, 124, 123, 0.38);
}
.tm-btn-ghost {
  color: var(--tm-ink);
  background: var(--tm-surface);
  border-color: var(--tm-border-strong);
}
.tm-btn-ghost:hover { background: var(--tm-primary-tint); border-color: var(--tm-primary); color: var(--tm-primary); transform: translateY(-2px); }
.tm-btn-on-dark {
  color: var(--tm-navy);
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}
.tm-btn-on-dark:hover { background: #E8FFFB; color: var(--tm-navy); transform: translateY(-2px); }

/* Feature card */
.tm-feature-card {
  background: var(--tm-surface-raised);
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius);
  padding: 28px;
  box-shadow: var(--tm-shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.tm-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tm-shadow-lift);
}
.tm-feature-card:hover .tm-icon-tile { transform: translateY(-2px); }
.tm-feature-card .tm-icon-tile { transition: transform 0.25s ease; }
.tm-feature-card h3 { font-size: 1.13rem; margin: 18px 0 8px; }
.tm-feature-card p { color: var(--tm-ink-soft); margin: 0; font-size: 0.97rem; }

/* FAQ accordion */
.tm-faq-list { max-width: 820px; margin: 0 auto; }
.tm-faq-item {
  background: var(--tm-surface-raised);
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius-sm);
  margin-bottom: 12px;
  box-shadow: var(--tm-shadow-card);
  overflow: hidden;
}
.tm-faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  background: none;
  border: 0;
  padding: 18px 22px;
  font-family: var(--tm-font);
  font-size: 1rem;
  font-weight: 700;
  color: var(--tm-ink);
  cursor: pointer;
}
.tm-faq-q .tm-icon {
  color: var(--tm-primary);
  flex: 0 0 auto;
  transition: transform 0.25s ease;
}
.tm-faq-item.open .tm-faq-q .tm-icon { transform: rotate(180deg); }
.tm-faq-a { display: none; padding: 0 22px 20px; }
.tm-faq-item.open .tm-faq-a { display: block; }
.tm-faq-a p { color: var(--tm-ink-soft); margin: 0; }

/* Comparison table */
.tm-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-radius);
  box-shadow: var(--tm-shadow-card);
  background: var(--tm-surface-raised);
}
.tm-compare { width: 100%; border-collapse: collapse; min-width: 560px; }
.tm-compare th, .tm-compare td {
  padding: 15px 20px;
  text-align: left;
  font-size: 0.97rem;
  border-bottom: 1px solid var(--tm-border);
}
.tm-compare thead th {
  background: var(--tm-primary-tint);
  color: var(--tm-ink);
  font-weight: 800;
}
.tm-compare tbody tr:last-child th,
.tm-compare tbody tr:last-child td { border-bottom: 0; }
.tm-compare tbody th { font-weight: 600; color: var(--tm-ink); }
.tm-compare td { color: var(--tm-ink-soft); }
.tm-yes { color: var(--tm-primary); display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.tm-no { color: var(--tm-muted); display: inline-flex; align-items: center; gap: 7px; }

/* Small chip used for categories and tags */
.tm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tm-primary);
  background: var(--tm-primary-tint);
  border-radius: 999px;
  padding: 5px 12px;
}

/* Homepage button collision guard (2026-11-21): the plugin tool.css also
   loads on the front page and styles the shared .tm-btn class name. These
   scoped rules keep the theme's own homepage buttons (blog teaser and CTA
   band) contrast safe at rest and on hover. The tool's own buttons live
   inside .tm-tool-slot and are not affected. */
.tm-blog-more .tm-btn-ghost { background: var(--tm-surface); color: var(--tm-ink); border-color: var(--tm-border-strong); }
.tm-blog-more .tm-btn-ghost:hover { background: var(--tm-primary-tint); color: var(--tm-primary); border-color: var(--tm-primary); }
.tm-cta-band .tm-btn-on-dark { background: #ffffff; color: var(--tm-navy); }
.tm-cta-band .tm-btn-on-dark:hover { background: #E8FFFB; color: var(--tm-navy); }
