/**
 * Offers Styles
 * Styling for live offer system components
 */

/* ===== OfferBox Component ===== */

.offer-box {
  background: white;
  border: 3px dashed #f59e0b;
  border-radius: 16px;
  padding: 0;
  margin: 16px 0;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

/* Coupon ticket notches */
.offer-box::before,
.offer-box::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  background: #f1f5f9;
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.offer-box::before {
  left: -12px;
}

.offer-box::after {
  right: -12px;
}

.offer-box.loading {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.offer-box-header {
  background: linear-gradient(135deg, #fb923c 0%, #f59e0b 100%);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 3px dashed #f59e0b;
}

.offer-icon {
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.offer-box-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  flex: 1;
}

/* Premium Badge */
.premium-badge {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.premium-star {
  font-size: 14px;
}

/* Offer Content */
.offer-content {
  position: relative;
  padding: 20px;
  background: white;
}

.offer-card {
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

.offer-title {
  margin: 0 0 10px 0;
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
}

.offer-description {
  margin: 0 0 16px 0;
  font-size: 15px;
  color: #4b5563;
  line-height: 1.6;
}

/* Expiration Badge */
.expiration-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
  border: 1px solid #fbbf24;
  box-shadow: 0 2px 4px rgba(251, 191, 36, 0.2);
}

.clock-icon {
  font-size: 16px;
}

/* Action Buttons */
.activate-button,
.upgrade-button {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.activate-button {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: white;
}

.activate-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(14, 165, 233, 0.4);
}

.activate-button:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.upgrade-button {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.upgrade-button:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(59, 130, 246, 0.4);
}

/* Carousel Controls */
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px dashed #e5e7eb;
}

.carousel-btn {
  background: linear-gradient(135deg, #f59e0b 0%, #fb923c 100%);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(251, 146, 60, 0.3);
}

.carousel-btn:hover {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(251, 146, 60, 0.4);
}

.carousel-indicator {
  font-size: 14px;
  font-weight: 700;
  color: #6b7280;
  background: #f3f4f6;
  padding: 4px 12px;
  border-radius: 12px;
}

/* ===== Blur Effect for Non-Premium Users ===== */

.offer-box.blurred .offer-content {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}

/* Premium Overlay */
.premium-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 10;
}

.lock-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.overlay-title {
  margin: 0 0 8px 0;
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.overlay-description {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: #6b7280;
  text-align: center;
  line-height: 1.5;
}

.overlay-upgrade-button {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease;
  font-size: 16px;
}

.overlay-upgrade-button:hover {
  transform: scale(1.05);
}

/* ===== Floating Offer Icon ===== */

.floating-offer-icon {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #f59e0b 0%, #fb923c 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(251, 146, 60, 0.4);
  cursor: pointer;
  z-index: 40;
  transition: all 0.3s ease;
  animation: float-entrance 0.5s ease-out;
}

.floating-offer-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(251, 146, 60, 0.5);
}

.floating-offer-icon.pulse {
  animation: pulse-animation 1s ease-in-out;
}

.floating-icon-emoji {
  font-size: 28px;
}

.offer-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid white;
}

/* Animations */
@keyframes float-entrance {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulse-animation {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* ===== Active Offers Panel ===== */

.active-offers-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
  z-index: 50;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: slide-up 0.3s ease-out;
}

.panel-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 49;
  animation: fade-in 0.3s ease-out;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
}

.panel-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.panel-close-btn {
  background: none;
  border: none;
  font-size: 28px;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.offers-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.active-offer-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.offer-venue-name {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.offer-card-title {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #6b7280;
}

/* Offer Type Badge */
.offer-type-badge {
  display: inline-block;
  background: linear-gradient(135deg, #fb923c 0%, #f59e0b 100%);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  margin: 8px 0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 2px 4px rgba(251, 146, 60, 0.3);
}

.offer-type-badge-inline {
  display: inline-block;
  background: linear-gradient(135deg, #fb923c 0%, #f59e0b 100%);
  color: white;
  font-size: 14px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 8px;
  margin: 8px 0 12px 0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(251, 146, 60, 0.3);
}

/* Time Window Display */
.time-window-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #92400e;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #fbbf24;
}

.coupon-code-display {
  background: #f3f4f6;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  padding: 12px;
  margin: 12px 0;
  text-align: center;
}

.coupon-code {
  font-family: 'Courier New', monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #111827;
}

.countdown-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
}

.countdown-timer.warning {
  color: #ef4444;
}

.offer-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.offer-action-btn {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.offer-action-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.offer-action-btn.primary {
  background: #0ea5e9;
  color: white;
  border-color: #0ea5e9;
}

.offer-action-btn.primary:hover {
  background: #0284c7;
  border-color: #0284c7;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.empty-state-title {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.empty-state-description {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
}

/* Animations */
@keyframes slide-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 640px) {
  .offer-box {
    margin: 12px 0;
    padding: 12px;
  }

  .offer-title {
    font-size: 18px;
  }

  .floating-offer-icon {
    bottom: 70px;
    right: 12px;
    width: 48px;
    height: 48px;
  }

  .floating-icon-emoji {
    font-size: 24px;
  }
}
