/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Distributor Map Markers */
.distributor-marker {
  background: transparent;
  border: none;
}

.distributor-marker-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.distributor-marker-active .distributor-marker-dot {
  background-color: #22c55e;
}

.distributor-marker-inactive .distributor-marker-dot {
  background-color: #9ca3af;
}

/* Leaflet Popup Styling */
.leaflet-popup-content-wrapper {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
  padding: 0 !important;
  border: 1px solid #e5e7eb !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  font-family: inherit;
  background: #ffffff !important;
}

.leaflet-popup-tip-container {
  overflow: visible;
}

.leaflet-popup-tip {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: none !important;
}

.leaflet-popup-close-button {
  top: 8px !important;
  right: 8px !important;
  color: #6b7280 !important;
  font-size: 18px !important;
  width: 24px !important;
  height: 24px !important;
}

.leaflet-popup-close-button:hover {
  color: #111827 !important;
}

/* Popup content styles */
.leaflet-popup-content .popup-content {
  padding: 16px;
  min-width: 200px;
  background: #ffffff;
}

.popup-content {
  padding: 16px;
  min-width: 200px;
  background: #ffffff !important;
}

.leaflet-popup-content .popup-title {
  font-weight: 600;
  font-size: 14px;
  color: #111827;
  margin-bottom: 8px;
}

.leaflet-popup-content .popup-badge {
  display: inline-flex;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 9999px;
  margin-bottom: 12px;
}

.leaflet-popup-content .popup-badge-active {
  background-color: #dcfce7;
  color: #166534;
}

.leaflet-popup-content .popup-badge-inactive {
  background-color: #f3f4f6;
  color: #374151;
}

.leaflet-popup-content .popup-link {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: #2563eb;
  text-decoration: none;
}

.leaflet-popup-content .popup-link:hover {
  color: #1d4ed8;
}

/* ==========================================================================
   Workflow Editor - Grid Snap Styles
   ========================================================================== */

/* Grid overlay background pattern */
.workflow-grid-overlay {
  pointer-events: none;
  opacity: 0.6;
}

.dark .workflow-grid-overlay {
  opacity: 0.4;
}

/* Grid dot styling */
.grid-dot {
  transition: fill 0.2s ease;
}

/* Workflow canvas container */
.workflow-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 600px;
  overflow: hidden;
  background-color: #fafafa;
}

.dark .workflow-canvas {
  background-color: #1f2937;
}

/* SVG transitions layer */
.workflow-canvas svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.workflow-canvas svg path,
.workflow-canvas svg circle,
.workflow-canvas svg line {
  pointer-events: auto;
}

/* Grid snap indicator - shown when snapping is active */
.workflow-snap-indicator {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 12px;
  color: #6b7280;
  pointer-events: auto;
  user-select: none;
}

.dark .workflow-snap-indicator {
  background-color: rgba(31, 41, 55, 0.9);
  border-color: #374151;
  color: #9ca3af;
}

.workflow-snap-indicator-icon {
  width: 16px;
  height: 16px;
}

.workflow-snap-indicator.snap-disabled {
  opacity: 0.5;
}

/* Grid toggle button */
.workflow-grid-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background-color: #ffffff;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dark .workflow-grid-toggle {
  background-color: #374151;
  border-color: #4b5563;
  color: #9ca3af;
}

.workflow-grid-toggle:hover {
  background-color: #f3f4f6;
  color: #111827;
}

.dark .workflow-grid-toggle:hover {
  background-color: #4b5563;
  color: #f9fafb;
}

.workflow-grid-toggle.active {
  background-color: #dbeafe;
  border-color: #3b82f6;
  color: #2563eb;
}

.dark .workflow-grid-toggle.active {
  background-color: #1e3a5f;
  border-color: #3b82f6;
  color: #60a5fa;
}
