.ahgc {
  --ahgc-ink: #142033;
  --ahgc-muted: #617085;
  --ahgc-line: #dfe5ec;
  --ahgc-surface: #fff;
  --ahgc-soft: #f3f6f8;
  --ahgc-red: #d71920;
  --ahgc-red-dark: #ad1117;
  --ahgc-blue: #4893e5;
  --ahgc-blue-dark: #2875c8;
  color: var(--ahgc-ink);
  font-family: inherit;
  margin: 2rem auto;
  max-width: 1180px;
}

.ahgc[data-ahgc-placed="true"] {
  margin-block: clamp(2.5rem, 6vw, 5rem);
  width: min(1180px, calc(100% - 2rem));
}

/* The private MCP preview hides the admin bar, but WordPress leaves its
   32/46px offset on <html>. JavaScript adds this class only when the bar is
   genuinely absent, so normal logged-in WordPress pages keep their spacing. */
html.ahgc-no-admin-bar { margin-top: 0 !important; }

/* Keep the page banner, but remove the introductory Elementor copy on the
   two payment-return views so the status is the first content below it. */
body.ahgc-return-page .elementor-element-0a4d052 { display: none !important; }
body.ahgc-return-page .ahgc[data-ahgc-placed="true"] { margin-block-start: 1rem; }

/* Match the introductory Elementor section to the page canvas, but only when
   it sits directly before the placed gift-card checkout. */
.elementor:has(> .ahgc[data-ahgc-placed="true"]) > .e-con:has(+ .ahgc[data-ahgc-placed="true"]) {
  background-color: #f7f7f7 !important;
}

/* Elementor fallback: the checkout normally moves out of the legacy section
   in JavaScript. These rules keep the page clean if deferred script execution
   briefly leaves it inside the old document structure. */
.elementor-element-4af8a91,
.elementor-element-2959297,
.elementor-element-3d64e97 .elementor-element-2a46d81,
.elementor-element-3d64e97 .elementor-element-61696a2,
.elementor-element-3d64e97 .elementor-element-324bc17,
.elementor-element-3d64e97 .elementor-element-2b9d3c9,
.elementor-element-3d64e97 .elementor-element-8bd646e { display: none !important; }

.elementor-element-3d64e97:has(.ahgc) {
  background: transparent !important;
  padding: 0 !important;
}

.elementor-element-3d64e97:has(.ahgc) > .e-con-inner,
.elementor-element-3d64e97 .elementor-element-8f3074a:has(.ahgc),
.elementor-element-3d64e97 .elementor-element-7ad4cfb:has(.ahgc),
.elementor-element-3d64e97 .elementor-element-7ad4cfb:has(.ahgc) > .elementor-widget-container {
  display: block !important;
  max-width: none !important;
  padding: 0 !important;
  width: 100% !important;
}

.ahgc *, .ahgc *::before, .ahgc *::after { box-sizing: border-box; }
.ahgc button, .ahgc input { font: inherit; }

.ahgc__hero {
  align-items: center;
  background: linear-gradient(120deg, #262626 0%, #383838 100%);
  border-radius: 24px 24px 0 0;
  color: #fff;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem);
  position: relative;
}

.ahgc__hero::after {
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 14px, transparent 14px 28px);
  content: "";
  inset: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 28%, rgba(0,0,0,.18) 44%, #000 68%);
  mask-image: linear-gradient(90deg, transparent 28%, rgba(0,0,0,.18) 44%, #000 68%);
  opacity: .78;
  pointer-events: none;
  position: absolute;
}

.ahgc__hero > * { position: relative; z-index: 1; }
.ahgc__hero h2 { color: #fff; font-size: clamp(2rem, 4.35vw, 3.35rem); letter-spacing: -.035em; line-height: .98; margin: .35rem 0 1.15rem; text-wrap: balance; }
.ahgc__hero h2 span { display: block; }
.ahgc__hero p:not(.ahgc__eyebrow) { color: #d8e0eb; font-size: 1.08rem; margin: 0; max-width: 620px; }
.ahgc__eyebrow { color: #79b5f4; font-size: .78rem; font-weight: 800; letter-spacing: .14em; margin: 0; text-transform: uppercase; }

.ahgc__ticket {
  background: #fff;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,.3);
  color: var(--ahgc-ink);
  display: grid;
  flex: 0 0 210px;
  padding: 1.6rem;
  transform: rotate(5deg);
}
.ahgc__ticket span, .ahgc__ticket small { font-size: .68rem; font-weight: 800; letter-spacing: .18em; }
.ahgc__ticket strong { color: var(--ahgc-blue-dark); font-size: 1.7rem; line-height: 1.1; margin: .25rem 0 .75rem; }

.ahgc__form { background: var(--ahgc-soft); border: 1px solid var(--ahgc-line); border-radius: 0 0 24px 24px; padding: clamp(1rem, 4vw, 2.5rem); }
.ahgc__return-wrap { background: var(--ahgc-soft); border: 1px solid var(--ahgc-line); border-radius: 24px; padding: clamp(1rem, 4vw, 2.5rem); scroll-margin-top: 1rem; }
.ahgc__return-wrap--rejected { border-bottom: 0; border-radius: 0; padding-bottom: 0; }
.ahgc__return-wrap--rejected + .ahgc__form { border-top: 0; padding-top: 1.5rem; }
.ahgc__return { align-items: flex-start; background: var(--ahgc-surface); border: 1px solid var(--ahgc-line); border-radius: 18px; box-shadow: 0 12px 36px rgba(20,32,51,.08); display: flex; gap: 1.1rem; margin: 0 auto; max-width: 820px; padding: clamp(1.4rem, 4vw, 2.4rem); }
.ahgc__return--success { border-top: 4px solid #21864b; }
.ahgc__return--rejected { border-top: 4px solid var(--ahgc-red); }
.ahgc__return-icon { align-items: center; background: #e4f6ea; border-radius: 50%; color: #176a39; display: inline-flex; flex: 0 0 48px; font-size: 1.5rem; font-weight: 900; height: 48px; justify-content: center; line-height: 1; width: 48px; }
.ahgc__return--rejected .ahgc__return-icon { background: #fff0ef; color: var(--ahgc-red-dark); }
.ahgc__return-eyebrow { color: var(--ahgc-muted); font-size: .72rem; font-weight: 800; letter-spacing: .12em; margin: .15rem 0 .35rem; text-transform: uppercase; }
.ahgc__return h3 { color: var(--ahgc-ink); font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.1; margin: 0 0 .7rem; }
.ahgc__return h3:focus { outline: 0; }
.ahgc__return h3:focus-visible { border-radius: 4px; box-shadow: 0 0 0 3px rgba(72,147,229,.24); }
.ahgc__return p:not(.ahgc__return-eyebrow, .ahgc__return-error) { color: var(--ahgc-muted); font-size: 1rem; line-height: 1.6; margin: 0; }
.ahgc__retry { align-items: center; appearance: none; background: var(--ahgc-blue); border: 0; border-radius: 999px; color: #fff; cursor: pointer; display: inline-flex; font-size: .95rem; font-weight: 800; gap: .75rem; justify-content: center; margin-top: 1.2rem; padding: .85rem 1.15rem; transition: background .15s ease, transform .15s ease; }
.ahgc__retry:hover:not(:disabled) { background: var(--ahgc-blue-dark); transform: translateY(-1px); }
.ahgc__retry:disabled { cursor: wait; opacity: .7; }
.ahgc__return-error { background: #fff1f0; border: 1px solid #e8a7a2; border-radius: 8px; color: #8d2620; font-size: .86rem; margin: 1rem 0 0; padding: .75rem; }
.ahgc__return-error[hidden] { display: none; }
.ahgc__layout { align-items: start; display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr) minmax(290px, 360px); }
.ahgc__main { display: grid; gap: 1.5rem; }
.ahgc__section, .ahgc__summary { background: var(--ahgc-surface); border: 1px solid var(--ahgc-line); border-radius: 16px; box-shadow: 0 8px 30px rgba(20,32,51,.05); }
.ahgc__section { margin: 0; min-width: 0; padding: clamp(1.25rem, 3vw, 2rem); }
.ahgc__section legend { align-items: center; display: flex; float: left; font-size: 1.25rem; font-weight: 800; margin: 0 0 1.4rem; padding: 0; width: 100%; }
.ahgc__section legend + * { clear: both; }
.ahgc__section legend span { align-items: center; background: var(--ahgc-red); border-radius: 50%; color: #fff; display: inline-flex; font-size: .85rem; height: 30px; justify-content: center; margin-right: .7rem; width: 30px; }

.ahgc__quantity { align-items: center; border-bottom: 1px solid var(--ahgc-line); display: flex; justify-content: space-between; padding: .15rem 0 1.2rem; }
.ahgc__quantity strong, .ahgc__quantity small { display: block; }
.ahgc__quantity small { margin-top: .15rem; }
.ahgc__quantity small, .ahgc__hint { color: var(--ahgc-muted); }
.ahgc__stepper { align-items: center; display: flex; gap: .65rem; }
.ahgc__stepper button { align-items: center; appearance: none; background: transparent !important; border: 1px solid transparent !important; border-radius: 50% !important; box-shadow: none !important; color: var(--ahgc-ink); cursor: pointer; display: flex; flex: 0 0 38px; font-size: 1.35rem; height: 38px; justify-content: center; line-height: 1; min-width: 38px; padding: 0 !important; transform: none !important; transition: background-color .15s ease, border-color .15s ease, color .15s ease; width: 38px; }
.ahgc__stepper button:hover:not(:disabled) { background: rgba(72,147,229,.09) !important; border-color: rgba(72,147,229,.24) !important; color: var(--ahgc-blue-dark) !important; }
.ahgc__stepper button:active:not(:disabled) { background: rgba(72,147,229,.16) !important; }
.ahgc__stepper button:focus-visible { border-color: var(--ahgc-blue) !important; box-shadow: 0 0 0 3px rgba(72,147,229,.18) !important; outline: 0; }
.ahgc__stepper button:disabled { cursor: not-allowed; opacity: .4; }
.ahgc__stepper output { font-size: 1.15rem; font-weight: 800; min-width: 28px; text-align: center; }

.ahgc__quick { align-items: center; border-bottom: 1px solid var(--ahgc-line); display: flex; flex-wrap: wrap; gap: .85rem; margin: 1rem 0 0; padding-bottom: .8rem; }
.ahgc__quick span { color: var(--ahgc-muted); font-size: .85rem; margin-right: .15rem; }
.ahgc__quick button { appearance: none; background: transparent !important; border: 0; border-bottom: 2px solid transparent; border-radius: 0 !important; box-shadow: none !important; color: var(--ahgc-blue-dark); cursor: pointer; font-size: .82rem; font-weight: 800; min-height: 0; min-width: 0; padding: .28rem .05rem !important; transform: none !important; transition: border-color .15s ease, color .15s ease; }
.ahgc__quick button:hover { background: transparent !important; border-bottom-color: var(--ahgc-blue) !important; box-shadow: none !important; color: var(--ahgc-ink) !important; }
.ahgc__quick button:active { background: transparent !important; color: var(--ahgc-blue-dark) !important; }
.ahgc__quick button:focus-visible { background: transparent !important; border-bottom-color: var(--ahgc-blue) !important; box-shadow: none !important; outline: 2px solid rgba(72,147,229,.38); outline-offset: 3px; }

.ahgc__cards { column-gap: 2rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ahgc__card-row { align-items: center; border-bottom: 1px solid var(--ahgc-line); display: flex; font-weight: 700; justify-content: space-between; padding: .85rem 0; }
.ahgc__amount-field { align-items: center; display: flex; gap: .4rem; }
.ahgc__amount-field input { background: transparent; border: 0; border-bottom: 2px solid #bdc9d7; border-radius: 0; color: var(--ahgc-ink); flex: 0 0 98px; font-weight: 800; max-width: 98px; padding: .4rem .45rem .4rem .25rem; text-align: right; width: 98px; }
.ahgc__amount-field input::-webkit-inner-spin-button { margin-left: .6rem; }
.ahgc__amount-field input:focus { box-shadow: none; }

.ahgc__hint { font-size: .92rem; margin: -.7rem 0 1.25rem; }
.ahgc__fields { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ahgc__fields label { color: #35445a; display: grid; font-size: .86rem; font-weight: 700; gap: .4rem; }
.ahgc__fields .ahgc__wide { grid-column: 1 / -1; }
.ahgc__fields input { background: #fff; border: 1px solid #cbd4df; border-radius: 9px; color: var(--ahgc-ink); min-width: 0; padding: .78rem .85rem; width: 100%; }
.ahgc input:focus, .ahgc button:focus-visible, .ahgc a:focus-visible { border-color: var(--ahgc-blue); box-shadow: 0 0 0 3px rgba(72,147,229,.24); outline: none; }

.ahgc__summary { padding: 1.5rem; position: sticky; top: 5rem; }
body.admin-bar .ahgc__summary { top: calc(5rem + 32px); }
.ahgc__summary h3 { font-size: 1.3rem; margin: 0 0 1.2rem; }
.ahgc__summary-line { color: var(--ahgc-muted); display: flex; font-size: .9rem; justify-content: space-between; padding: .42rem 0; }
.ahgc__summary-line strong { color: var(--ahgc-ink); }
.ahgc__total { align-items: baseline; border-bottom: 1px solid var(--ahgc-line); border-top: 1px solid var(--ahgc-line); display: flex; justify-content: space-between; margin: 1rem 0; padding: 1rem 0; }
.ahgc__total strong { font-size: 1.45rem; }
.ahgc__terms { align-items: start; cursor: pointer; display: grid; font-size: .85rem; gap: .6rem; grid-template-columns: 18px minmax(0, 1fr); line-height: 1.45; margin: 1rem 0; }
.ahgc__terms input { accent-color: var(--ahgc-blue-dark); cursor: pointer; flex: 0 0 auto; height: 18px; margin-top: .1rem; transform-origin: center; transition: box-shadow .15s ease, transform .15s ease; width: 18px; }
.ahgc__terms:hover input { box-shadow: 0 0 0 4px rgba(72,147,229,.16); transform: translateY(-1px) scale(1.04); }
.ahgc__terms input:focus-visible { box-shadow: 0 0 0 4px rgba(72,147,229,.24); outline: 1px solid var(--ahgc-blue); outline-offset: 1px; }
.ahgc__terms a { color: var(--ahgc-blue-dark); font-size: inherit; font-weight: 700; line-height: inherit; }
.ahgc__notice { background: #fff1f0; border: 1px solid #e8a7a2; border-radius: 8px; color: #8d2620; font-size: .86rem; margin: 1rem 0; padding: .75rem; }
.ahgc__notice[hidden] { display: none; }
.ahgc__submit { align-items: center; background: var(--ahgc-blue); border: 0; border-radius: 999px; color: #fff; cursor: pointer; display: flex; font-size: 1rem; font-weight: 800; justify-content: space-between; padding: 1rem 1.25rem; transition: background .15s ease, transform .15s ease; width: 100%; }
.ahgc__submit span { font: inherit; line-height: inherit; }
.ahgc__submit span:last-child { flex: 0 0 auto; margin-left: .75rem; }
.ahgc__submit:hover:not(:disabled) { background: var(--ahgc-blue-dark); transform: translateY(-1px); }
.ahgc__submit:disabled { cursor: wait; opacity: .7; }
.ahgc__submit.is-loading span:last-child { animation: ahgc-pulse 1s infinite alternate; }
.ahgc__secure { color: var(--ahgc-muted); font-size: .73rem; line-height: 1.4; margin: .8rem 0 0; text-align: center; }

@keyframes ahgc-pulse { to { opacity: .25; } }

@media (max-width: 820px) {
  .ahgc__layout { grid-template-columns: 1fr; }
  .ahgc__summary { position: static; }
  .ahgc__ticket { display: none; }
  .ahgc__hero::after {
    -webkit-mask-image: linear-gradient(90deg, transparent 48%, #000 100%);
    mask-image: linear-gradient(90deg, transparent 48%, #000 100%);
    opacity: .42;
  }
}

@media (max-width: 782px) {
  body.admin-bar .ahgc__summary { top: calc(5rem + 46px); }
}

@media (max-width: 560px) {
  .ahgc { margin-inline: auto; }
  .ahgc__hero { border-radius: 16px 16px 0 0; padding: 2rem 1.2rem; }
  .ahgc__form { border-radius: 0 0 16px 16px; padding: .75rem; }
  .ahgc__cards, .ahgc__fields { grid-template-columns: 1fr; }
  .ahgc__fields .ahgc__wide { grid-column: auto; }
  .ahgc__quantity { align-items: flex-start; gap: 1rem; }
  .ahgc__card-row { font-size: .9rem; }
  .ahgc__summary { padding: 1.25rem; }
  .ahgc__return { display: grid; gap: .9rem; }
  .ahgc__return-icon { height: 42px; width: 42px; }
  .ahgc__retry { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .ahgc *, .ahgc *::before, .ahgc *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}
