/* Reward Confirmation Side Panel Styles */
.reward-side-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 400px;
  max-width: 90vw;
  margin: 0;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 1055;
}

.reward-side-panel.show {
  transform: translateX(0);
}

.modal.show .reward-side-panel {
  transform: translateX(0);
}

.reward-modal-content {
  border: none;
  border-radius: 0;
  box-shadow: -4px 0 32px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.reward-modal-content .modal-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background-color: #fff;
  flex-shrink: 0;
}

.reward-modal-content .modal-title {
  font-size: 1.25rem;
  color: #1a1a1a;
  margin: 0;
}

.reward-modal-content .btn-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  opacity: 0.6;
  padding: 0.5rem;
  width: auto;
  height: auto;
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.reward-modal-content .btn-close:hover {
  opacity: 1;
  background-color: #f3f4f6;
  border-radius: 50%;
}

.reward-details h4 {
  color: #1a1a1a;
  font-size: 1.5rem;
  line-height: 1.3;
}

.reward-details p {
  color: #4a5568;
  font-size: 0.95rem;
  line-height: 1.5;
}

.reward-details .text-primary {
  color: #3b82f6 !important;
}

.reward-terms h6 {
  color: #2d3748;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.reward-terms ul {
  margin: 0;
  padding-left: 1.2rem;
}

.reward-terms li {
  margin-bottom: 0.3rem;
  color: #6b7280;
  font-size: 0.85rem;
  line-height: 1.4;
}

.reward-card-preview-section {
  flex-shrink: 0;
}

.reward-card-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  padding: 1rem 0;
}

.reward-card-preview .bg-success {
  box-shadow: 0 4px 16px rgba(39, 174, 96, 0.2);
  border: none;
  position: relative;
  overflow: hidden;
}

.reward-card-preview .bg-success::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  pointer-events: none;
}

.reward-card-preview .badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

.reward-card-preview h5 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.reward-card-preview h6 {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.modal-footer {
  padding: 1.5rem;
  background-color: #fafafa;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
  margin-top: auto;
}

.modal-footer .btn {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.modal-footer .btn-light {
  background-color: #f8f9fa;
  color: #6b7280;
  border: 1px solid #e2e8f0;
}

.modal-footer .btn-light:hover {
  background-color: #e9ecef;
  color: #4a5568;
  border-color: #cbd5e0;
}

.modal-footer .btn-primary {
  background-color: #3b82f6;
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.modal-footer .btn-primary:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.modal-footer .btn-primary:disabled {
  background-color: #9ca3af;
  transform: none;
  box-shadow: none;
}

/* Modal body content */
.reward-modal-content .modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.reward-modal-content .reward-details {
  padding-bottom: 1rem;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .reward-side-panel {
    width: 100vw;
    max-width: 100vw;
  }
  
  .reward-card-preview {
    min-height: 140px;
  }
  
  .reward-card-preview .bg-success {
    width: 240px !important;
    transform: scale(0.9);
  }
}

@media (max-width: 575.98px) {
  .reward-modal-content .modal-header {
    padding: 1rem 1rem 0.75rem;
  }
  
  .reward-modal-content .modal-body .p-4 {
    padding: 1rem !important;
  }
  
  .reward-card-preview .bg-success {
    width: 220px !important;
    transform: scale(0.85);
  }
  
  .modal-footer {
    padding: 1rem;
  }
  
  .modal-footer .d-flex {
    flex-direction: column;
    gap: 0.75rem !important;
  }
  
  .modal-footer .btn {
    width: 100%;
  }
}

/* Loading spinner styles */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Animation styles */
.modal.fade .reward-side-panel {
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}

.modal.show .reward-side-panel {
  transform: translateX(0);
}

/* Focus styles for accessibility */
.modal-footer .btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.reward-modal-content .btn-close:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Backdrop overlay */
.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.5);
}

/* Success Modal Styles */
.reward-success-modal-content {
  border: none;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  position: relative;
}

.reward-success-modal-content .btn-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  opacity: 0.6;
  padding: 0.5rem;
  width: auto;
  height: auto;
  z-index: 10;
}

.reward-success-modal-content .btn-close:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
}

.success-icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 120px;
}

.gift-box-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gift-box {
  font-size: 4rem;
  animation: giftBoxBounce 0.8s ease-out;
  z-index: 2;
  position: relative;
}

@keyframes giftBoxBounce {
  0% {
    transform: scale(0.3) translateY(20px);
    opacity: 0;
  }
  50% {
    transform: scale(1.1) translateY(-10px);
    opacity: 1;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Confetti Animation */
.confetti-container {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  pointer-events: none;
}

.confetti {
  position: absolute;
  width: 8px;
  height: 8px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border-radius: 50%;
  animation: confettiFall 1.5s ease-out forwards;
}

.confetti-1 {
  left: 20%;
  background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
  animation-delay: 0.1s;
}

.confetti-2 {
  left: 40%;
  background: linear-gradient(45deg, #4ecdc4, #6ed8d0);
  animation-delay: 0.2s;
}

.confetti-3 {
  left: 60%;
  background: linear-gradient(45deg, #ffe66d, #fff176);
  animation-delay: 0.3s;
}

.confetti-4 {
  left: 80%;
  background: linear-gradient(45deg, #ff8a80, #ffab91);
  animation-delay: 0.1s;
}

.confetti-5 {
  left: 30%;
  background: linear-gradient(45deg, #81c784, #a5d6a7);
  animation-delay: 0.4s;
}

.confetti-6 {
  left: 70%;
  background: linear-gradient(45deg, #64b5f6, #90caf9);
  animation-delay: 0.2s;
}

@keyframes confettiFall {
  0% {
    transform: translateY(-50px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100px) rotate(720deg);
    opacity: 0;
  }
}

.reward-success-details {
  border: 1px solid #e2e8f0;
  background-color: #f8f9fa !important;
}

.reward-success-modal-content .btn {
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.reward-success-modal-content .btn-light {
  background-color: #f8f9fa;
  color: #6b7280;
  border: 1px solid #e2e8f0;
}

.reward-success-modal-content .btn-light:hover {
  background-color: #e9ecef;
  color: #4a5568;
  border-color: #cbd5e0;
}

.reward-success-modal-content .btn-primary {
  background-color: #3b82f6;
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.reward-success-modal-content .btn-primary:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Success modal specific sizing */
#reward-success-modal .modal-dialog.modal-sm {
  max-width: 380px; /* Slightly larger than Bootstrap's default 300px for better content fit */
}

#reward-success-modal .modal-body {
  padding: 2rem 1.5rem; /* Adjust padding for smaller space */
}

/* Reward Card Styles */
.reward-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Reward Card Image Styles */
.reward-image-container {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Reward Discount Badge - Matches Figma Design */
.reward-discount-badge {
  background: #FFC700;
  color: #FFFFFF;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 14px;
  border-radius: 50px;
  padding: 13px 20px;
  border: none;
  text-align: center;
  white-space: nowrap;
  min-width: 149px;
  height: 41px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Placeholder styling for rewards without images */
.reward-image-container.no-image {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px dashed #dee2e6;
}

.reward-image-container.no-image i {
  color: #adb5bd;
  font-size: 3rem;
}

/* Category-based gradient backgrounds for placeholder */
.reward-image-container[data-category="food"] {
  background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
}

.reward-image-container[data-category="shopping"] {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.reward-image-container[data-category="entertainment"] {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.reward-image-container[data-category="travel"] {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Responsive adjustments for success modal */
@media (max-width: 575.98px) {
  .reward-success-modal-content .modal-body {
    padding: 2rem 1.5rem !important;
  }
  
  .reward-success-modal-content .d-flex {
    flex-direction: column;
    gap: 0.75rem !important;
  }
  
  .reward-success-modal-content .btn {
    width: 100%;
  }

  .reward-image-container {
    min-height: 150px;
  }
}

/* Loading state for images */
.reward-card-image[src=""] {
  display: none;
}