/* Doge Soft — Buy Dogecoin onramp directory (mobile-first) */

.buy-page .buy-main {
  padding-top: 12px;
  padding-bottom: 48px;
}

.buy-hero {
  position: relative;
  padding: 18px 0 8px;
}

.buy-hero__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.buy-hero h1 {
  max-width: 12ch;
  margin: 0 0 12px;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.4rem, 9vw, 3.6rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.buy-hero h1 em {
  font-style: normal;
  color: var(--yellow, #ffcf40);
}

.buy-hero .hero-lead {
  max-width: 36rem;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.45;
}

.buy-info-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card, #1a241e) 88%, transparent);
  color: var(--fg, #f4f1ea);
  cursor: pointer;
}

html[data-theme="light"] .buy-info-btn {
  border-color: rgba(23, 33, 27, 0.14);
  color: #17211b;
}

.buy-info-btn:hover,
.buy-info-btn:focus-visible {
  border-color: var(--orange, #ff7138);
  color: var(--orange, #ff7138);
  outline: none;
}

.buy-info-btn--desk {
  margin-top: 4px;
}

.mobile-appbar .buy-info-btn {
  width: 36px;
  height: 36px;
  margin-right: 6px;
}

@media (min-width: 860px) {
  .mobile-appbar .buy-info-btn {
    display: none;
  }
}

@media (max-width: 859px) {
  .buy-info-btn--desk {
    display: none;
  }
}

.buy-country {
  display: grid;
  gap: 8px;
  margin: 8px 0 6px;
}

.buy-country span {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.buy-country select {
  width: 100%;
  max-width: 420px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: color-mix(in srgb, var(--card, #1a241e) 92%, #000);
  color: inherit;
  font: inherit;
  font-weight: 600;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--orange) 50%),
    linear-gradient(135deg, var(--orange) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% - 3px), calc(100% - 14px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

html[data-theme="light"] .buy-country select {
  border-color: rgba(23, 33, 27, 0.14);
  background-color: #fff;
}

.buy-hint {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.buy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0 0 28px;
}

@media (min-width: 640px) {
  .buy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 1024px) {
  .buy-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.buy-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 168px;
  padding: 18px 18px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 46%),
    linear-gradient(165deg, color-mix(in srgb, var(--card, #1a241e) 96%, #000) 0%, #121a16 100%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

html[data-theme="light"] .buy-card {
  border-color: rgba(23, 33, 27, 0.1);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 46%),
    linear-gradient(165deg, #ffffff 0%, #f4f1ea 100%);
  box-shadow: 0 12px 28px rgba(23, 33, 27, 0.08);
}

.buy-card:hover,
.buy-card:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  outline: none;
}

.buy-card__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.buy-card__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  overflow: hidden;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.buy-card__logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.buy-card__mark-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font: inherit;
  color: inherit;
}

.buy-card__badge {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

html[data-theme="light"] .buy-card__badge {
  background: rgba(23, 33, 27, 0.06);
}

.buy-card h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.buy-card p {
  margin: 0;
  flex: 1;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.buy-card__regions {
  margin: 0;
  color: color-mix(in srgb, var(--accent) 70%, var(--muted));
  font-size: 0.78rem;
  font-weight: 700;
}

.buy-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 800;
}

.buy-card[hidden] {
  display: none !important;
}

.buy-empty {
  grid-column: 1 / -1;
  padding: 28px 18px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.buy-footnote {
  max-width: 42rem;
  margin: 0 auto 36px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: center;
}

/* How-to modal */
.buy-modal[hidden] {
  display: none !important;
}

.buy-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: end center;
}

@media (min-width: 640px) {
  .buy-modal {
    place-items: center;
    padding: 24px;
  }
}

.buy-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.62);
  cursor: pointer;
}

.buy-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  max-height: min(88svh, 720px);
  overflow: auto;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px 24px 0 0;
  background: #121a16;
  color: #f4f1ea;
  box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.4);
}

html[data-theme="light"] .buy-modal__panel {
  border-color: rgba(23, 33, 27, 0.1);
  background: #fff;
  color: #17211b;
}

@media (min-width: 640px) {
  .buy-modal__panel {
    border-radius: 24px;
  }
}

.buy-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.buy-modal__head h2 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.buy-modal__x {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.buy-steps {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.buy-steps li {
  display: grid;
  gap: 4px;
  padding: 14px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

html[data-theme="light"] .buy-steps li {
  background: rgba(23, 33, 27, 0.04);
}

.buy-steps strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.98rem;
}

.buy-steps span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.buy-disclaimer {
  display: grid;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.buy-disclaimer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.buy-disclaimer strong {
  color: inherit;
}
