/* ==========================================
   STORE TABS + ADDONS
   Ranks / Addons switch. Addons stay hidden until
   you press the Addons tab.
   ========================================== */

/* ---------- Section tabs ---------- */

.store-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;

  margin: 4px 0 30px;

  padding: 6px;

  border: 1px solid rgba(192, 132, 252, .16);
  border-radius: 16px;

  background: rgba(20, 4, 20, .35);
}

.store-tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  min-height: 46px;
  padding: 0 20px;

  border: 1px solid transparent;
  border-radius: 11px;

  background: transparent;
  color: var(--muted);

  cursor: pointer;

  font: inherit;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;

  transition: background .22s ease, color .22s ease,
    border-color .22s ease, box-shadow .22s ease;
}

/* store.css and homepage.css do not define --text, so fall back
   to the page foreground instead of dropping the colour. */

.store-tab:hover {
  color: var(--text, currentColor);
  background: rgba(192, 132, 252, .08);
}

.store-tab svg {
  width: 18px;
  height: 18px;

  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.store-tab .store-tab-arrow {
  width: 15px;
  height: 15px;
  margin-left: 2px;

  transition: transform .25s ease;
}

.store-tab:hover {
  color: var(--text, currentColor);
  background: rgba(192, 132, 252, .08);
}

.store-tab.active {
  color: #14051f;
  background: linear-gradient(135deg, #c084fc, #a855f7);

  box-shadow: 0 8px 24px rgba(168, 85, 247, .3);
}

.store-tab.active .store-tab-arrow {
  transform: rotate(180deg);
}

/* Sections fade in when they are opened */

.store-section[hidden] {
  display: none;
}

.store-section.is-opening {
  animation: store-section-in .4s ease both;
}

@keyframes store-section-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Addon cards ---------- */

.addons-section {
  padding-top: 4px;
}

.addon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.addon-card {
  position: relative;

  display: flex;
  flex-direction: column;

  padding: 26px;

  border: 1px solid rgba(192, 132, 252, .16);
  border-radius: 18px;

  background:
    linear-gradient(180deg, rgba(192, 132, 252, .06), rgba(22, 10, 38, .55) 38%),
    #250b29;

  transition: transform .25s ease, border-color .25s ease,
    box-shadow .25s ease;
}

.addon-card:hover {
  transform: translateY(-4px);
  border-color: rgba(192, 132, 252, .4);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .3);
}

.addon-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.addon-icon {
  display: grid;
  place-items: center;

  flex: 0 0 38px;
  width: 38px;
  height: 38px;

  border: 1px solid rgba(192, 132, 252, .35);
  border-radius: 11px;

  background: rgba(192, 132, 252, .12);
  color: #c084fc;
}

.addon-icon svg {
  width: 19px;
  height: 19px;

  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.addon-head h3 {
  margin: 0;

  font-size: 17px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.addon-badge {
  margin-left: auto;
  padding: 5px 10px;

  border: 1px solid rgba(192, 132, 252, .45);
  border-radius: 7px;

  background: rgba(192, 132, 252, .12);
  color: #e879f9;

  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.addon-price {
  display: flex;
  align-items: baseline;
  gap: 8px;

  margin: 22px 0 20px;
}

.addon-price strong {
  color: #fbcfe8;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1;
}

.addon-price span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.addon-card .buy-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  width: 100%;
  min-height: 46px;
  margin-top: auto;
  padding: 0 18px;

  border: 1px solid rgba(192, 132, 252, .45);
  border-radius: 11px;

  background: rgba(192, 132, 252, .1);
  color: #fbcfe8;

  cursor: pointer;

  font-size: 13px;
  font-weight: 800;

  transition: background .2s ease, transform .2s ease;
}

.addon-card .buy-button:hover {
  background: rgba(192, 132, 252, .2);
  transform: translateY(-1px);
}

.addon-card .buy-button svg {
  width: 16px;
  height: 16px;

  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Light theme ---------- */

body.light-theme .store-tabs {
  background: rgba(255, 255, 255, .72);
}

body.light-theme .addon-card {
  background:
    linear-gradient(180deg, rgba(192, 132, 252, .07), rgba(255, 255, 255, .9) 42%),
    #fff;
}

body.light-theme .addon-price strong {
  color: #7e22ce;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .addon-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .store-tabs {
    justify-content: stretch;
  }

  .store-tab {
    flex: 1 1 auto;
    justify-content: center;
  }
}