/* Gift picker - site-native styling. Tokens taken from the app's own
   CSS: indigo #34207d, brand pink #EC2A4A, borders #e7e5ed, neutral
   surface #f9f9fb; the CTA reuses the site's .modal-button (lime). */

.gp2-dialog { max-width: 560px; width: auto; margin-left: auto; margin-right: auto; }
@media (min-width: 600px) { .gp2-dialog { width: 560px; } }

.gp2-content { border-radius: 20px; }

.gift-picker { padding: 0 26px 24px; }

/* the site's .tip-modal-title pulls itself up under the close button
   with a negative margin - undo that and center it */
.gift-picker .tip-modal-title {
  margin-top: 0;
  margin-bottom: 18px;
  padding-top: 2px;
  text-align: center;
}

.gp2-for {
  margin: -8px 0 16px;
  text-align: center;
  font-size: 13px;
  color: #7f7777;
}

/* tier bar */
.gp2-tierbar {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.gp2-tier {
  background: #f9f9fb;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #7f7777;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.gp2-tier:hover { color: #34207d; }
.gp2-tier-active { background: #fff; border-color: #ec2a4a; color: #ec2a4a; }

/* grid - every card identical, no exceptions */
.gp2-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.gp2-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 6px 12px;
  background: #f9f9fb;
  border: 1px solid #e7e5ed;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.gp2-card:hover { border-color: #d9d9d9; background: #fff; }
.gp2-card-active {
  background: #fff;
  border-color: #ec2a4a;
  box-shadow: 0 0 0 1px #ec2a4a, 0 6px 18px rgba(236, 42, 74, .12);
}
.gp2-icon { font-size: 34px; line-height: 1.15; }
.gp2-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.15;
  color: #34207d;
}
.gp2-price {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: #7f7777;
}

/* shortfall + footer */
.gp2-shortfall { margin: 12px 2px 0; font-size: 13px; color: #ec2a4a; }
.gp2-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}
.gp2-balance {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #7f7777;
}
.gp2-balance .gp2-balance-amount { color: #34207d; }

.gp2-cta { margin-top: 0; }
.gp2-cta .gp2-cta-send {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.gp2-cta .gp2-cta-price { font-weight: 700; }
/* authored display must not defeat the hidden attribute */
.gp2-cta [hidden] { display: none !important; }

.gp2-empty { margin: 12px 0 6px; color: #7f7777; }

/* keyboard focus */
.gp2-card:focus-visible,
.gp2-tier:focus-visible,
.gp2-cta:focus-visible { outline: 2px solid #ec2a4a; outline-offset: 2px; }

@media (max-width: 440px) {
  .gift-picker { padding: 0 16px 16px; }
  .gp2-grid { gap: 8px; }
  .gp2-icon { font-size: 30px; }
  .gp2-name { font-size: 13px; }
  .gp2-foot { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .gp2-card, .gp2-tier { transition: none; }
}

/* ---- dark mode (body.dark, tokens from darkmode33.css) ---- */

body.dark .gp2-for,
body.dark .gp2-price,
body.dark .gp2-balance,
body.dark .gp2-empty { color: #b8b5c4; }

body.dark .gp2-tier {
  background: #2f2f38;
  color: #b8b5c4;
}
body.dark .gp2-tier:hover { color: #fff; }
body.dark .gp2-tier-active {
  background: #23232b;
  border-color: #ec2a4a;
  color: #ec2a4a;
}

body.dark .gp2-card {
  background: #2f2f38;
  border-color: #40424a;
}
body.dark .gp2-card:hover {
  background: #2f2f38;
  border-color: #b8b5c4;
}
body.dark .gp2-card-active {
  background: #2f2f38;
  border-color: #ec2a4a;
  box-shadow: 0 0 0 1px #ec2a4a, 0 6px 18px rgba(236, 42, 74, .25);
}
body.dark .gp2-name { color: #fff; }
body.dark .gp2-balance .gp2-balance-amount { color: #fff; }
