/* DangoPay skin over the storefront theme.
   Loaded after the bundle CSS so these declarations win.

   The tenant primary colour (#1d6ff2) comes from the server-info brand patch in
   serve.mjs; this file adds the Dango blue -> teal gradient used by the old
   DangoPay frontend and keeps hover states in the same family. */

:root {
  --dango-blue: #1d6ff2;
  --dango-teal: #38b897;
  --dango-ink: #0f172a;
  --color-brand-hover: #1557c9;
}

/* Old DangoPay accent is a blue -> teal sweep, not a flat colour. */
.gradient-brand,
.el-button--primary {
  background-image: linear-gradient(135deg, var(--dango-blue) 0%, var(--dango-teal) 100%);
}

.text-gradient-brand {
  background-image: linear-gradient(135deg, var(--dango-blue) 0%, var(--dango-teal) 100%);
}

::selection {
  background: rgba(29, 111, 242, 0.25);
}

/* Keep the logo crisp at the header height used by the storefront. */
header img[alt='DangoPay'] {
  height: 2rem;
  width: auto;
  object-fit: contain;
}

/* ---------------------------------------------------------------------------
   1. Nominal grid: 4 columns on desktop, 2 comfortable columns on phones.
   The bundle ships a 3-column layout below ~700px which squeezes the cards.
   --------------------------------------------------------------------------- */
@media (max-width: 700px) {
  .tn-nominal-grid,
  .tn-catalog__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
  }

  .tn-nominal-card {
    padding: 0.85rem 0.9rem !important;
    min-height: 0;
  }

  .tn-nominal-card__name {
    font-size: 1rem;
  }

  .tn-game-card {
    font-size: 0.8rem;
  }

  /* Keep the fixed checkout bar from covering the last nominal card. */
  .tn-main {
    padding-bottom: 7rem;
  }
}

/* ---------------------------------------------------------------------------
   2. Unpriced nominal: show a calm dash instead of a broken empty slot.
   dango-prices.js adds the class and the tooltip.
   --------------------------------------------------------------------------- */
.tn-nominal-card__price.dango-unpriced {
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tn-nominal-card.dango-has-no-price:hover {
  border-color: #cbd5e1;
}

/* ---------------------------------------------------------------------------
   3. Primary call to action: one strong gradient, and an obviously disabled
   state so "Beli Sekarang" never looks half-active.
   --------------------------------------------------------------------------- */
.tn-btn--accent {
  background-image: linear-gradient(135deg, var(--dango-blue) 0%, var(--dango-teal) 100%) !important;
  border: 0 !important;
  color: #fff !important;
  box-shadow: 0 8px 20px -10px rgba(29, 111, 242, 0.7);
}

.tn-btn--accent:not([disabled]):hover {
  filter: brightness(1.05);
  box-shadow: 0 10px 24px -10px rgba(29, 111, 242, 0.85);
}

.tn-btn--accent[disabled],
.tn-btn--accent:disabled {
  background-image: none !important;
  background-color: #dbe4f3 !important;
  color: #7c8aa5 !important;
  box-shadow: none !important;
  cursor: not-allowed;
}

/* ---------------------------------------------------------------------------
   4. Section heading hierarchy: the step title is the loudest thing in a card.
   --------------------------------------------------------------------------- */
.tn-step__title {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--dango-ink);
}

/* ---------------------------------------------------------------------------
   5. Trust strip injected above the nominal grid (Proses otomatis / garansi /
   CS 24 jam). Kept quiet: small text, dashed hairline, no boxes.
   --------------------------------------------------------------------------- */
.dango-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.75rem;
  border: 1px dashed #dbe4f3;
  border-radius: 0.65rem;
  background: #f7faff;
  font-size: 0.75rem;
  line-height: 1.35;
  color: #475569;
}

.dango-trust span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.dango-trust span::before {
  content: '✓';
  color: var(--dango-teal);
  font-weight: 700;
}

/* ---------------------------------------------------------------------------
   6. Hide a lone filter chip ("Umum") that filters nothing on a single-type
   product. dango-prices.js flags it.
   --------------------------------------------------------------------------- */
.tn-chip.dango-chip-hidden {
  display: none !important;
}

/* ---------------------------------------------------------------------------
   7. Brand logo katalog: aset lama Dango berbentuk PNG persegi besar, jadi
   pakai `contain` + padding supaya tidak ter-crop seperti `cover`.
   --------------------------------------------------------------------------- */
.tn-game-card__image img {
  object-fit: contain !important;
  padding: 12%;
  box-sizing: border-box;
  background: #fff;
}
