/**
 * maksimir-routes.css v1.0
 * Timeline UX za pješačke rute
 */

/* ═══════════════════════════════════════════════════════════════════
   LISTA RUTA - KARTICE
   ═══════════════════════════════════════════════════════════════════ */

.route-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: all 0.2s ease;
}

.route-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.route-card:active {
  transform: scale(0.98);
}

.route-card-emoji {
  font-size: 32px;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 12px;
  flex-shrink: 0;
}

.route-card-info {
  flex: 1;
  min-width: 0;
}

.route-card-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.route-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 6px;
}

.route-card-desc {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.4;
}

.route-card-dist {
  font-size: 13px;
  color: #0d9488;
  font-weight: 600;
  margin-top: 6px;
}

.route-card-arrow {
  font-size: 24px;
  color: #cbd5e1;
  flex-shrink: 0;
}

.route-diff {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.route-diff-lagano {
  background: #dcfce7;
  color: #166534;
}

.route-diff-umjereno {
  background: #fef3c7;
  color: #92400e;
}

/* ═══════════════════════════════════════════════════════════════════
   ROUTE PANEL - AKTIVNA RUTA
   ═══════════════════════════════════════════════════════════════════ */

.route-panel {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Header */
.route-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  color: #fff;
}

.route-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.route-header-emoji {
  font-size: 24px;
}

.route-header-title {
  font-size: 16px;
  font-weight: 600;
}

.route-header-close {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.route-header-close:hover {
  background: rgba(255,255,255,0.3);
}

/* Stats */
.route-stats {
  display: flex;
  justify-content: space-around;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.route-stat {
  font-size: 13px;
  color: #64748b;
}

.route-stat i {
  margin-right: 4px;
  color: #94a3b8;
}

/* Progress */
.route-progress {
  height: 24px;
  background: #e2e8f0;
  position: relative;
  display: flex;
  align-items: center;
}

.route-progress-bar {
  height: 100%;
  transition: width 0.5s ease;
}

.route-progress-text {
  position: absolute;
  right: 10px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

/* ═══════════════════════════════════════════════════════════════════
   TIMELINE
   ═══════════════════════════════════════════════════════════════════ */

.route-timeline {
  padding: 16px;
  max-height: 50vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 8px;
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
}

.timeline-item:hover {
  background: #f8fafc;
}

.timeline-item:last-child .timeline-line {
  display: none;
}

/* Vertikalna linija */
.timeline-line {
  position: absolute;
  left: 28px;
  top: 44px;
  width: 3px;
  height: calc(100% - 20px);
  background: #e2e8f0;
  border-radius: 2px;
}

/* Dot / krug */
.timeline-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  flex-shrink: 0;
  z-index: 1;
  transition: all 0.3s ease;
}

.timeline-item.visited .timeline-dot {
  color: #fff;
}

.timeline-item.current .timeline-dot {
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.2);
}

/* Sadržaj */
.timeline-content {
  flex: 1;
  min-width: 0;
}

.timeline-title {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
}

.timeline-item.visited .timeline-title {
  color: #94a3b8;
  text-decoration: line-through;
}

.timeline-year {
  font-size: 12px;
  color: #0d9488;
  margin-top: 2px;
}

/* Udaljenost */
.timeline-dist {
  font-size: 14px;
  font-weight: 600;
  color: #0d9488;
  flex-shrink: 0;
  min-width: 60px;
  text-align: right;
}

.timeline-item.visited .timeline-dist {
  color: #22c55e;
}

/* ═══════════════════════════════════════════════════════════════════
   ACTION BUTTONS
   ═══════════════════════════════════════════════════════════════════ */

.route-actions {
  display: flex;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid #f1f5f9;
}

.route-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.route-btn-secondary {
  background: #f1f5f9;
  color: #475569;
}

.route-btn-secondary:hover {
  background: #e2e8f0;
}

.route-btn-danger {
  background: #fee2e2;
  color: #dc2626;
}

.route-btn-danger:hover {
  background: #fecaca;
}

/* ═══════════════════════════════════════════════════════════════════
   TOAST
   ═══════════════════════════════════════════════════════════════════ */

.route-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e293b;
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
}

.route-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════
   COMPLETED MODAL
   ═══════════════════════════════════════════════════════════════════ */

.route-completed-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.route-completed-modal {
  background: #fff;
  border-radius: 24px;
  padding: 32px;
  max-width: 320px;
  width: 100%;
  text-align: center;
  animation: modalSlideUp 0.4s ease;
}

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

.route-completed-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.route-completed-modal h3 {
  font-size: 24px;
  margin: 0 0 8px;
  color: #1e293b;
}

.route-completed-modal p {
  color: #64748b;
  margin: 0 0 8px;
}

.route-completed-modal h4 {
  font-size: 18px;
  margin: 0 0 20px;
  color: #1e293b;
}

.route-completed-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 24px;
}

.route-completed-stats div {
  text-align: center;
}

.route-completed-stats strong {
  display: block;
  font-size: 28px;
  color: #0d9488;
}

.route-completed-modal button {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.route-completed-modal button:hover {
  transform: scale(1.02);
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 400px) {
  .route-card {
    padding: 12px;
  }
  
  .route-card-emoji {
    width: 48px;
    height: 48px;
    font-size: 28px;
  }
  
  .timeline-item {
    gap: 10px;
  }
  
  .timeline-dot {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
}
