/**
 * v117-additions.css
 *
 * 1. Hamburger → X animation on open; reverses on close
 * 2. Size guide tabs stretch to fill full container width on desktop
 * 3. Size guide table — true scale-to-fit (no inherited shrunken min-width)
 * 4. Support form — email + all inputs properly full-width on PC
 */

/* ══════════════════════════════════════════════════════════
   1. HAMBURGER → X WHEN LEFT MENU IS OPEN
   The three bars animate into an X on open, reverse on close.
   Uses body.cb-menu-left-open (added by menu.js v117).
   ══════════════════════════════════════════════════════════ */

/* Allow bars to rotate — override flex layout for transform origin */
.cb-hamburger span {
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              opacity   0.18s ease,
              background 0.25s ease !important;
  transform-origin: center center;
  display: block;
}

/* Top bar → rotates +45° */
body.cb-menu-left-open .cb-hamburger span:nth-child(1) {
  transform: translateY(5px) rotate(45deg) !important;
}
/* Middle bar → fades out */
body.cb-menu-left-open .cb-hamburger span:nth-child(2) {
  opacity: 0 !important;
  transform: scaleX(0) !important;
}
/* Bottom bar → rotates -45° */
body.cb-menu-left-open .cb-hamburger span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg) !important;
}

/* Keep hamburger pink in open state (it already is, belt+braces) */
body.cb-menu-left-open .cb-hamburger {
  background: var(--cb-hamburger-pink) !important;
}

/* ══════════════════════════════════════════════════════════
   2. SIZE GUIDE TABS — stretch to fill full container width
   Override size-guide.css and v115/v116 rules that cap at max-content.
   ══════════════════════════════════════════════════════════ */

.cb-size-guide .sg-gender-toggle {
  width: 100% !important;
  max-width: 100% !important;
  justify-content: stretch !important;
  box-sizing: border-box !important;
  /* Prevent bleeding past the padded section */
  display: flex !important;
}

.cb-size-guide .sg-tab {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  text-align: center !important;
}

/* ══════════════════════════════════════════════════════════
   3. SIZE GUIDE TABLE — true scale-to-fit
   Previous versions set min-width: 760px / 740px / 420px which
   left the table shrunken inside a larger container on desktop.
   Strip all inherited min-width constraints and let the table
   fill 100% of its scrollable wrapper.
   ══════════════════════════════════════════════════════════ */

/* Wrapper fills the page edge-to-edge (padding already from v115/v116) */
.sg-table-wrap {
  width: 100% !important;
  box-sizing: border-box !important;
  overflow-x: auto !important;
}

/* Table: fill wrapper, no forced min-width on desktop */
.sg-table {
  width: 100% !important;
  min-width: 0 !important;           /* reset all inherited min-widths */
  table-layout: auto !important;     /* columns size to content */
  border-collapse: collapse !important;
}

/* On narrow screens, restore a sensible floor so columns don't collapse */
@media (max-width: 600px) {
  .sg-table { min-width: 300px !important; }
}

/* Cells: scale with vw on desktop so nothing is shrunken */
.sg-table th,
.sg-table td {
  padding: clamp(.55rem, 1.3vw, .9rem) clamp(.65rem, 1.6vw, 1.1rem) !important;
  font-size: clamp(.52rem, 1.1vw, .78rem) !important;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════
   4. SUPPORT FORM — email + all inputs full-width on PC
   The issue: .cb-info-card wraps the form and its inline-block
   or shrink-wrapped width is fighting the input's width:100%.
   Force the card, form, and every field to be proper block/full-width.
   ══════════════════════════════════════════════════════════ */

.cb-support-page .cb-info-card {
  /* Card must stretch to its grid column, not shrink to content */
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.cb-support-form {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.cb-support-form .cb-form-row {
  width: 100% !important;
  box-sizing: border-box !important;
  display: block !important;
}

.cb-support-form input[type="text"],
.cb-support-form input[type="email"],
.cb-support-form input[type="tel"],
.cb-support-form select,
.cb-support-form textarea {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  /* Normalize height/padding so all fields look the same */
  padding: .78rem .85rem !important;
  font-size: var(--cb-font-small) !important;
  line-height: 1.4 !important;
  border: 1px solid var(--cb-border) !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: var(--cb-color-body) !important;
  font-family: 'JetBrains Mono', monospace !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

/* Re-apply the select chevron (appearance:none removes native arrow) */
.cb-support-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23555' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.8rem center !important;
  padding-right: 2.5rem !important;
}

.cb-support-form textarea {
  min-height: 140px !important;
  resize: vertical !important;
}

.cb-support-form button[type="submit"],
.cb-support-form .cb-submit-btn {
  width: 100% !important;
  box-sizing: border-box !important;
}
