/* ==========================================================================
   Funny's Snack — Puanlarım Sayfası
   ========================================================================== */

.points {
  padding-top: 40px;
  padding-bottom: 120px;
}

.points__title {
  margin-bottom: 28px;
}

/* Overview
   ========================================================================== */

.points-overview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px 48px;
  padding: 32px 40px;
  border-radius: var(--radius-lg);
  background: var(--c-red);
  color: var(--c-white);
}

.points-overview__balance {
  display: flex;
  align-items: center;
  gap: 18px;
}

.points-overview__balance .coin {
  width: 56px;
  height: 56px;
}

.points-overview__label {
  font-size: 14px;
  font-weight: 400;
}

.points-overview__value {
  font-family: var(--font-display);
  font-stretch: 125%;
  font-weight: 900;
  font-size: 40px;
  line-height: 1.1;
}

.points-overview__value small {
  font-size: 18px;
}

.points-overview__stats {
  display: flex;
  gap: 40px;
  margin: 0;
}

.points-overview__stats dt {
  font-size: 13px;
  font-weight: 400;
  opacity: .9;
}

.points-overview__stats dd {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-stretch: 115%;
  font-weight: 900;
  font-size: 22px;
}

.points-overview__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.points-overview__actions .btn--text {
  color: var(--c-white);
  font-size: 15px;
}

/* History
   ========================================================================== */

.history {
  margin-top: 28px;
  padding: 32px 40px;
  border-radius: var(--radius-lg);
  background: var(--c-white);
}

.history__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.history__title {
  font-family: var(--font-display);
  font-stretch: 120%;
  font-weight: 900;
  font-size: 18px;
  text-transform: uppercase;
  color: #000;
}

.history__filters {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--c-bg);
}

.history__filter {
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--c-text);
  font-size: 13px;
  font-weight: 400;
  transition: background .2s ease, color .2s ease;
}

.history__filter:hover {
  color: #000;
}

.history__filter.is-active {
  background: var(--c-red);
  color: var(--c-white);
  font-weight: 500;
}

/* Rows */

.history__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--c-bg);
}

.history-item:last-child {
  border-bottom: 0;
}

.history-item__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-bg);
}

.history-item__icon::before {
  content: "";
  width: 22px;
  height: 22px;
  background: var(--c-red);
  -webkit-mask: var(--icon) center / contain no-repeat;
          mask: var(--icon) center / contain no-repeat;
}

/* Kaynağa göre ikon */
.history-item--code .history-item__icon {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7V5a1 1 0 0 1 1-1h2M17 4h2a1 1 0 0 1 1 1v2M20 17v2a1 1 0 0 1-1 1h-2M7 20H5a1 1 0 0 1-1-1v-2M8 8v8M11 8v8M14 8v8M17 8v8'/%3E%3C/svg%3E");
}

.history-item--wheel .history-item__icon {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 3v18M3 12h18M5.6 5.6l12.8 12.8M18.4 5.6L5.6 18.4'/%3E%3C/svg%3E");
}

.history-item--game .history-item__icon {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9h12l-1.5 11h-9z'/%3E%3Cpath d='M5 9h14M9 5l1 4M15 5l-1 4'/%3E%3C/svg%3E");
}

.history-item--reward .history-item__icon {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='8' width='18' height='4' rx='1'/%3E%3Cpath d='M5 12v8h14v-8M12 8v12M12 8c-2-4-6-4-6-1.5S9 8 12 8zM12 8c2-4 6-4 6-1.5S15 8 12 8z'/%3E%3C/svg%3E");
}

.history-item--reward .history-item__icon::before {
  background: var(--c-navy);
}

.history-item__label {
  font-size: 15px;
  font-weight: 500;
  color: #000;
  overflow-wrap: anywhere;
}

.history-item__date {
  margin-top: 2px;
  font-size: 12px;
}

.history-item__amount {
  font-family: var(--font-display);
  font-stretch: 115%;
  font-weight: 900;
  font-size: 18px;
  white-space: nowrap;
}

.is-earn {
  color: var(--c-navy);
}

.points-overview .is-earn,
.points-overview .is-spend {
  color: var(--c-white);
}

.is-spend {
  color: var(--c-red);
}

.history__empty {
  padding: 32px 0 12px;
  font-size: 14px;
  text-align: center;
}

/* Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .points-overview {
    grid-template-columns: 1fr 1fr;
  }

  .points-overview__actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .points {
    padding-top: 24px;
    padding-bottom: 72px;
  }

  .points-overview {
    grid-template-columns: 1fr;
    padding: 24px 20px;
  }

  .points-overview__value {
    font-size: 32px;
  }

  .points-overview__stats {
    gap: 28px;
  }

  .points-overview__actions .btn--light {
    flex: 1;
  }

  .history {
    padding: 24px 18px;
  }

  .history__filters {
    width: 100%;
  }

  .history__filter {
    flex: 1;
    padding-inline: 8px;
  }

  .history-item {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 12px;
  }

  .history-item__icon {
    width: 38px;
    height: 38px;
  }

  .history-item__label {
    font-size: 14px;
  }

  .history-item__amount {
    font-size: 16px;
  }
}
