/*
 * Promo mechanics page (instruction.php).
 *
 * Built on app.css (tokens, .page, .card) and the banner in
 * registration-enhanced.css. Written phone-first: everything stacks, and the
 * wider layouts are added at the breakpoints at the bottom.
 */

.mechanics .card {
  padding: 22px 16px 28px;
}

.mech-back {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.mech-back:hover { text-decoration: underline; }

.mech-title {
  margin-bottom: 18px;
}

/* ------------------------------------------------------------------ */
/* Tabs: two equal halves, sticky so switching is always one tap away  */
/* ------------------------------------------------------------------ */
.mech-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0 -16px 22px;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.mech-tab {
  min-height: 52px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  color: #4b5563;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}

.mech-tab:hover { border-color: var(--orange); color: var(--orange); }

.mech-tab.is-active {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}

.mech-tab:focus-visible { outline: 3px solid rgba(255, 51, 0, .3); outline-offset: 2px; }

/* ------------------------------------------------------------------ */
/* Panel content                                                       */
/* ------------------------------------------------------------------ */
.mech-panel[hidden] { display: none; }

.mech-panel {
  color: #374151;
  font-size: 15px;
  line-height: 1.65;
}

.mech-panel__title {
  margin: 0 0 20px;
  color: var(--ink);
  font-size: clamp(20px, 5.4vw, 30px);
  line-height: 1.15;
}

.mech-section {
  margin-bottom: 28px;
}

.mech-section h3 {
  margin: 0 0 10px;
  padding-left: 10px;
  border-left: 4px solid var(--orange);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.3;
}

.mech-section p { margin: 0 0 10px; }

.mech-callout {
  padding: 14px 16px;
  border-radius: 10px;
  background: #fff3ef;
  color: #7d2816;
  font-weight: 700;
}

.mech-warning {
  padding: 10px 14px;
  border-left: 4px solid var(--danger);
  border-radius: 6px;
  background: #fff0f0;
  color: #8f1c12;
  font-weight: 700;
}

.mech-sub {
  font-weight: 700;
  color: var(--ink);
}

/* Numbered lists: a filled orange number, then the text. */
.mech-steps,
.mech-terms,
.mech-reminders {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  counter-reset: mech;
}

.mech-steps > li,
.mech-terms > li,
.mech-reminders > li {
  position: relative;
  margin-bottom: 12px;
  padding-left: 38px;
  counter-increment: mech;
}

.mech-steps > li::before,
.mech-terms > li::before,
.mech-reminders > li::before {
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  content: counter(mech);
}

.mech-reminders > li strong {
  display: block;
  color: var(--ink);
}

.mech-reminders > li p { margin: 4px 0 0; }

/* Proof of purchase: two small cards. */
.mech-proof {
  display: grid;
  gap: 12px;
}

.mech-proof__group {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafafa;
}

.mech-proof__group h4 {
  margin: 0 0 6px;
  color: var(--orange);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.mech-proof__group ul { margin: 0; padding-left: 18px; font-size: 14px; }
.mech-proof__group li { margin-bottom: 6px; }

/* Product tiers: a badge, then the models as chips. */
.mech-tiers {
  display: grid;
  gap: 14px;
}

.mech-tier {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.mech-tier__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.mech-tier__badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .03em;
}

.mech-tier__badge--wide {
  border-radius: 8px;
  line-height: 1.4;
}

.mech-tier__count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mech-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mech-chips li {
  padding: 4px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.4;
}

/* Hydro Flask tab: tumbler descriptions read better on a lighter badge. */
.mech-panel--hydro .mech-tier__badge--wide {
  background: #fff3ef;
  color: #7d2816;
  border: 1px solid #f0c7bc;
}

/* Bratpack stores: cards on a phone, a table from 720px. */
.mech-stores {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.mech-stores thead { display: none; }

.mech-stores tr {
  display: block;
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.mech-stores td {
  display: block;
  padding: 2px 0;
}

.mech-stores td[data-label="Region"] {
  color: var(--orange);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mech-stores td[data-label="Mall"] { color: var(--ink); font-size: 15px; }
.mech-stores td[data-label="Address"] { color: var(--muted); font-size: 13px; }

.mech-permit {
  margin: 32px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: #6b7280;
  font-size: 12px;
}

/* ------------------------------------------------------------------ */
/* Wider screens                                                       */
/* ------------------------------------------------------------------ */
@media (min-width: 560px) {
  .mech-tab { font-size: 12.5px; }
  .mech-proof { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 720px) {
  .mechanics .card { padding: clamp(28px, 5vw, 52px); }
  .mech-tabs { margin-inline: 0; padding-inline: 0; }
  .mech-tab { min-height: 56px; font-size: 13.5px; }

  .mech-stores thead { display: table-header-group; }
  .mech-stores tr { display: table-row; margin: 0; padding: 0; border: 0; border-radius: 0; }
  .mech-stores th,
  .mech-stores td { display: table-cell; padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
  .mech-stores th { background: var(--ink); color: #fff; font-size: 12px; letter-spacing: .06em; }
  .mech-stores tbody tr:nth-child(even) td { background: #fafafa; }
  .mech-stores td[data-label="Region"] { width: 18%; font-size: 12px; }
  .mech-stores td[data-label="Mall"] { width: 27%; font-size: 14px; }
  .mech-stores td[data-label="Address"] { color: #374151; font-size: 14px; }
}

/* ------------------------------------------------------------------ */
/* Participating Stores tab                                            */
/* ------------------------------------------------------------------ */
.mech-link { color: var(--orange); font-weight: 700; }

.mech-store-search { display: grid; gap: 6px; margin: 4px 0 18px; font-weight: 700; color: var(--ink); }
.mech-store-search input { min-height: 46px; }
.mech-store-empty { color: var(--muted); font-weight: 700; }

.mech-store-region { margin-bottom: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.mech-store-region > summary { padding: 12px 16px; font-weight: 800; color: var(--ink); cursor: pointer; }
.mech-store-region[open] > summary { border-bottom: 1px solid var(--line); }
.mech-store-region > .mech-store-list,
.mech-store-province { padding: 8px 16px 12px; }

.mech-store-province h4 { margin: 8px 0 6px; color: var(--orange); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.mech-store-city h5 { margin: 10px 0 4px; color: var(--ink); font-size: 14px; }

.mech-store-list { margin: 0; padding: 0; list-style: none; }
.mech-store-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 6px 0; border-bottom: 1px dashed #e5e7eb; font-size: 14px; }
.mech-store-list li:last-child { border-bottom: 0; }

.mech-store__badge { padding: 2px 8px; border-radius: 999px; background: #fff3ef; color: #7d2816; font-size: 11px; font-weight: 700; white-space: nowrap; }
.mech-store__badge--none { background: var(--soft); color: var(--muted); }

[data-store-group][hidden], [data-store-item][hidden] { display: none !important; }

@media (max-width: 559px) {
  .mech-tabs { grid-template-columns: 1fr 1fr; }
  .mech-tabs .mech-tab:last-child { grid-column: 1 / -1; }
}
