/* Flight Seat Trader - Trade Result Animations */

/* ===== TRADE ACCEPTED ===== */
.seat-card.accepted {
  animation: tradeAccepted 0.6s ease-out;
  border-color: #10b981 !important;
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.6) !important;
  position: relative;
}

.seat-card.accepted::after {
  content: '✓ ACCEPTED';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: 900;
  color: #10b981;
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.8), 0 4px 8px rgba(0, 0, 0, 0.5);
  z-index: 100;
  background: rgba(0, 0, 0, 0.7);
  padding: 1rem 2rem;
  border-radius: 12px;
  backdrop-filter: blur(10px);
  animation: acceptedLabel 0.6s ease-out;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

@keyframes tradeAccepted {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1.02);
  }
}

@keyframes acceptedLabel {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  60% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ===== TRADE DENIED ===== */
.seat-card.denied {
  animation: tradeDenied 0.4s ease-out forwards;
  border-color: #6b7280 !important;
}

.seat-card.denied::after {
  content: '× DENIED';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  font-weight: 700;
  color: #6b7280;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  z-index: 100;
  opacity: 0.6;
  animation: deniedLabel 0.4s ease-out;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@keyframes tradeDenied {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: grayscale(0);
  }
  100% {
    opacity: 0.5;
    transform: scale(0.96);
    filter: grayscale(1);
  }
}

@keyframes deniedLabel {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  100% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ===== AGREEMENT FEEDBACK ===== */
.agreement-feedback {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #3b82f6 0%, #1e3a8a 100%);
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
  z-index: 101;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  text-align: center;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.agreement-feedback.visible {
  opacity: 1;
  animation: feedbackSlideIn 0.4s ease-out;
}

@keyframes feedbackSlideIn {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.agreement-percentage {
  font-size: 2.5rem;
  font-weight: 900;
  color: #fbbf24;
  line-height: 1;
  margin-bottom: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
  text-shadow: 0 2px 8px rgba(251, 191, 36, 0.5);
}

.agreement-text {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* ===== SEAT PULSE (for highlights) ===== */
.seat.pulse {
  animation: seatPulse 1s ease-in-out;
}

@keyframes seatPulse {
  0%, 100% {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--airline-blue);
  }
  50% {
    transform: scale(1.15);
    box-shadow: 0 0 30px var(--airline-blue), 0 0 40px var(--airline-light);
  }
}

/* ===== LOADING STATES ===== */
.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ===== HOVER GLOW ===== */
.seat-card:not(.disabled):hover {
  animation: cardGlow 0.3s ease-out forwards;
}

@keyframes cardGlow {
  0% {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
  }
  100% {
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.4), 0 0 0 2px rgba(96, 165, 250, 0.3);
  }
}

/* ===== SMOOTH TRANSITIONS ===== */
.seat-card,
.config-btn,
button {
  will-change: transform;
}

.seat-card:not(.disabled) {
  cursor: pointer;
}

.seat-card.disabled {
  pointer-events: none;
}

/* ===== MOBILE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
  .seat-card.accepted::after {
    font-size: 1.5rem;
    padding: 0.75rem 1.5rem;
  }

  .seat-card.denied::after {
    font-size: 1.2rem;
  }

  .agreement-feedback {
    bottom: 1rem;
    padding: 0.75rem 1rem;
  }

  .agreement-percentage {
    font-size: 2rem;
  }

  .agreement-text {
    font-size: 0.75rem;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
