@tailwind base;
@tailwind components;
@tailwind utilities;

/*

@layer components {
  .btn-primary {
    @apply py-2 px-4 bg-blue-200;
  }
}

*/
/* Shipment Tracking Dashboard Styles */

/* Gray background for entire page */
body {
  background-color: #f3f4f6 !important;
}

/* Brand gradient classes */
.bg-brand-gradient {
  background: linear-gradient(135deg, #0e8cbf 0%, #00a4a3 100%);
}

.bg-brand-gradient-reverse {
  background: linear-gradient(135deg, #00a4a3 0%, #0e8cbf 100%);
}

/* Simple color classes */
.bg-primary {
  background-color: #0e8cbf;
}

.bg-accent {
  background-color: #00a4a3;
}

.text-primary {
  color: #0e8cbf;
}

.text-accent {
  color: #00a4a3;
}

/* Background opacity classes for compatibility */
.bg-opacity-90 {
  background-color: rgba(255, 255, 255, 0.9) !important;
}

.bg-opacity-70 {
  background-color: rgba(255, 255, 255, 0.7) !important;
}

.border-opacity-30 {
  border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #0e8cbf 0%, #00a4a3 100%);
  border-radius: 10px;
  border: 2px solid #f1f5f9;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #00a4a3 0%, #0e8cbf 100%);
  border: 2px solid #e2e8f0;
  box-shadow: 0 0 10px rgba(14, 140, 191, 0.3);
}

::-webkit-scrollbar-corner {
  background: #f1f5f9;
}

/* Custom scrollbar for Firefox */
html {
  scrollbar-width: thin;
  scrollbar-color: #0e8cbf #f1f5f9;
  background-color: #f3f4f6;
}

/* Enhanced scrollbar for scrollable containers */
.custom-scroll::-webkit-scrollbar {
  width: 8px;
}

.custom-scroll::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.5);
  border-radius: 8px;
}

.custom-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #0e8cbf 0%, #00a4a3 100%);
  border-radius: 8px;
  border: 1px solid rgba(241, 245, 249, 0.3);
}

.custom-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #00a4a3 0%, #0e8cbf 100%);
  box-shadow: 0 0 8px rgba(14, 140, 191, 0.4);
}

/* Custom styles for shipment tracking page */

/* Enhanced Leaflet custom marker styling */
.custom-div-icon {
  background: none !important;
  border: none !important;
  transition: all 0.3s ease;
}

.custom-div-icon:hover {
  transform: scale(1.1);
}

.pin-marker {
  position: relative;
  transition: all 0.3s ease;
}

.pin-marker::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: inherit;
  border-radius: inherit;
  transform: translate(-50%, -50%) scale(0);
  animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
  opacity: 0.5;
}

@keyframes ping {
  75%,
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

.location-update-marker {
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.location-update-marker:hover {
  opacity: 1;
}

/* Enhanced Leaflet popup styling */
.leaflet-popup-content-wrapper {
  border-radius: 12px !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  overflow: hidden !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

.leaflet-popup-tip-container {
  margin-top: -1px !important;
}

.leaflet-popup-tip {
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.1) !important;
}

/* Custom popup classes */
.custom-popup .leaflet-popup-content-wrapper {
  background: white !important;
  color: #1f2937 !important;
  padding: 0 !important;
}

.current-location-popup .leaflet-popup-content-wrapper {
  border: 2px solid #ef4444 !important;
}

.location-update-popup .leaflet-popup-content-wrapper {
  border: 2px solid #6b7280 !important;
}

.leaflet-popup-content h3 {
  margin: 0 0 8px 0;
  color: #1e293b;
}

/* Override h3 color for white text headers */
.leaflet-popup-content .text-white {
  color: white !important;
}

.leaflet-popup-content p {
  margin: 4px 0;
  color: #64748b;
}

.leaflet-popup-content strong {
  color: #1e293b;
}

/* Custom scrollbar for location updates */
.max-h-64::-webkit-scrollbar {
  width: 6px;
}

.max-h-64::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.max-h-64::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.max-h-64::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Ensure map container has proper styling */
#shipment-map {
  z-index: 1;
  height: 500px !important;
  width: 100% !important;
  background-color: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: block !important;
  position: relative !important;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Leaflet map specific styles */
.leaflet-container {
  height: 500px !important;
  width: 100% !important;
  border-radius: 12px;
}

/* Hover effects for cards */
.bg-surface:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.3s ease-in-out;
}

/* Status badge styling */
.bg-success {
  background-color: #22c55e;
}

.bg-warning {
  background-color: #f59e0b;
}

.bg-danger {
  background-color: #ef4444;
}

/* Enhanced animations */
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Responsive text sizing */
@media (max-width: 640px) {
  .text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }

  .text-xl {
    font-size: 1.125rem;
    line-height: 1.75rem;
  }

  .custom-div-icon {
    transform: scale(0.8);
  }

  .custom-div-icon:hover {
    transform: scale(0.9);
  }
}

/* Smooth transitions for interactive elements */
.transition-colors {
  transition-property: color, background-color, border-color,
    text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* Loading state for map */
#shipment-map::before {
  content: "Loading map...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #64748b;
  font-size: 1rem;
  z-index: 1000;
}

/* Hide loading text once map is loaded */
#shipment-map.leaflet-container::before {
  display: none;
}

/* Enhanced breadcrumb styling for white text */
.text-white a {
  color: white !important;
  text-decoration: none;
}

.text-white a:hover {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Backdrop blur support */
.backdrop-blur-sm {
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Modern Pin marker styling */
.pin-marker {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pin-marker::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: rgba(14, 140, 191, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: pulse-ring 2.5s infinite;
  z-index: -1;
}

.pin-marker:hover::before {
  animation-play-state: paused;
  transform: translate(-50%, -50%) scale(1.4);
  background: rgba(14, 140, 191, 0.3);
}

@keyframes pulse-ring {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0.2;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0;
  }
}

.pin-marker img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.pin-marker:hover img {
  transform: scale(1.15);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.pin-marker:hover {
  z-index: 1000;
  transform: scale(1.05);
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
