/* ============================================================
   TRAVEL LOG — Journey Tracker
   WhoDASH / Belmont Labs — BL-002
   ============================================================ */

/* ============================================================
   CONTAINER & LAYOUT
   ============================================================ */

.travel-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* ============================================================
   TAB NAVIGATION
   ============================================================ */

.travel-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #e6eefb;
  padding-bottom: 0;
}

.travel-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #6e7f9b;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -2px;
}

.travel-tab:hover {
  color: #2456a5;
  background: #f7fafc;
}

.travel-tab.active {
  color: #2456a5;
  border-bottom-color: #3182ce;
  background: #eef4ff;
}

/* ============================================================
   TAB CONTENT
   ============================================================ */

.travel-tab-content {
  display: none;
}

.travel-tab-content.active {
  display: block;
}

.travel-content-wrapper {
  margin-top: 24px;
}

/* ============================================================
   JOURNAL TAB — OVERVIEW STATS
   ============================================================ */

.travel-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.travel-stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.travel-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 60, 114, 0.12);
}

.stat-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #2456a5;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.9rem;
  color: #6e7f9b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-sublabel {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 4px;
}

/* ============================================================
   FAVORITE ZONE CARD
   ============================================================ */

.favorite-zone-card {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 2px solid #fbbf24;
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
  margin-bottom: 24px;
}

.favorite-zone-card h3 {
  margin: 0 0 16px 0;
  font-size: 1.5rem;
  color: #92400e;
}

.favorite-zone-name {
  font-size: 2rem;
  font-weight: 700;
  color: #78350f;
  margin-bottom: 12px;
}

.favorite-zone-stats {
  font-size: 1rem;
  color: #92400e;
  font-weight: 600;
}

/* ============================================================
   ZONE TIMELINE GRAPH
   ============================================================ */

.zone-timeline-card {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
  margin-bottom: 24px;
}

.zone-timeline-card h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.zone-timeline-canvas {
  width: 100%;
  height: auto;
  max-width: 1000px;
  display: block;
}

/* ============================================================
   LOG TAB — SEARCHABLE TABLE
   ============================================================ */

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.log-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

.log-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.zone-search-input,
.date-input {
  padding: 8px 12px;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #374151;
  background: #fff;
  transition: border-color 0.2s;
}

.zone-search-input {
  min-width: 200px;
}

.date-input {
  min-width: 140px;
}

.zone-search-input:focus,
.date-input:focus {
  outline: none;
  border-color: #2456a5;
  box-shadow: 0 0 0 3px rgba(36, 86, 165, 0.1);
}

.clear-filters-btn {
  padding: 8px 16px;
  background: #f0f4f8;
  border: 1px solid #d7e3fb;
  border-radius: 6px;
  color: #2456a5;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.clear-filters-btn:hover {
  background: #e6eefb;
  border-color: #2456a5;
}

.log-table-container {
  max-height: 600px;
  overflow-y: auto;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  margin-bottom: 12px;
}

.pagination-info {
  text-align: right;
  font-size: 0.9rem;
  color: #6e7f9b;
  font-weight: 600;
}

.travel-log-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.travel-log-table thead {
  background: linear-gradient(135deg, #2456a5 0%, #1e4a8f 100%);
  color: #fff;
}

.travel-log-table th {
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.travel-log-table tbody tr {
  border-bottom: 1px solid #e6eefb;
  transition: background 0.15s;
}

.travel-log-table tbody tr:hover {
  background: #f7fafc;
}

.travel-log-table tbody tr:last-child {
  border-bottom: none;
}

.travel-log-table td {
  padding: 12px 16px;
  color: #374151;
}

.travel-log-table td.muted {
  color: #9ca3af;
  font-size: 0.9rem;
}

/* ============================================================
   LOAD MORE BAR
   ============================================================ */

.log-load-more-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.log-load-label {
  font-size: 0.85rem;
  color: #6e7f9b;
  font-weight: 500;
  white-space: nowrap;
}

.log-load-loading {
  color: #d4af37;
  font-style: italic;
}

.log-load-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.log-load-btn {
  padding: 5px 14px;
  border-radius: 6px;
  border: 1px solid rgba(100, 149, 237, 0.4);
  background: rgba(100, 149, 237, 0.12);
  color: #a8c0e8;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.log-load-btn:hover {
  background: rgba(100, 149, 237, 0.25);
  border-color: rgba(100, 149, 237, 0.7);
  color: #fff;
}

/* Yolo button — red warning styling */
.log-load-btn--yolo {
  border-color: rgba(220, 60, 60, 0.5);
  background: rgba(220, 60, 60, 0.12);
  color: #e88080;
}

.log-load-btn--yolo:hover {
  background: rgba(220, 60, 60, 0.28);
  border-color: rgba(220, 60, 60, 0.85);
  color: #fff;
  box-shadow: 0 0 10px rgba(220, 60, 60, 0.3);
}

/* ============================================================
   HEATMAP TAB
   ============================================================ */

.heatmap-section,
.transitions-section,
.subzone-section {
  background: #fff;
  border: 1px solid #e6eefb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(30, 60, 114, 0.06);
}

.heatmap-section h3,
.transitions-section h3,
.subzone-section h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: #2456a5;
  font-weight: 700;
}

/* Heatmap Bars */
.heatmap-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.heatmap-bar-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.heatmap-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.zone-name {
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
}

.zone-percentage {
  font-weight: 700;
  color: #2456a5;
  font-size: 0.9rem;
}

.heatmap-bar-track {
  height: 24px;
  background: #e6eefb;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.heatmap-bar-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 0.5s ease-out;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.heatmap-stats {
  font-size: 0.85rem;
  color: #6e7f9b;
}

/* ============================================================
   ZONE TRANSITIONS
   ============================================================ */

.transitions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.transition-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f7fafc;
  border-radius: 8px;
  border: 1px solid #e6eefb;
}

.transition-route {
  display: flex;
  align-items: center;
  gap: 12px;
}

.from-zone,
.to-zone {
  font-weight: 600;
  color: #374151;
}

.transition-arrow {
  color: #2456a5;
  font-size: 1.2rem;
}

.transition-count {
  font-weight: 600;
  color: #2456a5;
  font-size: 0.9rem;
  background: #eef4ff;
  padding: 4px 12px;
  border-radius: 12px;
}

/* ============================================================
   SUBZONE TABLE
   ============================================================ */

.subzone-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.subzone-table thead {
  background: #f7fafc;
  border-bottom: 2px solid #e6eefb;
}

.subzone-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6e7f9b;
}

.subzone-table tbody tr {
  border-bottom: 1px solid #f0f4f8;
}

.subzone-table tbody tr:hover {
  background: #f7fafc;
}

.subzone-table td {
  padding: 10px 16px;
  color: #374151;
  font-size: 0.95rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .travel-stats-grid {
    grid-template-columns: 1fr;
  }

  .travel-tabs {
    flex-wrap: wrap;
  }

  .travel-tab {
    flex: 1;
    min-width: 100px;
  }
}
