/*
 * The HGA storefront's own rules: what Yamu's pages lack, styled with their
 * custom properties (--red, --ink, --line-2…), loaded after their stylesheets in
 * layouts/hga_storefront. Their files under hga_storefront/css/ stay exactly
 * as Yamu wrote them (test/config/hga_storefront_assets_test.rb), so a fix to
 * how one of their elements looks goes here, never there. Our own classes are
 * sf- (storefront), so none can meet one of theirs.
 */

/* Stripe's card field, where Yamu's page has card inputs: the same box as
   their .f input, and the states Stripe sets on it. */
.sf-card {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 156px 0 14px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  transition: border-color .15s, box-shadow .15s;
}
.sf-card > * { width: 100%; }
.sf-card.StripeElement--focus { border-color: var(--text); box-shadow: 0 0 0 3px var(--line); }
.sf-card.StripeElement--invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(230, 36, 41, .12); }

/* Why a POST was refused, and a known email's note, just above Pay. */
.sf-refusal,
.sf-alert {
  border-left: 4px solid var(--red);
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--red-text);
}
.sf-refusal ul { display: grid; gap: 4px; }

/* Why Pay is shut: a disabled button gives no feedback on click. Gone once
   the terms box is ticked. */
.sf-terms-hint { margin-top: -6px; font-size: 13px; color: var(--red-text); text-align: center; }
.co-place:has(#pass-terms:checked) .sf-terms-hint { display: none; }

/* Yamu's .btn has no disabled look, so a shut Pay read as live. */
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; transform: none; }

/* A signed-in buyer: who is paying, and their saved ways to pay. */
.sf-buyer { display: grid; gap: 2px; font-size: 15px; }
.sf-buyer span { color: var(--text-2); }
.sf-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  cursor: pointer;
  color: var(--text);
  text-decoration: none;
}
.sf-method:has(input:checked) { border-color: var(--text); }
.sf-method > span { display: grid; gap: 2px; font-size: 15px; }
.sf-method > span > span { font-size: 13px; color: var(--text-2); }
.sf-method input { accent-color: var(--red); width: 18px; height: 18px; flex-shrink: 0; }
.sf-method .sf-method-warning-error { color: var(--red-text); }
.sf-method-new:hover { border-color: var(--text); }
.sf-fund { font-size: 14px; color: var(--text); text-decoration-color: var(--red); text-underline-offset: 3px; }

/* A notice the page arrived with (a card added, a sign-in), over the top of
   the page. flash_controller fades it after five seconds or a click: it adds
   .hidden, which Yamu's CSS doesn't define, then removes the element. */
.sf-flash {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: grid;
  gap: 6px;
  max-width: min(92vw, 480px);
  padding: 12px 16px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: opacity .3s;
}
.sf-flash.hidden { opacity: 0; }
.sf-flash-alert { color: var(--red-text); }

/* The product page's 3D poly slab is a drawing of the case, not a photograph
   of it, and the line under it says so. Yamu's page has no such line. It sits
   after the gallery's two stages and shows only while the poly one does, and
   never over a photo (.is-photo), where the stages are hidden by class. */
.sf-render-note {
  display: none;
  max-width: 36ch;
  margin: 0;
  padding: 0 12px;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, .62);
}
.sh-gal:not(.is-photo) .stage-in[data-housing="poly"]:not([hidden]) ~ .sf-render-note { display: block; }
