/* Custom Styles for Waze Places PWA */

* {
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  overscroll-behavior: none;
  background-color: #f8fafc;
}

/* Card Animations */
.place-card {
  transition: transform 0.3s ease, opacity 0.3s ease;
  touch-action: none;
  user-select: none;
}

.place-card.dragging {
  transition: none;
}

.place-card.swipe-out-left {
  animation: swipeOutLeft 0.3s ease forwards;
}

.place-card.swipe-out-right {
  animation: swipeOutRight 0.3s ease forwards;
}

@keyframes swipeOutLeft {
  to {
    transform: translateX(-150%) rotate(-30deg);
    opacity: 0;
  }
}

@keyframes swipeOutRight {
  to {
    transform: translateX(150%) rotate(30deg);
    opacity: 0;
  }
}

/* Swipe Indicators */
.swipe-indicator {
  pointer-events: none;
  transition: background-opacity 0.2s ease;
}

.place-card.swiping-left .swipe-left {
  background-opacity: 0.7;
}

.place-card.swiping-right .swipe-right {
  background-opacity: 0.7;
}

/* Toast Notifications */
.toast {
  min-width: 250px;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  animation: slideInRight 0.3s ease, slideOutRight 0.3s ease 2.7s forwards;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toast.success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.toast.error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.toast.info {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Loading Spinner */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Firefox Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

/* Card Stack Depth Effect */
#cardStack .place-card:nth-child(2) {
  transform: scale(0.95) translateY(10px);
  opacity: 0.7;
  z-index: 1;
}

#cardStack .place-card:nth-child(3) {
  transform: scale(0.9) translateY(20px);
  opacity: 0.4;
  z-index: 0;
}

#cardStack .place-card:first-child {
  z-index: 10;
}

/* Prevent text selection during drag */
.place-card * {
  user-select: none;
  -webkit-user-select: none;
}

/* Button Active States */
button:active {
  transform: scale(0.95);
}

/* Modal Backdrop Blur */
#pasteModal, #helpModal {
  backdrop-filter: blur(4px);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* PWA Install Prompt */
.install-prompt {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  z-index: 100;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateX(-50%) translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}