/* =====================================================================
   AIER Event Sponsorship — same visual language as the Credit Points
   purchase card and the existing AIER tokens (#143b66 navy, #1499a6
   teal, Mulish).
   ===================================================================== */

/* "Join as a Sponsor" on the event listing (sits after Register as group).
   Same bordered pill as "Register myself" (.aier-btn--outline: 2px solid
   #143b66). The extra classes in the selector are deliberate: aier-events.css
   sets `.aier-catalog-page .aier-btn { border: none; }` at the same
   specificity and loads later, which is what removed the border before. */
.aier-catalog-page .aier-event-actions a.aier-btn.aier-btn--sponsor {
  background: #fff; color: #143b66; border: 2px solid #143b66; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; line-height: 1.3;
}
.aier-catalog-page .aier-event-actions a.aier-btn.aier-btn--sponsor::before { content: "★"; font-size: 12px; color: #d9a441; }
.aier-catalog-page .aier-event-actions a.aier-btn.aier-btn--sponsor:hover { background: #f3f7fb; color: #143b66; }

/* ---- Detail page section ---- */
.aier-sponsor {
  font-family: 'Mulish', system-ui, -apple-system, sans-serif;
  color: #3f4a57; background: #fff; border: 1px solid #dfe5ec; border-radius: 14px;
  box-shadow: 0 6px 24px rgba(20, 59, 102, .07); margin: 28px 0; overflow: hidden;
  scroll-margin-top: 110px; /* clears the sticky site header when scrolled to */
}
.aier-sponsor * { box-sizing: border-box; }
.aier-sponsor .aier-hidden { display: none !important; }

.aier-sponsor__head {
  display: flex; gap: 16px; align-items: center; padding: 24px 24px 22px;
  background: linear-gradient(180deg, #f3f8fc 0%, #f8fbfd 100%); border-bottom: 1px solid #e6ecf2;
}
.aier-sponsor__icon {
  flex: 0 0 48px; width: 48px; height: 48px; border-radius: 12px; background: #143b66; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}
.aier-sponsor__eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #1499a6; }
.aier-sponsor__title { font-size: 21px; font-weight: 900; color: #143b66; margin: 2px 0 2px; line-height: 1.25; }
.aier-sponsor__sub { font-size: 13px; color: #5a6776; margin: 0; }
.aier-sponsor__sub b { color: #143b66; }

.aier-sponsor__body { padding: 22px 24px 20px; }
.aier-sponsor__label { display: block; font-size: 13px; font-weight: 800; color: #143b66; margin-bottom: 8px; }

.aier-sponsor__input-wrap {
  display: flex; align-items: center; border: 1px solid #cfd8e2; border-radius: 10px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.aier-sponsor__input-wrap:focus-within { border-color: #1499a6; box-shadow: 0 0 0 3px rgba(20, 153, 166, .15); }
.aier-sponsor__prefix { padding: 0 2px 0 16px; font-size: 20px; font-weight: 800; color: #143b66; }
.aier-sponsor__input {
  flex: 1; min-width: 0; border: 0 !important; outline: 0; background: transparent; box-shadow: none !important;
  font-family: inherit; font-size: 20px; font-weight: 800; color: #143b66; padding: 12px 8px;
}
/* The theme's core CSS draws a black box on input:focus-visible. Unset it
   here; focus stays visible through .aier-sponsor__input-wrap:focus-within. */
.aier-sponsor .aier-sponsor__input:focus,
.aier-sponsor .aier-sponsor__input:focus-visible {
  outline: unset !important; border: unset !important; box-shadow: unset !important;
}
.aier-sponsor__suffix { padding: 0 16px; font-size: 13px; font-weight: 700; color: #5a6776; border-left: 1px solid #e6ecf2; line-height: 28px; }
.aier-sponsor__hint { font-size: 12px; color: #5a6776; margin-top: 8px; }
.aier-sponsor__hint b { color: #143b66; }

.aier-sponsor__chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 18px; align-items: center; }
.aier-sponsor__chip {
  font-family: inherit; font-size: 13.5px; font-weight: 800; color: #143b66; background: #f3f7fb;
  border: 1px solid #d3dee9; border-radius: 999px; padding: 8px 16px; cursor: pointer;
  transition: background .15s, transform .12s, border-color .15s;
}
.aier-sponsor__chip:hover { background: #e7f0f8; border-color: #b8cadb; }
.aier-sponsor__chip:focus-visible, .aier-sponsor__reset:focus-visible, .aier-sponsor__btn:focus-visible {
  outline: 3px solid #1499a6; outline-offset: 2px;
}
.aier-sponsor__chip--pulse { transform: scale(.94); background: #dcebf6; }
.aier-sponsor__reset {
  font-family: inherit; font-size: 12.5px; font-weight: 700; color: #5a6776; background: none; border: 0;
  text-decoration: underline; cursor: pointer; padding: 6px 4px; margin-left: auto;
}

.aier-sponsor__summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.aier-sponsor__tile { background: #f7f9fb; border: 1px solid #e4e8ec; border-radius: 10px; padding: 14px 16px; }
.aier-sponsor__tile--total { background: #f0fafb; border-color: #bfe6ea; }
.aier-sponsor__tile-label { font-size: 12px; color: #5a6776; margin-bottom: 4px; }
.aier-sponsor__tile-value { font-size: 18px; font-weight: 900; color: #143b66; }

.aier-sponsor__round {
  margin-top: 10px; font-size: 12.5px; font-weight: 700; color: #8a6a1f; background: #fdf8ec;
  border: 1px solid #f0e0bc; border-radius: 8px; padding: 8px 12px;
}

.aier-sponsor__msg { margin-top: 14px; padding: 10px 14px; border-radius: 8px; font-size: 13px; font-weight: 700; line-height: 1.45; }
.aier-sponsor__msg--ok   { color: #0f6f4f; background: #e9f8f1; border: 1px solid #b9e3d1; border-left: 4px solid #17a86b; }
.aier-sponsor__msg--err  { color: #842029; background: #fdecea; border: 1px solid #f5c2c7; border-left: 4px solid #dc3545; }
.aier-sponsor__msg--info { color: #0f6c78; background: #f0fafb; border: 1px solid #bfe6ea; }
.aier-sponsor__link { color: inherit; text-decoration: underline; margin-left: 6px; }

.aier-sponsor__confirm {
  margin-top: 16px; padding: 14px 16px; border-radius: 10px; background: #fff8e6; border: 1px solid #f0d58f;
}
.aier-sponsor__confirm-text { margin: 0 0 10px; font-size: 13.5px; font-weight: 700; color: #6f5418; }
.aier-sponsor__confirm-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.aier-sponsor__btn {
  font-family: inherit; font-size: 15px; font-weight: 800; color: #fff; background: #143b66; border: 0;
  border-radius: 8px; padding: 12px 22px; cursor: pointer; margin-top: 18px; transition: background .15s;
}
.aier-sponsor__confirm .aier-sponsor__btn { margin-top: 0; font-size: 13.5px; padding: 10px 16px; }
.aier-sponsor__btn:hover { background: #0f2d50; }
.aier-sponsor__btn:disabled { background: #9fb0c2; cursor: not-allowed; }
.aier-sponsor__btn.is-loading { opacity: .75; cursor: progress; }
.aier-sponsor__btn--ghost { background: #fff; color: #143b66; border: 1px solid #d8dde3; }
.aier-sponsor__btn--ghost:hover { background: #f3f7fb; }

.aier-sponsor__foot { font-size: 12px; color: #6b7785; margin: 14px 0 0; line-height: 1.5; }

/* Cart sidebar notice + WC cart qty */
.aier-cart-sponsor-note {
  margin: 10px 0 4px; padding: 8px 12px; font-size: 12px; font-weight: 700; color: #0f6c78;
  background: #f0fafb; border: 1px solid #bfe6ea; border-radius: 8px;
}
.aier-sponsor-qty { font-weight: 700; }

@media (max-width: 600px) {
  .aier-sponsor__head, .aier-sponsor__body { padding-left: 16px; padding-right: 16px; }
  .aier-sponsor__summary { grid-template-columns: 1fr; }
  .aier-sponsor__btn { width: 100%; }
  .aier-sponsor__reset { margin-left: 0; }
}
