@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    "Open Sans",
    "Helvetica Neue",
    sans-serif;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Custom gradients */
.gradient-environment {
  background: linear-gradient(to bottom right, #dcfce7, #bbf7d0);
}
.gradient-animals {
  background: linear-gradient(to bottom right, #ffedd5, #fed7aa);
}
.gradient-food {
  background: linear-gradient(to bottom right, #fef9c3, #fde047);
}
.gradient-cleanups {
  background: linear-gradient(to bottom right, #dbeafe, #bfdbfe);
}
.gradient-elderly {
  background: linear-gradient(to bottom right, #f3e8ff, #e9d5ff);
}
.gradient-donations {
  background: linear-gradient(to bottom right, #fee2e2, #fecaca);
}

/* Animation classes */
.slide-in {
  animation: slideIn 0.3s ease-out forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-out {
  animation: slideOut 0.3s ease-out forwards;
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-20px);
  }
}

/* Fade in animation for deed cards */
.fade-in {
  animation: fadeIn 0.5s ease-out forwards;
  opacity: 0;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered animation delays */
.animation-delay-100 {
  animation-delay: 0.1s;
}

.animation-delay-200 {
  animation-delay: 0.2s;
}

.animation-delay-300 {
  animation-delay: 0.3s;
}

.animation-delay-400 {
  animation-delay: 0.4s;
}

.animation-delay-500 {
  animation-delay: 0.5s;
}

.animation-delay-600 {
  animation-delay: 0.6s;
}

/* Apple-style Bottom Sheet Category Panel */
.category-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  max-height: 80vh;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
}

.category-panel.active {
  transform: translateY(0);
}

/* Handle bar for bottom sheet */
.panel-header::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
}

.panel-header {
  border-radius: 25px 25px 0px 0px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 16px 12px;
  border-bottom: 1px solid #eee;
  background: #f8f9fa;
  position: relative;
}

.panel-header h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.close-button {
  position: absolute;
  right: 16px;
  top: 16px;
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
}

.close-button:hover {
  background-color: #f1f1f1;
}

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

.category-option {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.category-option:hover {
  background-color: #f8f9fa;
}

.category-icon {
  font-size: 20px;
  margin-right: 12px;
  width: 24px;
  text-align: center;
}

.category-name {
  flex: 1;
  font-size: 17px;
  font-weight: 400;
  color: #000;
}

.checkmark {
  color: #007aff;
  font-weight: 600;
  font-size: 18px;
  display: none;
}

.category-option.selected .checkmark {
  display: block;
}

.panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.panel-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ================= MOBILE HEADER STYLES ================= */
.mobile-header {
  display: none;
  background: white;
  border-bottom: 1px solid #eee;
  padding: 12px 16px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.mobile-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-section {
  display: flex;
  align-items: center;
}

.logo-icon {
  font-size: 24px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spacer {
  flex: 1;
}

.notification-bell {
  background: none;
  border: none;
  padding: 8px;
  border-radius: 50%;
}

.notification-bell:hover {
  background-color: #f5f5f5;
}

/* ================= MOBILE LAYOUT ================= */
@media (max-width: 768px) {
  /* Show mobile header on mobile devices */
  .mobile-header {
    display: block;
  }

  /* Hide desktop notification bell on mobile */
  .notification-bell-desktop {
    display: none !important;
  }

  /* Hide desktop sidebar */
  body > div.w-\[280px\] {
    display: none;
  }

  /* Remove left margin from main */
  main {
    margin-left: 0 !important;
  }

  /* App container padding for mobile - account for both mobile header and bottom nav */
  #app-container {
    padding: 16px !important;
    padding-top: 60px !important; /* space for mobile header */
    padding-bottom: 90px !important; /* space for bottom nav */
  }

  /* Header stack vertically */
  #app-container > div.mb-8 {
    flex-direction: column;
    gap: 16px;
  }

  /* Search full width */
  #app-container .w-80 {
    width: 100% !important;
  }

  /* Title smaller */
  h1.text-3xl {
    font-size: 22px !important;
    line-height: 1.3;
  }

  /* Cards more compact */
  .grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  /* Category pills scroll nicer */
  .overflow-x-auto {
  padding-bottom: 6px;
}
}

/* Location Selection Modal Styles */
#location-modal {
  z-index: 1000;
}

/* Apply modal z-index */
#apply-modal {
  z-index: 1001;
}

/* Share modal z-index */
#share-modal {
  z-index: 1001;
}

/* Success modal z-index */
#success-modal {
  z-index: 1001;
}

/* Leaflet map z-index fix */
.leaflet-container {
  z-index: 1 !important;
  cursor: pointer !important;
}

#location-modal .modal-content {
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

#map-container {
  height: 300px;
}

.leaflet-container {
  height: 100%;
  width: 100%;
  border-radius: 8px;
}

/* ================= MOBILE BOTTOM NAV STYLE ================= */
.mobile-nav {
  display: none;
}

@media (max-width: 768px) {
  .mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
  }

  .mobile-nav button {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    color: #888;
  }

  .mobile-nav i {
    font-size: 20px;
    margin-bottom: 4px;
  }

  .mobile-nav button.active {
    color: #22c55e;
    font-weight: 600;
  }

  /* Floating center create button */
  .mobile-nav .create-btn {
    width: 56px;
    height: 56px;
    background: #22c55e;
    border-radius: 18px;
    color: white;
    font-size: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: -30px;
    box-shadow: 0 8px 18px rgba(34, 197, 94, 0.4);
  }

  .mobile-nav .create-btn span {
    display: none;
  }
}

/* Location Modal Styles */
#map-container.cursor-crosshair {
  cursor: crosshair;
}

#map-container.cursor-crosshair .leaflet-container {
  cursor: crosshair;
}

/* Deed Location Modal Styles */
#deed-map-container.cursor-crosshair {
  cursor: crosshair;
}

#deed-map-container.cursor-crosshair .leaflet-container {
  cursor: crosshair;
}

/* Improve the appearance of the location modal */
#location-modal .bg-blue-50 {
  background-color: #eff6ff;
  border-color: #dbeafe;
}

#location-modal .text-blue-800 {
  color: #1e40af;
}

#location-modal .text-blue-600 {
  color: #2563eb;
}

/* Selected location display */
#selected-location-display {
  font-weight: 600;
  color: #1f2937;
}

/* Current location display */
#current-location-display {
  font-weight: 600;
  color: #1f2937;
}

/* Image preview styles */
#image-preview-container.hidden {
  display: none;
}

#image-preview-container {
  display: block;
}

#image-preview {
  max-height: 160px;
  width: auto;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

/* Share experience image preview styles */
#share-image-preview-container.hidden {
  display: none;
}

#share-image-preview-container {
  display: block;
}

#share-image-preview {
  max-height: 160px;
  width: auto;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

/* Location text animation */
.location-fade-out {
  opacity: 0;
  transition: opacity 0.15s ease-out;
}

.location-fade-in {
  opacity: 1;
  transition: opacity 0.15s ease-in;
}

/* Deed detail image styles */
.deed-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.deed-image {
  max-height: 300px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* For vertical images, we want to maximize the height */
.deed-image.vertical {
  max-height: 400px;
}

/* For horizontal images, we want to maximize the width */
.deed-image.horizontal {
  max-width: 100%;
  max-height: 300px;
}


/* Notification indicator positioning */
.notification-bell-desktop {
  position: relative;
}

.notification-indicator {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(25%, -25%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.25rem;
  font-size: 0.625rem;
  font-weight: 600;
  color: white;
  background-color: #ef4444;
  border: 2px solid white;
  border-radius: 9999px;
  box-sizing: border-box;
}

/* Mobile notification dropdown styles */
@media (max-width: 768px) {
  .notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: calc(100vw - 32px);
    max-width: 320px;
    margin-top: 8px;
    margin-right: 8px;
  }
  
  .notification-dropdown .max-h-96 {
    max-height: 60vh;
  }
}

