/* Hop'N Drive — App Styles */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Urbanist:wght@400;500;600;700&display=swap');
.font-montserrat { font-family: 'Montserrat', sans-serif; }
.font-urbanist { font-family: 'Urbanist', sans-serif; }
body { font-family: 'Urbanist', sans-serif; }
h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; }
.safe-bottom { padding-bottom: env(safe-area-inset-bottom,0px); }
@keyframes slide-up { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.animate-slide-up { animation: slide-up 0.25s ease-out; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.animate-fade-in { animation: fade-in 0.2s ease-out; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.3); border-radius: 4px; }
* { -webkit-tap-highlight-color: transparent; }
html, body { overflow-x: hidden; }
input:-webkit-autofill { -webkit-box-shadow: 0 0 0 30px #1e293b inset !important; -webkit-text-fill-color: #e2e8f0 !important; }
.glass-card { background: rgba(30,41,59,0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(148,163,184,0.1); }
.no-select { -webkit-user-select: none; user-select: none; }
.btn-press:active { transform: scale(0.96); }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.overflow-hidden { overflow: hidden !important; }
.z-modal { overscroll-behavior: contain; }
.z-modal .overflow-y-auto { overscroll-behavior: contain; }

/* ── Status Icons & Tooltips ── */
.status-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.status-icon svg { width: 24px; height: 24px; }
.status-icon.tooltip {
  position: relative;
}
.status-icon.tooltip:hover::after,
.status-icon.tooltip:focus::after,
.status-icon.tooltip:active::after,
.status-icon.tooltip.touch-active::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  background: #1e293b;
  color: #f1f5f9;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  z-index: 1200;
  margin-bottom: 4px;
}
.status-icon.tooltip:hover::before,
.status-icon.tooltip:focus::before,
.status-icon.tooltip:active::before,
.status-icon.tooltip.touch-active::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1e293b;
  z-index: 1200;
  margin-bottom: -1px;
}
@media (hover: none) and (pointer: coarse) {
  .status-icon.tooltip:hover::after,
  .status-icon.tooltip:hover::before {
    display: none;
  }
  .status-icon.tooltip.touch-active::after,
  .status-icon.tooltip.touch-active::before {
    display: block;
  }
}
.status-badge-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* ── Inline Chat Widget ── */
.chat-msgs { scrollbar-width: thin; }
.chat-msgs::-webkit-scrollbar { width: 3px; }

/* ── Z-index layers ── */
.z-navbar { z-index: 1000 !important; }
.z-modal { z-index: 1050 !important; }
.z-toast { z-index: 1100 !important; }
.z-notif { z-index: 1200 !important; }
.z-tooltip { z-index: 1200 !important; }

/* ── Slide-to-Confirm (Uber style) ── */
.slide-container {
  position: relative;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.slide-track {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 48px;
  padding-right: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: background 0.3s;
  pointer-events: none;
  text-align: center;
}
.slide-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.slide-thumb:active {
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.slide-thumb svg {
  width: 20px;
  height: 20px;
  color: #1e293b !important;
  transition: color 0.3s, transform 0.2s;
}
.slide-container.slide-done .slide-thumb svg {
  color: #0f172a !important;
  transform: scale(1.15);
}
.slide-container.slide-done { cursor: default; }
.slide-container.slide-done .slide-thumb { pointer-events: none; }
.slide-arrow { width: 20px; height: 20px; }

/* ── Leaflet map z-index fix ── */
.leaflet-container { z-index: 1 !important; }
.leaflet-pane { z-index: 1 !important; }
.leaflet-marker-pane { z-index: 2 !important; }
.leaflet-popup-pane { z-index: 3 !important; }

/* ── Drag & Drop (stop rows) ── */
.stop-row { transition: background 0.15s, transform 0.1s; }
.stop-row.drag-over { background: rgba(59,130,246,0.15); }
.stop-row.drop-target { 
  background: rgba(34,197,83,0.2); 
  border-color: #22c55e; 
  transform: translateX(4px); 
}
.stop-row.dragging { opacity: 0.5; }
.drag-handle { cursor: grab; pointer-events: all; }
.drag-handle:active { cursor: grabbing; }

/* ── Checklist Manager ── */
.checklist-manager-container { margin-top: 12px; }
.checklist-block {
  background: #0f172a;
  border: 1px solid rgba(51,65,85,0.6);
  border-radius: 16px;
  padding: 16px;
}
.checklist-title {
  font-size: 14px;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.checklist-items { display: flex; flex-direction: column; gap: 10px; }
.checklist-item {
  background: rgba(30,41,59,0.55);
  border: 1px solid rgba(51,65,85,0.5);
  border-radius: 12px;
  padding: 12px;
  transition: border-color 0.2s, background 0.2s;
}
.checklist-item.is-ok { border-color: rgba(34,197,94,0.6); background: rgba(22,101,52,0.12); }
.checklist-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.checklist-item-head label { font-size: 13px; font-weight: 600; color: #e2e8f0; }
.checklist-status { font-size: 11px; font-weight: 700; color: #22c55e; white-space: nowrap; }
.checklist-foto-area { display: flex; flex-direction: column; gap: 8px; }
.checklist-foto-btn {
  background: #1d4ed8;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.checklist-foto-btn:hover { background: #2563eb; }
.checklist-camera-holder { display: none; }
.checklist-camera-holder:not(.hidden) { display: block; }
.checklist-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.checklist-photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #334155;
}
.checklist-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.checklist-photo-thumb button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(239,68,68,0.9);
  color: #fff;
  border: none;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
}
.checklist-numero, .checklist-textarea {
  width: 100%;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  color: #e2e8f0;
  padding: 10px 12px;
  font-size: 13px;
  font-family: 'Urbanist', sans-serif;
}
.checklist-numero:focus, .checklist-textarea:focus { outline: none; border-color: #3b82f6; }
.checklist-slider { display: flex; align-items: center; gap: 10px; }
.checklist-range { flex: 1; accent-color: #3b82f6; }
.checklist-slider-val { font-size: 13px; font-weight: 700; color: #60a5fa; min-width: 44px; text-align: right; }
.checklist-mark-ok {
  margin-top: 8px;
  background: rgba(34,197,94,0.15);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.5);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.checklist-valid { margin-top: 12px; font-size: 12px; color: #fbbf24; }
.checklist-submit-btn {
  margin-top: 14px;
  width: 100%;
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}
.checklist-submit-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.checklist-empty { padding: 20px; text-align: center; color: #94a3b8; font-size: 13px; }

/* ── Status Timeline ── */
@keyframes timeline-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.7); }
  50% { box-shadow: 0 0 0 4px rgba(59,130,246,0); }
}
.status-timeline .animate-pulse {
  animation: timeline-pulse 1.5s ease-in-out infinite;
}

.status-timeline-wrapper .timeline-summary {
  display: flex;
  align-items: center;
}
.status-timeline-wrapper .timeline-chevron {
  transition: transform 0.2s ease;
}
.status-timeline-wrapper .timeline-chevron.rotated {
  transform: rotate(180deg);
}
.status-timeline-wrapper .status-timeline-vertical {
  transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.3s ease;
  overflow: hidden;
}
.status-timeline-wrapper .status-timeline-vertical:not(.hidden) {
  padding-top: 8px;
  padding-bottom: 4px;
}

/* ── Language Selector Mobile ── */
@media (max-width: 639px) {
  .ls-menu { min-width: 110px !important; }
  .ls-menu a { padding: 8px 12px !important; font-size: 10px !important; }
}

