/* History Modal Styles */

/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 2vmin;
  width: 90%;
  max-width: 80vmin;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 1.5vmin 4vmin rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease;
}

.modal-header {
  padding: 3vmin;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 3.5vmin;
  font-weight: bold;
  flex: 1;
}

.redeem-all-button {
  background: #28a745;
  color: white;
  border: none;
  padding: 1.2vmin 2.4vmin;
  border-radius: 0.8vmin;
  cursor: pointer;
  font-size: 2vmin;
  font-weight: bold;
  margin-left: auto;
  margin-right: 2vmin;
  transition: all 0.3s ease;
}

.redeem-all-button:hover:not(:disabled) {
  background: #218838;
  transform: translateY(-0.2vmin);
}

.redeem-all-button:disabled {
  background: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

.close-button {
  background: none;
  border: none;
  font-size: 4vmin;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 4vmin;
  height: 4vmin;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
}

.close-button:hover {
  opacity: 1;
}

.modal-body {
  padding: 0 3vmin 3vmin 3vmin;
  max-height: 60vh;
  overflow-y: auto;
}

/* History Item Styles */
.history-item {
  border-radius: 1.2vmin;
  padding: 2.2vmin;
  margin-bottom: 1.5vmin;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 0.25vmin solid;
}

.history-info {
  flex: 1;
}

.history-reward {
  font-weight: bold;
  font-size: 2.4vmin;
  margin-bottom: 0.8vmin;
}

.history-date {
  font-size: 1.8vmin;
  opacity: 0.7;
}

.redeem-button {
  background: #28a745;
  color: white;
  border: none;
  padding: 1.2vmin 2.4vmin;
  border-radius: 0.8vmin;
  cursor: pointer;
  font-size: 2vmin;
  transition: background 0.3s ease;
}

.redeem-button:hover {
  background: #218838;
}

.redeem-button:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.redeemed-badge {
  background: #6c757d;
  color: white;
  padding: 1.2vmin 2.4vmin;
  border-radius: 0.8vmin;
  font-size: 2vmin;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* Mobile view */
@media (375px < width < 768px) {
  .modal-content {
    width: 95%;
  }
}
