/* ==========================================================
   INN8 Foods — Shared Cart Styles  (cart.css)
   Collect code gate + collect button.
   Loaded by all 4 pages so the UI is pixel-identical
   regardless of which product is in the cart.
   ========================================================== */

/* ── Collect gate container ──────────────────────────────── */
.collect-gate {
  margin-top: 12px;
}

/* "Have a collect code?" toggle button */
.collect-toggle {
  display: block;
  width: 100%;
  background: transparent;
  color: var(--stone);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 12px;
  border: 1px dashed var(--border);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  text-align: center;
}
.collect-toggle:hover {
  border-color: rgba(139, 58, 42, 0.3);
  color: var(--white);
}

/* Code input row */
.collect-input-wrap {
  display: flex;
  gap: 0;
  margin-top: 8px;
}

.collect-input {
  flex: 1;
  background: #0d0b09;
  border: 1px solid var(--border);
  color: var(--white);
  font-family: var(--font);
  font-size: 12px;
  padding: 12px 14px;
  outline: none;
  /* Prevent iOS zoom on focus */
  -webkit-appearance: none;
}
.collect-input:focus {
  border-color: rgba(139, 58, 42, 0.4);
}
.collect-input::placeholder {
  color: #555;
}

.collect-apply {
  background: var(--rust);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 16px;
  transition: background 0.2s;
  white-space: nowrap;
}
.collect-apply:hover {
  background: var(--rust-md);
}

/* Validated state — shown after correct code is entered */
.collect-success {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}
.collect-success span {
  font-size: 11px;
  font-weight: 600;
  color: #44aa88;
  letter-spacing: 0.04em;
}

/* ── Collect checkout button ─────────────────────────────── */
/* Appears after code is validated; triggers checkout(true)  */
.cart-collect-btn {
  display: block;
  width: 100%;
  background: transparent;
  color: var(--stone);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  text-align: center;
  margin-top: 8px;
}
.cart-collect-btn:hover {
  border-color: var(--rust);
  color: var(--white);
}
.cart-collect-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Compact variant of the collect button when it sits inside .collect-success */
.collect-success .cart-collect-btn {
  width: auto;
  margin-top: 0;
  padding: 10px 18px;
  font-size: 9px;
}

/* ── Mobile overrides ────────────────────────────────────── */
@media (max-width: 900px) {
  .collect-toggle {
    font-size: 13px;
    padding: 16px;
    letter-spacing: 0.1em;
  }
  .collect-input {
    /* font-size ≥ 16px prevents iOS auto-zoom on focus */
    font-size: 16px;
    padding: 16px;
  }
  .collect-apply {
    font-size: 13px;
    padding: 16px 20px;
  }
  .collect-success span {
    font-size: 13px;
  }
  .collect-success .cart-collect-btn {
    font-size: 12px;
    padding: 14px 20px;
  }
}
