* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Flag Icon Styles - Using flag-icons library */
.flag-icon {
  display: inline-block;
  border-radius: 2px;
  overflow: hidden;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
  background-size: cover !important;
  background-position: center !important;
}

/* Fallback for unknown flags */
.flag-icon.flag-fallback {
  background: #e5e7eb;
  color: #6b7280;
  text-align: center;
  font-weight: 500;
  font-family: system-ui, -apple-system, sans-serif;
}

/* Country button flag spacing */
.country-button .flag-icon {
  margin-bottom: 4px;
}

/* Ensure flag-icons library flags display properly */
.fi {
  display: inline-block !important;
  vertical-align: middle;
}

/* Flag dropdown styles */
.flag-dropdown-trigger:hover {
  border-color: #9ca3af;
}

.flag-dropdown-trigger:focus-within {
  outline: 2px solid #3b82f6;
  outline-offset: -2px;
  border-color: #3b82f6;
}

.flag-dropdown-item:hover {
  background-color: #f3f4f6;
}

/* Loading States and Skeleton Animations */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

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

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #d92f11;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-spinner.large {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

/* Skeleton Base */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

.skeleton.dark {
  background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
  background-size: 200px 100%;
}

/* Skeleton Components */
.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
  border-radius: 2px;
}

.skeleton-text.large {
  height: 1.5rem;
}

.skeleton-text.small {
  height: 0.75rem;
}

.skeleton-title {
  height: 2rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-avatar.large {
  width: 60px;
  height: 60px;
}

.skeleton-avatar.small {
  width: 24px;
  height: 24px;
}

.skeleton-button {
  height: 2.5rem;
  width: 120px;
  border-radius: 6px;
}

.skeleton-card {
  height: 200px;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.skeleton-image {
  height: 120px;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.skeleton-image.large {
  height: 200px;
}

.skeleton-badge {
  height: 1.5rem;
  width: 60px;
  border-radius: 12px;
}

/* Loading States */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
  color: #6b7280;
}

.loading-state.minimal {
  padding: 1rem;
}

.loading-state .icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.loading-state .message {
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.loading-state .submessage {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* Loading Overlay */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  backdrop-filter: blur(1px);
}

.loading-overlay.dark {
  background: rgba(0, 0, 0, 0.5);
  color: white;
}

.loading-overlay .content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

/* Pulse Animation */
.pulse {
  animation: pulse 2s infinite;
}

/* Fade In Animation */
.fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* Button Loading States */
.button-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.button-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.button-loading .button-text {
  opacity: 0;
}

/* Content Loading States */
.content-loading {
  position: relative;
  min-height: 200px;
}

.content-loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.8) 50%,
    transparent 100%
  );
  animation: shimmer 1.5s infinite;
  z-index: 1;
}

/* Form Loading States */
.form-loading {
  position: relative;
}

.form-loading input,
.form-loading select,
.form-loading textarea,
.form-loading button {
  pointer-events: none;
  opacity: 0.6;
}

/* Map Loading States */
.map-loading {
  position: relative;
  background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  height: 100%;
}

.map-loading-content {
  text-align: center;
  z-index: 1;
  position: relative;
}

.map-loading-animation {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto;
}

.map-pulse-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.2);
  border: 2px solid rgba(239, 68, 68, 0.3);
  animation: mapPulse 2s ease-out infinite;
}

.map-center-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 32px;
  color: #ef4444;
  z-index: 2;
  animation: mapBounce 2s ease-in-out infinite;
}

@keyframes mapPulse {
  0% {
    width: 60px;
    height: 60px;
    opacity: 0.8;
  }
  100% {
    width: 120px;
    height: 120px;
    opacity: 0;
  }
}

@keyframes mapBounce {
  0%,
  100% {
    transform: translate(-50%, -50%) translateY(0);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-10px);
  }
}

/* Responsive Skeleton Adjustments */
@media (max-width: 640px) {
  .skeleton-title {
    height: 1.5rem;
  }

  .skeleton-card {
    height: 150px;
  }

  .skeleton-image {
    height: 80px;
  }

  .loading-state {
    padding: 2rem 1rem;
  }

  .loading-state .icon {
    font-size: 2rem;
  }
}

::selection {
  background-color: #e3350d;
  color: white;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1rem;
  /* No scrolling on overlay - keep modal centered */
  overflow: hidden;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  /* Better scrolling on all devices */
  -webkit-overflow-scrolling: touch;
  /* Fixed positioning - no margin needed */
  display: flex;
  flex-direction: column;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  /* Stick to bottom of modal */
  flex-shrink: 0;
}

/* Modal scrollable content area */
.modal-content {
  /* Keep overflow on modal-content as fallback */
  overflow-y: auto;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* Add some padding to the scrollable area */
  padding-right: 0.5rem;
  /* Ensure minimum height to trigger scroll when needed */
  min-height: 0;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.modal-actions button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

/* New form styles */
.country-button,
.state-button,
.store-button {
  transition: all 0.2s ease;
  border: 2px solid #d1d5db;
  background: white;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  border: 1px solid #d7d7d7;
  background: linear-gradient(180deg, #fff 0%, #fff 70%, #f8f8f8 100%);
}

.country-button:hover,
.state-button:hover,
.store-button:hover {
  border-color: #fca5a5;
  background-color: #f6f3f3;
  transform: translateY(-1px);
}

.country-button.selected,
.state-button.selected,
.store-button.selected {
  border-color: #fca5a5;
  background-color: #fee9e9;
  box-shadow: 0 0 0 2px #e3350d33;
}

.store-logo-container {
  width: 125px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.store-logo-container img {
  max-width: 123px;
  max-height: 58px;
  object-fit: contain;
}

/* State buttons for smaller regions */
.state-button {
  min-height: 60px;
  padding: 0.75rem;
  font-size: 0.875rem;
}

/* Form spacing improvements */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

/* Animate form sections */
.form-group {
  transition: all 0.3s ease;
}

.form-group[style*='display: none'] {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
}

.form-group:not([style*='display: none']) {
  opacity: 1;
  max-height: 1000px;
}

/* Photo preview improvements */
#photos-preview {
  gap: 0.5rem;
}

#photos-preview .relative {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
}

#photos-preview .relative button {
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

#photos-preview .relative:hover button {
  opacity: 1;
}

/* Items checkbox styling */
#items-checkboxes {
  background: #f9fafb;
}

#items-checkboxes .flex {
  padding: 0.5rem;
  border-radius: 0.25rem;
  transition: background-color 0.2s ease;
}

#items-checkboxes .flex:hover {
  background-color: #f3f4f6;
}

#items-checkboxes input[type='checkbox']:checked + label {
  color: #e3350d;
  font-weight: 600;
}

.modal-actions button[type='submit'] {
  background: #e3350d;
  color: white;
}

.modal-actions button[type='button'] {
  background: #e2e8f0;
  color: #4a5568;
}

/* Stock Status Badges */
.stock-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stock-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
}

.stock-badge.out-of-stock {
  background: #fef5e7;
  color: #c05621;
}

.stock-badge.in-stock {
  background: #c6f6d5;
  color: #22543d;
}

.stock-badge.low-stock {
  background: #fef5e7;
  color: #c05621;
}

/* Activity Actions */
.activity-actions button {
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: bold;
  transition: all 0.2s;
}

.add-note-btn {
  background: #f87171;
  color: white;
}

.add-note-btn:hover {
  background: #ef4444;
}

.view-notes-btn {
  background: #e2e8f0;
  color: #4a5568;
}

.view-notes-btn:hover {
  background: #cbd5e0;
}

/* Notes Display */
.activity-notes {
  border-top: 1px solid #e2e8f0;
  padding-top: 1rem;
}

.note-item {
  background: #f7fafc;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  border-left: 3px solid #e2e8f0;
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.stock-status-indicator {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: bold;
  margin-left: 0.5rem;
}

.stock-status-indicator.out-of-stock {
  background: #fef5e7;
  color: #c05621;
}

.stock-status-indicator.in-stock {
  background: #c6f6d5;
  color: #22543d;
}

.stock-status-indicator.low-stock {
  background: #fef5e7;
  color: #c05621;
}

.note-text {
  color: #4a5568;
  font-style: italic;
  margin-top: 0.5rem;
}

.no-notes,
.notes-error,
.notes-loading {
  text-align: center;
  color: #718096;
  padding: 1rem;
  font-style: italic;
}

/* Google Maps Containers */
#map,
#home-map {
  width: 100%;
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
}

#map {
  height: 300px;
  margin-top: 20px;
}

#home-map {
  height: 400px;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
}

h1 {
  font-size: 1.8rem;
}

#user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

#user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.discord-login {
  background: #5865f2;
  color: white;
  padding: 0.5rem 1rem;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  transition: background 0.3s;
}

.discord-login:hover {
  background: #4752c4;
}

main {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Fixed bottom navigation styles */
#mobile-nav {
  z-index: 50 !important;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15) !important;
  backdrop-filter: blur(8px);
  background-color: rgba(255, 255, 255, 0.95) !important;
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  margin: 0 !important;
}

/* Desktop navigation enhancements - closer spacing, slightly larger */
@media (min-width: 768px) {
  #mobile-nav ul {
    height: 4.5rem !important; /* Slightly increase from h-16 (4rem) */
    max-width: 70% !important; /* Reduce width to bring buttons closer */
    justify-content: center !important; /* Center the buttons */
    gap: 0.5rem; /* Reduce gap between buttons */
  }

  #mobile-nav .tab-button {
    padding: 0.75rem 2rem !important; /* Increase horizontal padding for wider buttons */
    min-width: 120px; /* Increase consistent button width */
    background-color: rgba(249, 250, 251, 0.8) !important; /* Slightly darker than nav bar */
    border-radius: 12px; /* Add rounded corners for nice effect */
    transition: all 0.2s ease !important; /* Smooth transitions */
  }

  #mobile-nav .tab-button:hover {
    background-color: rgba(243, 244, 246, 0.9) !important; /* Darker on hover */
    transform: translateY(-1px); /* Subtle lift effect */
  }

  #mobile-nav .tab-button.is-active {
    background-color: rgba(254, 202, 202, 0.8) !important; /* Themed active state */
  }

  #mobile-nav .material-symbols-outlined {
    font-size: 1.5rem !important; /* Moderate increase from text-xl */
  }

  #mobile-nav .text-xs {
    font-size: 0.8125rem !important; /* Slight increase from xs */
    font-weight: 500; /* Make text slightly bolder */
  }
}

/* Ensure main content has proper spacing for fixed header and nav */
main {
  padding-top: 4rem !important;
  padding-bottom: 5rem !important;
}

@media (min-width: 640px) {
  main {
    padding-top: 5rem !important;
    padding-bottom: 4rem !important;
  }
}

@media (min-width: 768px) {
  main {
    padding-bottom: 5.5rem !important; /* Account for slightly larger nav height */
  }
}

.card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tab-button {
  background: rgba(255, 255, 255, 0.8);
  border: none;
  padding: 1rem 2rem;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
}

.tab-button.active {
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tab-button:hover {
  background: white;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: #4a5568;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  background-color: #ffffff;
  color: #2d3748;
  transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1);
  background-color: #ffffff;
}

input:disabled,
select:disabled,
textarea:disabled {
  background-color: #f7fafc;
  color: #a0aec0;
  cursor: not-allowed;
}

/* Ensure consistent styling in modals and admin panels */
.modal-content input,
.modal-content select,
.modal-content textarea,
.admin-tab-content input,
.admin-tab-content select,
.admin-tab-content textarea {
  background-color: #ffffff !important;
  color: #2d3748 !important;
  border: 2px solid #e2e8f0 !important;
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus,
.admin-tab-content input:focus,
.admin-tab-content select:focus,
.admin-tab-content textarea:focus {
  background-color: #ffffff !important;
  color: #2d3748 !important;
  border-color: #f87171 !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1) !important;
}

/* Placeholder text styling */
input::placeholder,
textarea::placeholder {
  color: #a0aec0;
  opacity: 1;
}

/* Select dropdown styling */
select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* Ensure consistent text color across browsers for map filter dropdown */
#frontend-map-filter,
#frontend-map-filter option {
  color: #1f2937 !important;
  background-color: #ffffff !important;
}

/* File input styling */
input[type='file'] {
  padding: 0.5rem;
  border: 2px dashed #e2e8f0;
  background-color: #f8f9fa;
  color: #4a5568;
}

input[type='file']:focus {
  border-color: #f87171;
  background-color: #ffffff;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.submit-btn {
  background: #fb7185;
  font-size: 1.1rem;
  padding: 1rem 2rem;
}

.submit-btn:hover {
  background: #f472b6;
}

#use-location {
  background: #ed8936;
}

#use-location:hover {
  background: #dd7724;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.timestamp {
  color: #718096;
  font-size: 0.9rem;
}

.product-name {
  font-weight: bold;
  color: #2d3748;
}

.store-info {
  color: #718096;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.stock-level {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
}

.stock-level.low {
  background: #fed7d7;
  color: #c53030;
}

.stock-level.out_of_stock,
.stock-level.out-of-stock {
  background: #fef5e7;
  color: #c05621;
}

.stock-level.medium {
  background: #feebc8;
  color: #dd6b20;
}

.stock-level.high {
  background: #c6f6d5;
  color: #38a169;
}

.price {
  font-weight: bold;
  color: #2d3748;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

.set-section {
  margin-bottom: 2rem;
}

.section-title {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.category-card {
  background: linear-gradient(180deg, #fff 0%, #fff 70%, #f8f8f8 100%);
  background-color: rgba(0, 0, 0, 0);
  color: #374151;
  padding: 2rem;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  transition-property: transform, box-shadow;
  transition-duration: 0.3s, 0.3s;
  transition-timing-function: ease, ease;
  text-decoration: none;
  border: 1px solid #d7d7d7;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.category-name {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.category-description {
  opacity: 0.9;
  font-size: 0.9rem;
  line-height: 1.4;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.back-button {
  background: #fca5a5;
  color: #7f1d1d;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.back-button:hover {
  background: #f87171;
  color: white;
}

.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filters input,
.filters select {
  flex: 1;
  min-width: 200px;
}

.alert-item {
  position: relative;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.alert-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: #e3350d;
}

.set-logo-background {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.3), transparent);
  -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.3), transparent);
}

.set-logo-img {
  max-height: 80%;
  max-width: 100%;
  object-fit: contain;
  opacity: 0.15;
}

.alert-content {
  position: relative;
  z-index: 1;
  padding: 1.5rem;
}

.alert-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.product-info {
  flex: 1;
}

.alert-product {
  font-weight: 700;
  font-size: 1.2rem;
  color: #1a202c;
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
}

.alert-category {
  display: inline-block;
  background: linear-gradient(135deg, #e3350d, #f56565);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 25px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(227, 53, 13, 0.3);
}

.alert-timestamp {
  font-size: 0.85rem;
  color: #718096;
  font-weight: 500;
  white-space: nowrap;
}

.store-location {
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #e3350d;
}

.store-name {
  font-weight: 600;
  font-size: 1rem;
  color: #2d3748;
  margin-bottom: 0.25rem;
}

.store-address {
  font-size: 0.9rem;
  color: #64748b;
}

.alert-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #cbd5e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #64748b;
}

.username {
  font-weight: 600;
  color: #2d3748;
}

.stock-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.alert-notes {
  margin: 1rem 0;
  padding: 1rem;
  background: #f1f5f9;
  border-radius: 8px;
  color: #64748b;
  font-style: italic;
  border-left: 3px solid #cbd5e0;
}

.alert-image-container {
  margin: 1.5rem 0;
}

.alert-image {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.alert-image:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.alert-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  color: #64748b;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e0;
  color: #2d3748;
  transform: translateY(-1px);
}

.action-btn span {
  font-size: 1rem;
}

.activity-notes {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

/* Filter Interface Styles */
.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  background-color: white;
  transition: all 0.2s ease;
  user-select: none; /* Prevent text selection on button */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Add proper left padding for search input with icon */
#search-filter {
  padding-left: 2.75rem; /* Ensure enough space for the search icon */
}

.filter-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-select:hover {
  border-color: #9ca3af;
  background-color: #f9fafb; /* Add subtle background change on hover */
}

/* Multi-select dropdown checkbox styles */
#product-filter-dropdown input[type='checkbox'],
#set-filter-dropdown input[type='checkbox'] {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* Highlight flash animation for view more navigation */
@keyframes highlightFlash {
  0% {
    background-color: transparent;
  }
  20% {
    background-color: rgba(59, 130, 246, 0.2);
  }
  80% {
    background-color: rgba(59, 130, 246, 0.2);
  }
  100% {
    background-color: transparent;
  }
}

.highlight-flash {
  animation: highlightFlash 2s ease-in-out;
}

/* Unified pastel red highlight animation */
@keyframes pastelRedHighlight {
  0% {
    background-color: transparent;
    outline: none;
  }
  20% {
    background-color: rgba(254, 202, 202, 0.6);
    outline: 2px solid rgba(239, 68, 68, 0.3);
    outline-offset: 2px;
  }
  80% {
    background-color: rgba(254, 202, 202, 0.3);
    outline: 2px solid rgba(239, 68, 68, 0.15);
    outline-offset: 2px;
  }
  100% {
    background-color: transparent;
    outline: none;
  }
}

.pastel-red-highlight {
  animation: pastelRedHighlight 2s ease-in-out;
  transition: all 0.3s ease-in-out;
}

/* Modern Alert Card Styles */
.modern-alert-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  margin-bottom: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #e5e7eb;
}

.modern-alert-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08), 0 6px 10px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

/* Card Header */
.modern-alert-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-bottom: 1px solid #e5e7eb;
}

.user-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-modern {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e5e7eb;
}

.user-avatar-placeholder-modern {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e3350d 0%, #ffcb05 100%);
  border: 2px solid #e5e7eb;
}

.user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.username-modern {
  font-weight: 600;
  color: #111827;
  font-size: 14px;
}

.timestamp-modern {
  font-size: 12px;
  color: #6b7280;
}

.stock-badge {
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stock-badge.high {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.stock-badge.medium {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.stock-badge.low {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.stock-badge.out_of_stock,
.stock-badge.out-of-stock {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

/* Header Badges Container */
.header-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Mobile improvements for badges */
@media (max-width: 640px) {
  .header-badges {
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
  }

  .stock-badge {
    padding: 4px 8px;
    font-size: 10px;
    line-height: 1.2;
  }

  .distance-badge {
    padding: 4px 8px;
    font-size: 10px;
    line-height: 1.2;
  }
}

/* Responsive navigation text */
@media (max-width: 639px) {
  .profile-nav-text::before {
    content: '👤 Profile';
  }
  .profile-nav-text {
    font-size: 0;
  }

  .achievements-nav-text::before {
    content: '🏅 Awards';
  }
  .achievements-nav-text {
    font-size: 0;
  }

  .leaderboard-nav-text::before {
    content: '🏆 Top';
  }
  .leaderboard-nav-text {
    font-size: 0;
  }

  .profile-nav-text::before,
  .achievements-nav-text::before,
  .leaderboard-nav-text::before {
    font-size: 0.75rem;
  }
}

/* Mobile leaderboard improvements */
@media (max-width: 640px) {
  /* Fix leaderboard entry layout on mobile */
  #leaderboard-content .space-y-3 > div {
    padding: 12px !important;
    gap: 8px !important;
  }

  /* Make avatar smaller on mobile */
  #leaderboard-content .w-10.h-10 {
    width: 2rem !important;
    height: 2rem !important;
  }

  /* Adjust rank display */
  #leaderboard-content .w-12 {
    width: 2rem !important;
    min-width: 2rem !important;
  }

  /* Stack stats vertically on very small screens */
  #leaderboard-content .flex.items-center.gap-4:not(.w-10):not(.w-12) {
    flex-wrap: wrap !important;
    gap: 4px !important;
  }

  /* Make stats text smaller */
  #leaderboard-content .text-sm {
    font-size: 0.75rem !important;
  }

  #leaderboard-content .text-xs {
    font-size: 0.6875rem !important;
  }

  /* Reduce spacing in stats */
  #leaderboard-content .space-y-1 {
    gap: 2px !important;
  }
}

/* Back to My Profile Button Animation */
.back-to-profile-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-to-profile-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.back-to-profile-btn:active {
  transform: translateY(0);
  transition: transform 0.1s ease;
}

/* Distance Badge */
.distance-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  color: white;
}

/* Card Body */
.modern-alert-card .card-body {
  padding: 20px;
}

/* Sets and Products Header */
.sets-products-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.expand-collapse-controls {
  display: flex;
  gap: 6px;
}

.expand-all-btn,
.collapse-all-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 3px;
  color: #374151;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.expand-all-btn:hover,
.collapse-all-btn:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

/* Sets and Products Container */
.sets-products-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.set-products-group {
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

/* Single item spans full width */
.set-products-group.full-width {
  grid-column: 1 / -1;
}

.set-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: white;
  border-bottom: 1px solid #e5e7eb;
}

.set-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.set-logo-inline {
  width: 28px;
  height: 28px;
  object-fit: contain;
  padding: 3px;
  background: #f9fafb;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

.set-name-label {
  font-weight: 600;
  color: #111827;
  font-size: 13px;
}

.expand-products-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.expand-products-btn:hover {
  background: #f3f4f6;
}

.expand-products-btn .material-symbols-outlined {
  font-size: 20px;
  color: #6b7280;
}

/* Products List */
.products-list {
  padding: 0;
  background: white;
  transition: all 0.3s ease;
  overflow: hidden;
}

.products-list.collapsed {
  max-height: 0;
  padding: 0;
}

.products-list.expanded {
  max-height: 500px;
  padding: 12px;
}

.products-grid-modern {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.product-item-modern {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: linear-gradient(135deg, #fff, #fef3f2);
  border: 1px solid #e3350d20;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 12px;
}

.product-item-modern:hover {
  background: linear-gradient(135deg, #fef3f2, #fecaca);
  border-color: #e3350d40;
  transform: translateX(4px);
}

.product-type-icon {
  font-size: 14px;
}

.product-name-modern {
  font-size: 12px;
  font-weight: 500;
  color: #374151;
}

.product-specific-name {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
}

.no-products-text {
  padding: 8px 16px;
  font-size: 13px;
  color: #9ca3af;
  font-style: italic;
}

/* Other Item Box Styles */
.other-item-box {
  padding: 8px 16px;
}

.other-item-container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #fff0f0, #fee0e0);
  border: 1px solid #0ea5e920;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.other-item-container:hover {
  background: linear-gradient(135deg, #fee0e0, #fdbaba);
  border-color: #0ea5e940;
  transform: translateX(2px);
}

.other-item-icon {
  font-size: 14px;
  opacity: 0.8;
}

.other-item-text {
  font-size: 12px;
  font-weight: 500;
  color: #0f172a;
  word-break: break-word;
}

/* Delete Selected Item Button */
.delete-selected-item {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 3px;
  transition: all 0.2s ease;
  opacity: 0.7;
}

.delete-selected-item:hover {
  background: rgba(239, 68, 68, 0.1);
  opacity: 1;
  transform: scale(1.1);
}

/* Selected Items Display */
#edit-selected-items-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#edit-selected-items-list .other-item-container {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border: 1px solid #0ea5e920;
  margin-bottom: 0;
}

#edit-selected-items-list .other-item-container:hover {
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  transform: none;
}

/* Store and Price Info Row */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  background: linear-gradient(135deg, #f9fafb, #f3f4f6);
  border-radius: 10px;
  margin-bottom: 12px;
  border: 1px solid #e5e7eb;
}

.store-info-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.store-name-compact {
  font-weight: 700;
  color: #111827;
  font-size: 15px;
  margin-bottom: 2px;
}

.store-address-compact {
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

.price-badge {
  padding: 8px 16px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #fbbf24;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 700;
  color: #92400e;
}

/* Photo Section */
.photo-section {
  margin-bottom: 12px;
}

.photo-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  cursor: pointer;
  transition: all 0.3s ease;
}

.photo-container:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.stock-photo {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.stock-photo-placeholder {
  width: 100%;
  height: 250px;
  object-fit: contain;
  display: block;
  background-color: #f9fafb;
  border: 1px dashed #d1d5db;
}

/* Compact Alert Cards */
.alert-card {
  transition: box-shadow 0.15s ease;
}

.alert-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.alert-card img,
.alert-card svg {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 0.5rem;
  background: #f9fafb;
}

/* Custom Tooltip Styles */
.custom-tooltip {
  position: absolute;
  z-index: 1000;
  background: #1f2937;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  white-space: pre-line;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.custom-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

.custom-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #1f2937;
}

.custom-tooltip.below::after {
  top: 8px;
  border-top-color: transparent;
  border-bottom-color: #1f2937;
}

.photo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.7) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.photo-container:hover .photo-overlay {
  opacity: 1;
}

.photo-overlay .material-symbols-outlined {
  font-size: 32px;
  color: white;
  margin-bottom: 4px;
}

.photo-overlay-text {
  color: white;
  font-size: 12px;
  font-weight: 500;
}

/* Notes Section Modern */
.notes-section-modern {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: #f0f9ff;
  border-left: 3px solid #3b82f6;
  border-radius: 0 8px 8px 0;
  margin-bottom: 12px;
}

.notes-text {
  font-size: 14px;
  color: #1e40af;
  line-height: 1.5;
}

/* Price Section */
.price-section {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fef3c7;
  border-radius: 8px;
  border: 1px solid #fcd34d;
}

.price-label {
  font-size: 12px;
  color: #92400e;
  font-weight: 500;
}

.price-value {
  font-size: 16px;
  font-weight: 700;
  color: #92400e;
}

/* Notes Section */
.notes-section {
  margin-top: 12px;
  padding: 12px;
  background: #f0f9ff;
  border-left: 3px solid #3b82f6;
  border-radius: 0 8px 8px 0;
}

.notes-content {
  font-size: 14px;
  color: #1e40af;
  line-height: 1.5;
}

/* Image Section */
.image-section {
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
}

.stock-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.stock-image:hover {
  transform: scale(1.02);
}

/* Status Badges */
.status-badges {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* Card Actions */
.modern-alert-card .card-actions {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

.modern-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.2s ease;
}

.modern-action-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  transform: translateY(-1px);
}

.modern-action-btn .material-symbols-outlined {
  font-size: 18px;
  color: #6b7280;
}

/* Responsive adjustments for modern cards */
@media (max-width: 768px) {
  .modern-alert-card .card-header {
    padding: 12px 16px;
  }

  .modern-alert-card .card-body {
    padding: 16px;
  }

  .content-grid {
    flex-direction: column;
    gap: 12px;
  }

  .set-logo-modern {
    width: 60px;
    height: 60px;
  }

  .modern-alert-card .card-actions {
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .modern-action-btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
  }

  .products-grid {
    gap: 6px;
  }

  .product-pill {
    font-size: 12px;
    padding: 4px 10px;
  }

  .photo-container {
    max-width: 100%;
  }

  .stock-photo {
    height: 200px;
  }
}

#recent-filters {
  transition: all 0.3s ease;
}

#active-filters-count {
  background: #f3f4f6;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  text-align: center;
}

#filter-count {
  font-weight: 600;
  color: #3b82f6;
}

#clear-filters {
  transition: all 0.2s ease;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

#clear-filters:hover {
  background-color: #dbeafe;
}

/* Additional mobile optimizations */
@media (max-width: 480px) {
  /* Very small screens - optimize further */
  header .flex.h-16 {
    height: 3.5rem;
  }

  header .h-10 {
    height: 2.25rem;
  }

  main {
    padding-top: 3.5rem !important;
  }

  .card {
    padding: 0.75rem;
    border-radius: 8px;
  }

  /* Smaller navigation icons and text */
  #mobile-nav .material-symbols-outlined {
    font-size: 1.25rem;
  }

  #mobile-nav .text-xs {
    font-size: 0.625rem;
  }

  /* Compact user info */
  #user-info {
    gap: 0.25rem;
  }

  #user-info a {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
  }

  /* Mobile comments/notes optimization */
  .notes-section-modern,
  .notes-section {
    padding: 8px 12px;
    margin-bottom: 8px;
    font-size: 13px;
  }

  .notes-text,
  .notes-content {
    font-size: 13px;
    line-height: 1.4;
  }

  .activity-notes {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
  }

  .note-item {
    padding: 8px 12px;
    margin-bottom: 6px;
  }

  /* Mobile-optimized note header layout */
  .note-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .note-header .user-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
  }

  .note-header .timestamp {
    align-self: flex-start;
    font-size: 0.8rem;
    margin-top: 0;
  }

  /* Make stock status indicator smaller on mobile */
  .stock-status-indicator {
    font-size: 0.7rem;
    padding: 2px 6px;
  }

  /* Ensure report button doesn't take too much space */
  .report-btn-compact {
    padding: 2px;
  }

  .report-btn-compact .material-symbols-outlined {
    font-size: 16px;
  }

  /* Optimize user avatar size on mobile */
  .note-item .user-avatar {
    width: 20px;
    height: 20px;
  }

  /* Better text wrapping for note text on mobile */
  .note-text {
    word-wrap: break-word;
    line-height: 1.4;
    margin-top: 0.5rem;
  }

  /* Fix sets-products-container on mobile - single column layout */
  .sets-products-container {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Single item class for better mobile handling */
  .sets-products-container.single-item {
    grid-template-columns: 1fr;
  }

  /* Modal mobile optimization for very small screens */
  .modal-content {
    width: calc(100vw - 1rem);
    height: 90vh;
    max-height: 90vh;
    max-width: none;
    padding: 1rem;
  }

  .modal-overlay {
    align-items: center;
    padding: 0.5rem;
  }

  .modal-content h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
  }

  .modal-content .space-y-4 > * + * {
    margin-top: 0.75rem;
  }

  .modal-actions {
    margin-top: 1rem;
    gap: 0.5rem;
  }

  .modal-actions button {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 768px) {
  #recent-filters .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  #recent-filters {
    padding: 1rem;
  }

  /* Modal optimization for tablets and phones */
  .modal-content {
    width: calc(100vw - 2rem);
    height: 90vh;
    max-height: 90vh;
    max-width: none;
    padding: 1.5rem;
  }

  /* Keep modal centered on mobile too */
  .modal-overlay {
    align-items: center;
    padding: 1rem;
  }

  /* Improve form elements on mobile */
  .modal-content input,
  .modal-content textarea,
  .modal-content select {
    padding: 0.75rem;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .modal-content textarea {
    min-height: 80px;
  }

  /* Fix sets-products-container on tablet - single column layout for better readability */
  .sets-products-container {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Tab transition improvements */
.tab-content {
  transition: opacity 0.2s ease-in-out;
}

.tab-content[style*='block'] {
  opacity: 1;
}

.tab-switching {
  opacity: 0;
}

/* Smooth filter updates */
#recent-checkins {
  transition: opacity 0.15s ease-out;
}

.filter-updating {
  opacity: 0.7;
}

/* Enhanced tab button transitions */
.tab-button {
  transition: all 0.2s ease-in-out;
}

.address-results {
  margin-top: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  display: none;
}

.address-result-item {
  padding: 0.75rem;
  cursor: pointer;
  border-bottom: 1px solid #e2e8f0;
  transition: background-color 0.2s;
}

.address-result-item:hover {
  background-color: #f7fafc;
}

.address-result-item:last-child {
  border-bottom: none;
}

.address-result-name {
  font-weight: bold;
  color: #2d3748;
}

.address-result-address {
  color: #718096;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

#search-address {
  background: #38a169;
  margin-right: 0.5rem;
}

#search-address:hover {
  background: #2f855a;
}

@media (max-width: 768px) {
  main {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  .card {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  /* Better spacing for mobile cards */
  .card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  /* Improve button spacing on mobile */
  .flex.gap-2 {
    gap: 0.5rem;
  }

  /* Make search inputs full width on mobile */
  .flex.flex-col.sm\:flex-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .flex.flex-col.sm\:flex-row .flex-1 {
    width: 100%;
  }

  .tabs {
    flex-direction: column;
  }

  .tab-button {
    padding: 0.75rem 1rem;
  }

  .categories-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Better mobile spacing for category cards */
  .category-card {
    padding: 1.5rem;
  }

  .filters {
    flex-direction: column;
  }

  .filters input,
  .filters select {
    min-width: auto;
  }

  .category-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .alert-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .alert-timestamp {
    font-size: 0.8rem;
  }

  .alert-product {
    font-size: 1.1rem;
  }

  .alert-details {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .stock-info {
    align-self: stretch;
    justify-content: space-between;
  }

  .set-logo-background {
    display: none;
  }

  .alert-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .action-btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }

  /* Better mobile filter interface */
  #recent-filters .grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  /* Mobile-optimized form inputs */
  .form-input,
  input[type='text'],
  input[type='number'],
  select,
  textarea {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 0.75rem;
  }

  /* Better touch targets */
  button,
  .btn {
    min-height: 44px; /* iOS guideline for touch targets */
    padding: 0.75rem 1rem;
  }

  .store-location {
    padding: 0.75rem;
  }

  .alert-image {
    max-height: 150px;
  }
}

.icon {
  width: 8rem;
  height: 8rem;
  display: inline-block;
  background-image: image-set(
    url('/assets/images/features.webp') type('image/webp'),
    url('/assets/images/features.png') type('image/png')
  );
  background-size: 200% 200%;
  background-repeat: no-repeat;
}

.icon-alert {
  background-position: 0% 0%;
}
.icon-filter {
  background-position: 100% 0%;
}
.icon-region {
  background-position: 0% 100%;
}
.icon-price {
  background-position: 100% 100%;
}

.tab-button.is-active {
  background-color: #fecaca;
  color: #721919;
}

/* Admin Panel Styles */
.admin-tab-button {
  transition: all 0.2s ease;
}

.admin-tab-button.is-active {
  background-color: #fecaca;
  color: #dc2626;
  transform: scale(1.05);
}

.checkin-admin-item {
  transition: all 0.2s ease;
}

.checkin-admin-item:hover {
  background-color: #f8fafc;
  border-color: #fca5a5;
}

.section-admin-item,
.set-admin-item,
.product-admin-item {
  transition: all 0.2s ease;
}

.section-admin-item:hover,
.set-admin-item:hover,
.product-admin-item:hover {
  background-color: #f8fafc;
  border-color: #fca5a5;
}

.modal-content.max-w-2xl {
  max-width: 48rem;
}

/* Image-based Icon Styles */

/* Section Icon Styles */
.section-icon {
  display: inline-block;
  height: 20px;
  margin-left: 8px;
  opacity: 0.3;
  vertical-align: middle;
}

/* Category Card Icon Styles */
.category-card {
  position: relative;
  overflow: hidden;
}

.category-watermark {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  opacity: 0.15;
  pointer-events: none;
  object-fit: contain;
}

/* Product Item Icon Styles */
.alert-item {
  position: relative;
}

/* Responsive admin grid */
@media (max-width: 1024px) {
  .grid.grid-cols-1.lg\\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .admin-tab-button {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }

  .admin-tab-button span:last-child {
    display: none;
  }
}

.mask-fade-left {
  -webkit-mask-image: linear-gradient(to left, black 80%, transparent 100%);
  mask-image: linear-gradient(to left, black 80%, transparent 100%);
}

@keyframes gradient-x {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}
.animate-gradient-x {
  animation: gradient-x 6s ease infinite;
}

@keyframes pokeball-fall {
  0% {
    transform: translate3d(var(--x, 0), -100px, 0) rotate(0deg);
  }
  100% {
    transform: translate3d(var(--x, 0), calc(100vh + 100px), 0) rotate(360deg);
  }
}

/* Pokeball animation container and effects */
#pokeball-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: none;
}

.pokeball-fx {
  position: absolute;
  will-change: transform;
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .pokeball-fx {
    animation: none !important;
  }
}

.form-checkbox {
  width: 10%;
}

/* Moderation indicators for comments */
.moderated-content {
  opacity: 0.7;
  border-left: 3px solid #f59e0b;
}

.moderation-badge {
  background-color: #f59e0b;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
}

.moderation-badge.hidden {
  background-color: #ef4444;
}

.moderation-badge.removed {
  background-color: #dc2626;
}

.gm-style-iw-chr {
  height: 25px;
}

.gm-style .gm-style-iw-d {
  overflow: initial;
}

/* Voting Buttons */
.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px 8px;
  border: 1px solid #e5e7eb;
  background: white;
  border-radius: 4px;
  color: #6b7280;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

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

.vote-btn.voted {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1e40af;
}

.vote-btn .vote-count {
  font-weight: 500;
}

.voting-section {
  display: flex;
  gap: 8px;
  margin-right: 12px;
}

.voting-section .vote-btn {
  padding: 6px 10px;
  border-radius: 6px;
}

.vote-btn.own-post {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f9fafb !important;
  border-color: #e5e7eb !important;
  color: #9ca3af !important;
}

.vote-btn.own-post:hover {
  background: #f9fafb !important;
  border-color: #e5e7eb !important;
}

/* Compact Report Button */
.report-btn-compact {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 2px;
  margin: 0 4px;
  border-radius: 3px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.report-btn-compact:hover {
  color: #dc2626;
  background-color: #fef2f2;
}

.report-btn-compact:active {
  transform: scale(0.95);
}

.report-btn-compact .material-symbols-outlined {
  font-size: 14px;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
}

.report-btn-compact:hover .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 20;
}

/* Lazy Loading Image States */
img[data-src],
img[data-srcset] {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  min-height: 120px;
  display: block;
}

img.loading {
  opacity: 0.7;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
}

img.loaded {
  background: none;
  animation: none;
}

img.error {
  background: #fef2f2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

img.error::after {
  content: '❌ Failed to load';
  position: absolute;
  font-size: 0.875rem;
  color: #6b7280;
}

/* Responsive Image Support */
.responsive-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  transition: opacity 0.3s ease;
}

.responsive-image.loading {
  opacity: 0.7;
}

.responsive-image.loaded {
  opacity: 1;
}

/* Picture element support */
picture img {
  width: 100%;
  height: auto;
  display: block;
}

/* Enhanced Skeleton Components for Lazy Content */
.skeleton-container {
  padding: 1rem;
}

.skeleton-list-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: white;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.skeleton-grid-item {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid #e5e7eb;
}

/* Advanced Skeleton Variations */
.skeleton-checkin-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.skeleton-checkin-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.skeleton-checkin-header .skeleton-avatar {
  margin-right: 0.75rem;
}

.skeleton-checkin-content {
  display: flex;
  gap: 1rem;
}

.skeleton-checkin-image {
  width: 120px;
  height: 90px;
  border-radius: 8px;
  flex-shrink: 0;
}

.skeleton-checkin-details {
  flex: 1;
}

.skeleton-product-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

.skeleton-product-image {
  height: 200px;
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

.skeleton-product-content {
  padding: 1rem;
}

.skeleton-store-card {
  background: white;
  border-radius: 12px;
  padding: 1rem;
  border: 2px solid #f3f4f6;
  margin-bottom: 0.75rem;
}

.skeleton-store-header {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.skeleton-store-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  margin-right: 0.75rem;
}

/* Progress Loading States */
.progress-loading {
  background: #f3f4f6;
  border-radius: 6px;
  overflow: hidden;
  height: 6px;
  margin: 1rem 0;
}

.progress-loading-bar {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
  border-radius: inherit;
  animation: progressSlide 2s ease-in-out infinite;
  width: 30%;
}

@keyframes progressSlide {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(200%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Interactive Loading States */
.interactive-loading {
  position: relative;
  cursor: wait;
}

.interactive-loading::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, transparent, rgba(59, 130, 246, 0.1), transparent);
  border-radius: inherit;
  animation: borderGlow 2s linear infinite;
  z-index: -1;
}

@keyframes borderGlow {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Staggered Animation Delays for Lists */
.skeleton-list .skeleton:nth-child(1) {
  animation-delay: 0s;
}
.skeleton-list .skeleton:nth-child(2) {
  animation-delay: 0.1s;
}
.skeleton-list .skeleton:nth-child(3) {
  animation-delay: 0.2s;
}
.skeleton-list .skeleton:nth-child(4) {
  animation-delay: 0.3s;
}
.skeleton-list .skeleton:nth-child(5) {
  animation-delay: 0.4s;
}

/* Pulsing Content Placeholders */
.content-placeholder {
  background: #f9fafb;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  margin: 2rem 0;
}

.content-placeholder-icon {
  width: 48px;
  height: 48px;
  background: #e5e7eb;
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: pulse 1.5s ease-in-out infinite;
}

.content-placeholder-text {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.content-placeholder-subtext {
  color: #9ca3af;
  font-size: 0.75rem;
}

/* Loading States for Lazy Content */
.lazy-content-loading {
  min-height: 200px;
  position: relative;
  overflow: hidden;
}

.lazy-content-loaded {
  animation: fadeIn 0.5s ease-out;
}

.lazy-content-error {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: #6b7280;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.message-content > p > a {
  color: #2769f0 !important;
  text-decoration: underline;
}

/* Material Icons setup */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined', sans-serif;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-variation-settings: 'FILL' 0, 'wght' 600, 'GRAD' 0, 'opsz' 24;
}

/* Profile modal input fixes */
#preferences-form input,
#preferences-form select {
  background-color: white !important;
  color: #374151 !important;
}

/* Preferences tab positioning fix */
#preferences-tab {
  position: relative;
  z-index: 1;
  margin-bottom: 2rem;
}

/* Ensure footer stays below preferences content */
.tab-content {
  min-height: auto;
  padding-bottom: 2rem;
}

/* Mobile navigation positioning */
#mobile-nav {
  z-index: 40;
}

/* Enhanced photo upload styles */
.touch-manipulation {
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

#photo-upload-area {
  transition: all 0.2s ease;
  min-height: 120px;
}

#photo-upload-area:hover {
  border-color: #9ca3af;
  background-color: #f9fafb;
}

#photo-upload-area.drag-over {
  border-color: #3b82f6 !important;
  background-color: #eff6ff !important;
  transform: scale(1.02);
}

.photo-preview-container {
  position: relative;
  display: inline-block;
}

.photo-remove-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ef4444;
  color: white;
  border: 2px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.photo-remove-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}

@media (max-width: 640px) {
  #photo-upload-area {
    padding: 1rem;
  }

  .touch-manipulation {
    min-height: 44px; /* iOS minimum touch target */
  }
}

/* Address search dropdown styling */
#address-search-results {
  z-index: 1000;
}

.address-search-result:hover {
  background-color: #f3f4f6;
}

.address-search-result:active {
  background-color: #e5e7eb;
}

/* Image rendering styles */
.pixelated {
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
  image-rendering: pixelated;
}
