/* =========================================================
   Donate — layout limpo (ice theme)
   ========================================================= */

.donate-page-wrap {
  max-width: 760px !important;
  width: 100% !important;
}

.donate-scope {
  color: #e8eef8;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

/* Hero */
.donate-hero {
  text-align: center;
  margin-bottom: 8px;
}

.donate-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  color: #c9e2ff !important;
  letter-spacing: -0.02em;
}

.donate-hero > p {
  margin: 0 auto 16px;
  max-width: 40ch;
  color: #9aa8bc;
  font-size: 0.95rem;
}

.donate-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
  padding: 6px 6px 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(140, 170, 210, 0.28);
  background: rgba(10, 14, 22, 0.65);
  font-size: 13px;
  color: #9aa8bc;
}

.donate-user-name {
  color: #c9e2ff;
  font-weight: 700;
}

.donate-user-ap {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(142, 197, 255, 0.14);
  border: 1px solid rgba(142, 197, 255, 0.28);
  color: #e8eef8;
  font-weight: 700;
  font-size: 12px;
}

.donate-login-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 8px auto 0;
  padding: 12px 16px;
  max-width: 420px;
  border-radius: 12px;
  border: 1px solid rgba(142, 197, 255, 0.28);
  background: rgba(142, 197, 255, 0.08);
}

.donate-login-banner p {
  margin: 0;
  color: #c9e2ff;
  font-size: 0.92rem;
}

/* Section */
.donate-section {
  margin-top: 28px;
}

.donate-section-head {
  text-align: center;
  margin-bottom: 18px;
}

.donate-section-head h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #c9e2ff !important;
}

.donate-section-head p {
  margin: 0;
  color: #9aa8bc;
  font-size: 0.9rem;
}

.currency-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.currency-row[hidden] {
  display: none !important;
}

.currency-chip {
  appearance: none;
  border: 1px solid rgba(140, 170, 210, 0.3);
  background: rgba(10, 14, 22, 0.6);
  color: #9aa8bc;
  border-radius: 999px;
  padding: 7px 14px;
  font: 700 12px Manrope, system-ui, sans-serif;
  cursor: pointer;
}

.currency-chip:hover,
.currency-chip.is-active {
  color: #c9e2ff;
  border-color: rgba(142, 197, 255, 0.55);
  background: rgba(142, 197, 255, 0.12);
}

/* Grid 4×2 — 8 pacotes alinhados */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.package-card {
  appearance: none;
  -webkit-appearance: none;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 108px;
  margin: 0;
  padding: 16px 10px 14px !important;
  text-align: center;
  cursor: pointer !important;
  border-radius: 14px !important;
  border: 1px solid rgba(140, 170, 210, 0.26) !important;
  background: linear-gradient(180deg, rgba(18, 26, 38, 0.95), rgba(10, 14, 22, 0.95)) !important;
  color: #e8eef8 !important;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.package-card:hover {
  transform: translateY(-2px);
  border-color: rgba(142, 197, 255, 0.5) !important;
}

.package-card.is-selected {
  border-color: #8ec5ff !important;
  background: linear-gradient(180deg, rgba(142, 197, 255, 0.18), rgba(12, 18, 28, 0.95)) !important;
  box-shadow: 0 0 0 1px rgba(142, 197, 255, 0.35), 0 10px 24px rgba(0, 0, 0, 0.35);
}

.package-card .ap {
  font-weight: 800;
  font-size: 1.05rem;
  color: #e8eef8;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.package-card .ap small {
  font-size: 0.72rem;
  font-weight: 700;
  color: #8ec5ff;
  letter-spacing: 0.06em;
}

.package-card .price {
  font-weight: 800;
  color: #fbbf24;
  font-size: 1rem;
}

.package-card .pick {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #8ec5ff;
}

.package-card.is-selected .pick {
  color: #4ade80;
}

.package-card .code {
  display: none !important;
}

.donate-loading,
.donate-error {
  grid-column: 1 / -1;
  text-align: center;
  color: #9aa8bc;
  margin: 16px 0;
}

.donate-error {
  color: #f87171;
}

/* Checkout sob os pacotes */
.checkout-bar {
  margin-top: 18px;
  border: 1px solid rgba(140, 170, 210, 0.28);
  border-radius: 14px;
  background: rgba(8, 12, 18, 0.72);
  padding: 14px 16px;
  display: none;
}

.checkout-bar.is-visible,
.checkout-bar:not([hidden]) {
  display: block;
}

.checkout-bar[hidden] {
  display: none !important;
}

.checkout-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.checkout-bar .summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.checkout-bar .summary-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9aa8bc;
  font-weight: 700;
}

.checkout-bar .summary strong {
  color: #c9e2ff;
  font-size: 1.05rem;
  font-weight: 800;
}

/* Buttons */
.donate-scope .btn,
.checkout-bar .btn,
.modal-overlay .btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 22px;
  font: 700 13px Manrope, system-ui, sans-serif;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none !important;
}

.btn-primary {
  background: linear-gradient(180deg, #9fd0ff, #6aa8e0) !important;
  color: #071018 !important;
  border-color: rgba(142, 197, 255, 0.45) !important;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}

.btn-ghost {
  background: transparent !important;
  border-color: rgba(140, 170, 210, 0.35) !important;
  color: #c9e2ff !important;
}

.btn-ghost:hover {
  border-color: #8ec5ff !important;
}

.btn-block {
  width: 100%;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.68);
}

.modal-overlay.is-open,
.modal-overlay:not([hidden]) {
  display: flex;
}

.modal-overlay[hidden] {
  display: none !important;
}

body.donate-modal-open {
  overflow: hidden;
}

.modal.panel {
  position: relative;
  width: min(420px, 100%);
  padding: 22px 22px 18px;
  border-radius: 16px;
  border: 1px solid rgba(140, 170, 210, 0.35);
  background: #121820;
  color: #e8eef8;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  color: #9aa8bc;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.modal h3 {
  margin: 0 28px 6px 0;
  color: #c9e2ff !important;
}

.modal-sub {
  margin: 0 0 16px;
  color: #9aa8bc;
  font-size: 0.92rem;
}

.modal-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.modal-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(140, 170, 210, 0.15);
  font-size: 0.92rem;
}

.modal-summary span {
  color: #9aa8bc;
}

.modal-summary strong {
  color: #e8eef8;
}

.coupon-box {
  margin: 12px 0 16px;
}

.coupon-box label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: #9aa8bc;
}

.coupon-row {
  display: flex;
  gap: 8px;
}

.coupon-row input {
  flex: 1;
  min-width: 0;
  border-radius: 10px;
  border: 1px solid rgba(140, 170, 210, 0.3);
  background: #0a1018;
  color: #e8eef8;
  padding: 10px 12px;
  font: 600 13px Manrope, system-ui, sans-serif;
}

.coupon-message {
  min-height: 1.2em;
  margin: 8px 0 0;
  font-size: 12px;
}

.coupon-message.is-error {
  color: #f87171;
}

.coupon-message.is-success {
  color: #4ade80;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 720px) {
  .packages-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 420px) {
  .packages-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .package-card {
    min-height: 96px;
    padding: 12px 8px !important;
  }
  .checkout-bar-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .checkout-bar .btn {
    width: 100%;
  }
}
