/* =========================================
   Product tools launcher
   Ported from src/pages/ProductTools.tsx in the client's Lovable project.

   Loaded automatically for every page (see Page::getCSS, which walks all pages
   because of partial navigation), so everything is scoped to body.ProductTools
   - the class getBodyClass() emits from simpleName().
   ========================================= */

/* usesWebFont() loads Montserrat and adds .modern-type, but moved.css pins the
   system stack on `body, button, input, select, textarea`; the family still has
   to be declared. Same pattern as body.About and body.Features. */
body.ProductTools,
body.ProductTools header,
body.ProductTools button,
body.ProductTools input,
body.ProductTools select,
body.ProductTools textarea {
  font-family: "Montserrat", sans-serif;
}

body.ProductTools .tools-page {
  max-width: 1024px; /* max-w-5xl */
  margin: 0 auto;
  padding: 8px 0 48px;
  color: #25153c;
}

/* --- Header -------------------------------------------------------------- */

body.ProductTools .tools-head {
  margin-bottom: 40px;
}

body.ProductTools .tools-head h1 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #25153c;
}

body.ProductTools .tools-head p {
  margin: 0;
  font-size: 15px;
  line-height: 24px;
  color: #6c5393;
}

/* --- Groups -------------------------------------------------------------- */

body.ProductTools .tools-group {
  margin-bottom: 40px;
}

body.ProductTools .tools-group-head {
  margin-bottom: 16px;
}

body.ProductTools .tools-group-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 26px;
  font-weight: 700;
  color: #25153c;
}

body.ProductTools .tools-group-head p {
  margin: 0;
  font-size: 14px;
  line-height: 22px;
  color: #6c5393;
}

body.ProductTools .tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* --- Cards --------------------------------------------------------------- */

body.ProductTools .tools-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px; /* p-5 */
  border: 1px solid #e6dbf0;
  border-radius: 12px; /* rounded-xl */
  background: #ffffff;
  text-decoration: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

body.ProductTools .tools-card:hover {
  border-color: #c084fc; /* primary/50 */
  box-shadow: 0 10px 15px -3px rgba(126, 96, 246, 0.1);
}

body.ProductTools .tools-card:focus-visible {
  outline: 2px solid #9333ea;
  outline-offset: 3px;
}

body.ProductTools .tools-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 2px 10px;
  border-radius: 9999px;
  background: rgba(147, 51, 234, 0.1);
  color: #7e22ce;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

body.ProductTools .tools-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px; /* w-12 */
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(37, 21, 60, 0.12);
  transition: transform 0.3s ease;
}

body.ProductTools .tools-card:hover .tools-icon {
  transform: scale(1.1) rotate(2deg);
}

body.ProductTools .tools-icon svg {
  width: 24px;
  height: 24px;
  color: #ffffff;
}

/* The design gives every tool its own gradient. Kept, because on a page whose
   whole job is telling nine things apart, colour is doing real work. */
body.ProductTools .tools-icon--brand   { background-image: linear-gradient(to bottom right, #9333ea, #f97316); }
body.ProductTools .tools-icon--indigo  { background-image: linear-gradient(to bottom right, #8b5cf6, #6366f1); }
body.ProductTools .tools-icon--amber   { background-image: linear-gradient(to bottom right, #f59e0b, #f97316); }
body.ProductTools .tools-icon--teal    { background-image: linear-gradient(to bottom right, #14b8a6, #06b6d4); }
body.ProductTools .tools-icon--emerald { background-image: linear-gradient(to bottom right, #10b981, #16a34a); }
body.ProductTools .tools-icon--violet  { background-image: linear-gradient(to bottom right, #8b5cf6, #9333ea); }
body.ProductTools .tools-icon--pink    { background-image: linear-gradient(to bottom right, #ec4899, #f97316); }
body.ProductTools .tools-icon--sky     { background-image: linear-gradient(to bottom right, #0ea5e9, #06b6d4); }

body.ProductTools .tools-card-copy {
  display: block;
  min-width: 0;
}

body.ProductTools .tools-card-title {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  line-height: 22px;
  font-weight: 700;
  color: #25153c;
  transition: color 0.15s ease;
}

body.ProductTools .tools-card:hover .tools-card-title {
  color: #7e22ce;
}

body.ProductTools .tools-card-text {
  display: block;
  font-size: 13px;
  line-height: 20px;
  color: #6c5393;
}

/* Shown where a tool cannot be opened cold - it needs a product picked first. */
body.ProductTools .tools-card-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  line-height: 18px;
  color: #9a86b8;
}

body.ProductTools .tools-card-note svg {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
}

/* --- Footnote ------------------------------------------------------------ */

body.ProductTools .tools-foot {
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid #e6dbf0;
  font-size: 13px;
  line-height: 20px;
  color: #9a86b8;
}

body.ProductTools .tools-foot a {
  color: #7e22ce;
  text-decoration: underline;
}

@media (min-width: 768px) {
  body.ProductTools .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  body.ProductTools .tools-card,
  body.ProductTools .tools-icon,
  body.ProductTools .tools-card-title {
    transition: none;
  }

  body.ProductTools .tools-card:hover .tools-icon {
    transform: none;
  }
}

/* --- Empty state ---------------------------------------------------------- */

/* Shown when every card was filtered out because the account cannot reach any
   of the tools - see ProductToolsPage::targetAvailable(). */
body.ProductTools .tools-empty {
  padding: 40px 24px;
  border: 1px solid #e6dbf0;
  border-radius: 16px;
  background: rgba(250, 245, 255, 0.4);
  text-align: center;
}

body.ProductTools .tools-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 12px;
  background-image: linear-gradient(to bottom right, #f3e8ff, #ffedd5);
}

body.ProductTools .tools-empty-icon svg {
  width: 20px;
  height: 20px;
  color: #7e22ce;
}

body.ProductTools .tools-empty p {
  margin: 0 0 16px;
  font-size: 15px;
  color: #6c5393;
}

body.ProductTools .tools-empty-link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 20px;
  border-radius: 9999px;
  background-image: linear-gradient(to right, #9333ea, #f97316);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

body.ProductTools .tools-empty-link:hover {
  opacity: 0.92;
}
