/* Simple Home Workout Tools — scoped under .shw-tool so nothing leaks into the theme.
   AI output uses the class names the prompts request (.section, .workout-grid, etc.);
   every one of those selectors is namespaced with .shw-tool here. */

.shw-tool {
  --shw-accent: #e94560;
  --shw-accent-dark: #c73652;
  --shw-accent-100: #fde8ec;
  --shw-accent-50: #fff5f7;
  --shw-ink: #1a1a2e;
  --shw-g200: #e5e7eb;
  --shw-g100: #f3f4f6;
  --shw-g50: #f9fafb;
  --shw-g700: #374151;
  --shw-g600: #4b5563;
  --shw-g500: #6b7280;
  --shw-g400: #9ca3af;
  font-family: inherit;
  color: var(--shw-g700);
  line-height: 1.6;
  margin: 8px 0 0;
}

.shw-tool * { box-sizing: border-box; }

.shw-tool-head { margin-bottom: 20px; }
.shw-tool-badge {
  display: inline-block; background: var(--shw-accent-100); color: var(--shw-accent-dark);
  font-family: "Barlow Condensed", system-ui, sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 10px;
}
.shw-tool-intro { font-size: 15px; color: var(--shw-g600); max-width: 60ch; margin: 0; }

/* ---- Form ---- */
.shw-tool-form {
  background: #fff; border: 1px solid var(--shw-g200); border-radius: 14px;
  box-shadow: 0 4px 22px rgba(26,26,46,.07); padding: 24px; margin-bottom: 6px;
}
.shw-tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.shw-tool-group { display: flex; flex-direction: column; gap: 6px; }
.shw-tool-group.full { grid-column: 1 / -1; }
.shw-tool label { font-size: 13px; font-weight: 700; color: var(--shw-g700); }
.shw-tool label .req { color: var(--shw-accent); }
.shw-tool select,
.shw-tool input[type="text"],
.shw-tool textarea {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--shw-g200); border-radius: 8px;
  font-family: inherit; font-size: 14px; color: var(--shw-ink); background: #fff; outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.shw-tool select:focus,
.shw-tool input[type="text"]:focus,
.shw-tool textarea:focus {
  border-color: var(--shw-accent); box-shadow: 0 0 0 3px rgba(233,69,96,.15);
}
.shw-tool textarea { resize: vertical; min-height: 90px; }

.shw-tool-submit {
  width: 100%; padding: 14px; margin-top: 4px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, var(--shw-accent), var(--shw-accent-dark));
  color: #fff; font-family: inherit; font-size: 15px; font-weight: 800; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.shw-tool-submit:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(233,69,96,.35); }
.shw-tool-submit:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* ---- Loading ---- */
.shw-tool-loading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 34px 16px; }
.shw-tool-spinner {
  width: 40px; height: 40px; border: 4px solid var(--shw-accent-100);
  border-top-color: var(--shw-accent); border-radius: 50%; animation: shw-spin .8s linear infinite;
}
.shw-tool-loading p { font-size: 14px; color: var(--shw-g500); font-weight: 600; }
@keyframes shw-spin { to { transform: rotate(360deg); } }

/* ---- Results ---- */
.shw-tool-results { margin-top: 8px; }
.shw-tool-error {
  background: #fef2f2; border: 1px solid #fecaca; color: #dc2626;
  border-radius: 10px; padding: 14px 18px; font-size: 14px; font-weight: 600;
}

.shw-tool .cta-banner {
  background: linear-gradient(135deg, var(--shw-ink), #0f3460); border-radius: 12px;
  padding: 20px 24px; display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap; margin-bottom: 24px;
}
.shw-tool .cta-banner h3 { color: #fff; font-family: "Barlow Condensed", system-ui, sans-serif; font-size: 19px; font-weight: 700; margin: 0 0 3px; }
.shw-tool .cta-banner p { color: rgba(255,255,255,.66); font-size: 13px; margin: 0; }
.shw-tool .cta-banner a {
  background: var(--shw-accent); color: #fff; font-weight: 800; font-size: 13px;
  padding: 10px 20px; border-radius: 999px; text-decoration: none; white-space: nowrap;
}
.shw-tool .cta-banner a:hover { background: var(--shw-accent-dark); }

.shw-tool .section { margin-bottom: 26px; }
.shw-tool .section-title {
  font-family: "Barlow Condensed", system-ui, sans-serif; font-size: 20px; font-weight: 700;
  color: var(--shw-ink); padding-bottom: 9px; margin-bottom: 14px; border-bottom: 2px solid var(--shw-accent-100);
}
.shw-tool .section > p { font-size: 14px; color: var(--shw-g700); line-height: 1.7; }

.shw-tool .workout-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .shw-tool .workout-grid { grid-template-columns: 1fr 1fr; } }
.shw-tool .workout-card {
  background: #fff; border: 1.5px solid var(--shw-g200); border-radius: 12px; padding: 16px;
  box-shadow: 0 2px 10px rgba(26,26,46,.05);
}
.shw-tool .workout-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; flex-wrap: wrap; }
.shw-tool .exercise-name { font-family: "Barlow Condensed", system-ui, sans-serif; font-weight: 700; color: var(--shw-ink); font-size: 16px; }
.shw-tool .exercise-badge { background: var(--shw-accent-100); color: var(--shw-accent-dark); border-radius: 999px; font-size: 11px; font-weight: 700; padding: 2px 10px; }
.shw-tool .exercise-desc { color: var(--shw-g600); font-size: 13px; line-height: 1.55; }

.shw-tool .equip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.shw-tool .equip-card {
  background: var(--shw-accent-50); border: 1px solid var(--shw-accent-100); border-radius: 12px;
  padding: 16px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
}
.shw-tool .equip-card strong { font-weight: 700; color: var(--shw-ink); font-size: 13px; }
.shw-tool .equip-card span { color: var(--shw-g600); font-size: 12px; }

.shw-tool .tips-list { display: flex; flex-direction: column; gap: 10px; list-style: none; padding: 0; margin: 0; }
.shw-tool .tip-item {
  display: flex; gap: 12px; align-items: flex-start; background: var(--shw-g50);
  border-left: 3px solid var(--shw-accent); border-radius: 0 8px 8px 0; padding: 12px 14px;
}
.shw-tool .tip-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.shw-tool .tip-item p { font-size: 13px; color: var(--shw-g700); line-height: 1.55; margin: 0; }

/* ---- Contextual shop block (Equipment Advisor) ---- */
.shw-tool-shop { margin-top: 8px; margin-bottom: 26px; }
.shw-tool-shop-note { font-size: 12px; color: var(--shw-g500); margin: -4px 0 14px; }
.shw-tool-shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.shw-tool-shop-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  background: #fff; border: 1.5px solid var(--shw-g200); border-radius: 12px; padding: 16px 12px;
  text-decoration: none; color: var(--shw-ink); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.shw-tool-shop-card:hover { border-color: var(--shw-accent); transform: translateY(-3px); box-shadow: 0 8px 22px rgba(233,69,96,.12); }
.shw-tool-shop-emoji { font-size: 24px; }
.shw-tool-shop-label { font-weight: 700; font-size: 13px; }
.shw-tool-shop-cta { font-size: 12px; font-weight: 800; color: var(--shw-accent); }

/* ---- Foot ---- */
.shw-tool-foot { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--shw-g200); text-align: center; }
.shw-tool-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 12px; }
.shw-tool-pills span {
  background: #fff; border: 1px solid var(--shw-g200); border-radius: 999px;
  font-size: 12px; font-weight: 700; color: var(--shw-g600); padding: 4px 14px;
}
.shw-tool-disclaimer { font-size: 12px; color: var(--shw-g400); max-width: 60ch; margin: 0 auto; }

@media (max-width: 540px) {
  .shw-tool-grid { grid-template-columns: 1fr; }
  .shw-tool-form { padding: 18px; }
}
