/* Crumbcast Map Styles — standalone, no SCSS compilation needed */

/* Watermark — inline with the Mapbox logo at bottom-left */
.mapboxgl-ctrl-bottom-left {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
}
.crumbcast-map-watermark {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.3px;
  color: rgba(0, 0, 0, 0.35);
  padding: 0 0 6px 11px;
  margin-left: -2px;
  pointer-events: none;
  white-space: nowrap;
}

/* Event page header now uses shared activity-page__* classes from crumbcast-activity.css */

/* ---- Sidebar Tabs ---- */

.sidebar-tabs {
  display: flex;
  border-bottom: 2px solid var(--stone, #e8e3db);
  background: white;
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 -24px;
  padding: 0 24px;
}
.sidebar-tab {
  flex: 1;
  padding: 14px 8px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--mist, #9ca8a3);
  cursor: pointer;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.3s;
  background: none;
}
.sidebar-tab.active {
  color: var(--ink, #1a1a18);
  border-bottom-color: var(--rust, #c4613a);
}
.sidebar-tab:hover:not(.active) {
  color: var(--ink, #1a1a18);
}
.sidebar-tab__count {
  display: inline-block;
  background: var(--stone, #e8e3db);
  color: var(--mist, #9ca8a3);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: 4px;
  font-weight: 600;
}
.sidebar-tab.active .sidebar-tab__count {
  background: var(--rust, #c4613a);
  color: white;
}
.sidebar-panel { display: none; }
.sidebar-panel.active { display: block; }
.sidebar-tab--map { display: none; }

.sidebar-info-content {
  padding: 16px 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink, #1a1a18);
}
.sidebar-info__title {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink, #1a1a18);
  margin: 0 0 6px;
}
.sidebar-info__dates {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--mist, #7a7a72);
  margin-bottom: 20px;
}
.sidebar-info__body {
  padding-top: 16px;
  border-top: 1px solid var(--dust, #c4bfb6);
}
.sidebar-info__body p { margin-bottom: 12px; }
.sidebar-info__body img { max-width: 100%; height: auto; border-radius: 4px; }

/* ---- Event Comments (inside Info tab) ---- */

.event-comments {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--dust, #c4bfb6);
}
.event-comments .comments-title {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink, #1a1a18);
  margin-bottom: 12px;
}
.event-comments .comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.event-comments .comment-list .comment {
  padding: 14px 0;
  border-bottom: 1px solid var(--stone, #e8e3db);
}
.event-comments .comment-list .comment:last-child {
  border-bottom: none;
}
.event-comments .comment-list .children {
  list-style: none;
  padding-left: 20px;
  margin: 0;
}
.event-comments .comment-author {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink, #1a1a18);
}
.event-comments .comment-author img {
  border-radius: 50%;
  margin-right: 8px;
  width: 28px;
  height: 28px;
}
.event-comments .comment-meta {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  color: var(--mist, #7a7a72);
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}
.event-comments .comment-meta a {
  color: var(--mist, #7a7a72);
  text-decoration: none;
}
.event-comments .comment-meta a:hover {
  color: var(--rust, #c4613a);
}
.event-comments .comment-content {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink, #1a1a18);
}
.event-comments .comment-content p:last-child {
  margin-bottom: 0;
}
.event-comments .reply a {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--rust, #c4613a);
  text-decoration: none;
  margin-top: 6px;
  display: inline-block;
}
.event-comments .reply a:hover {
  color: var(--rust-light, #e0825a);
}

/* Comment confirmation */
.event-comments .comment-confirmation {
  background: var(--stone, #e8e3db);
  border-left: 3px solid var(--sage, #6b7c5e);
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 0 3px 3px 0;
}
.event-comments .comment-confirmation p {
  margin: 0;
  font-size: 13px;
  color: var(--ink, #1a1a18);
}

/* Comment form */
.event-comments #respond {
  margin-top: 20px;
}
.event-comments #respond .comment-reply-title {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink, #1a1a18);
  margin-bottom: 12px;
}
.event-comments #respond .comment-reply-title small a {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--mist, #7a7a72);
  text-decoration: none;
  margin-left: 8px;
}
.event-comments #respond .form-control {
  border: 1px solid var(--dust, #c4bfb6);
  border-radius: 3px;
  font-size: 13px;
  padding: 8px 12px;
  background: var(--chalk, #f5f2ed);
  color: var(--ink, #1a1a18);
  transition: border-color 0.2s;
}
.event-comments #respond .form-control:focus {
  border-color: var(--rust, #c4613a);
  box-shadow: 0 0 0 2px rgba(196,97,58,0.15);
  outline: none;
}
.event-comments #respond #commentsubmit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ink, #1a1a18);
  color: var(--chalk, #f5f2ed);
  border: none;
  padding: 8px 20px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s;
}
.event-comments #respond #commentsubmit:hover {
  background: #2a2a26;
}
.event-comments .no-comments {
  font-size: 13px;
  color: var(--mist, #7a7a72);
  background: var(--stone, #e8e3db);
  border: none;
  border-radius: 3px;
  padding: 10px 14px;
}

/* ---- Layout ---- */

body.single-events #page {
  height: 100dvh;
  overflow: hidden;
}
body.single-events .cc-footer {
  display: none;
}

.crumbcast-map-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.crumbcast-map-panel {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
}

.crumbcast-map-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
}

#crumbcast-map {
  width: 100%;
  height: 100%;
}

.crumbcast-sidebar {
  width: 440px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: white;
  border-left: 1px solid var(--dust, rgba(212,206,196,0.5));
}
.no-activities .crumbcast-sidebar {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  border-left: none;
}

.crumbcast-sidebar-header {
  padding: 0 24px;
  flex-shrink: 0;
}

.crumbcast-sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px 24px;
}

/* ---- Section label ---- */

.crumbcast-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--mist, #9ca8a3);
  margin-bottom: 16px;
  padding-left: 4px;
}

/* ---- Elevation chart ---- */

.crumbcast-elevation-chart {
  background: rgba(107,124,94,0.06);
  padding: 12px 16px;
  flex-shrink: 0;
}

.crumbcast-elevation-chart-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--mist, #9ca8a3);
  margin-bottom: 8px;
}

.crumbcast-elevation-chart svg {
  display: block;
  width: 100%;
}

/* Continuous elevation profile (single-activity events) */
.crumbcast-elevation-chart--profile {
  height: 120px;
  padding: 0;
  background: var(--stone, #e8e3db);
  cursor: crosshair;
}
.crumbcast-elevation-chart--profile canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---- Video section ---- */

.crumbcast-video-section { margin: 16px 0 8px; border-radius: 8px; overflow: hidden; background: rgba(27, 28, 22, 0.06); }

.crumbcast-video-fs-wrap:fullscreen {
  display: flex; align-items: center; justify-content: center; background: #000;
}
.crumbcast-video-fs-wrap:fullscreen .ratio {
  width: min(100vw, 177.78vh);
  height: min(100vh, 56.25vw);
  padding: 0; position: relative; margin: auto;
}
.crumbcast-video-fs-wrap:fullscreen .ratio iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}

/* Thumbnail strip */
.crumbcast-video-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--dust, #c4bfb6) transparent;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.crumbcast-video-thumbs::-webkit-scrollbar {
  height: 4px;
}
.crumbcast-video-thumbs::-webkit-scrollbar-thumb {
  background: var(--dust, #c4bfb6);
  border-radius: 2px;
}

.crumbcast-video-thumb {
  flex-shrink: 0;
  width: 140px;
  border: none;
  padding: 0;
  background: #111311;
  cursor: pointer;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
}

.crumbcast-video-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 4px;
  transition: opacity 0.2s;
}

.crumbcast-video-thumb__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background: var(--rust, #c4613a);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.crumbcast-video-thumb__play::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 52%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent white;
}
@media (hover: hover) {
  .crumbcast-video-thumb:hover img { opacity: 0.85; }
  .crumbcast-video-thumb:hover .crumbcast-video-thumb__play { opacity: 1; }
}
.crumbcast-video-thumb.is-active img { opacity: 0.5; }
.crumbcast-video-thumb.is-active .crumbcast-video-thumb__play { opacity: 0; }
.crumbcast-video-thumb.is-active:hover .crumbcast-video-thumb__play { opacity: 0; }

.crumbcast-video-thumb__label {
  position: absolute;
  top: 6px;
  left: 6px;
  display: inline-block;
  padding: 4px 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: white;
  background: var(--rust, #c4613a);
  border-radius: 2px;
}
.crumbcast-video-thumb__label:empty { display: none; }

/* ---- Activity timeline items ---- */

a.activity {
  text-decoration: none;
  color: inherit;
}
.activity {
  display: flex;
  align-items: flex-start;
  padding: 14px 0;
  gap: 14px;
  border-bottom: 1px solid var(--stone, #e8e3db);
  cursor: pointer;
  transition: background 0.2s;
  margin: 0 -24px;
  padding-left: 24px;
  padding-right: 24px;
}
.activity:last-child { border-bottom: none; }
.activity:hover,
.activity.is-active {
  background: rgba(107,124,94,0.14);
}

.activity__day {
  min-width: 44px;
  text-align: center;
  padding-top: 2px;
}
.activity__day-num {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink, #1a1a18);
  line-height: 1;
}
.activity__day-label {
  font-size: 9px;
  color: var(--mist, #9ca8a3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.activity__divider {
  width: 2px;
  align-self: stretch;
  background: var(--stone, #e8e3db);
  border-radius: 1px;
  position: relative;
  min-height: 40px;
}
.activity__divider::before {
  content: '';
  position: absolute;
  top: 6px;
  left: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sage, #6b7c5e);
}

.activity__content { flex: 1; min-width: 0; }
.activity__name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink, #1a1a18);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  display: block;
}
.activity:hover .activity__name,
.activity.is-active .activity__name {
  color: var(--sage, #6b7c5e);
  text-decoration: none;
}
.activity__stats {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--mist, #9ca8a3);
}
.activity__stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.activity__detail-link {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 12px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--mist, #7a7a72);
  text-decoration: none;
  border: 1px solid var(--dust, #d4cec4);
  border-radius: 3px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.activity__detail-link:hover {
  color: var(--rust, #c4613a);
  border-color: var(--rust, #c4613a);
  background: rgba(196, 97, 58, 0.06);
}
.activity.is-active .activity__detail-link {
  color: var(--sage, #6b7c5e);
  border-color: var(--sage, #6b7c5e);
}
.activity.is-active .activity__detail-link:hover {
  color: var(--rust, #c4613a);
  border-color: var(--rust, #c4613a);
  background: rgba(196, 97, 58, 0.06);
}

/* ---- Day markers on map ---- */

.crumbcast-day-marker {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--chalk, #f5f2ed);
  border: 2px solid var(--sage, #6b7c5e);
  color: var(--sage, #6b7c5e);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.crumbcast-day-marker:hover,
.crumbcast-day-marker.is-active {
  background: var(--sage, #6b7c5e);
  color: #fff;
  transform: scale(1.2);
}


/* ---- Responsive ---- */

@media (max-width: 992px) {
  .crumbcast-map-layout {
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  .crumbcast-sidebar {
    display: contents;
  }

  .crumbcast-sidebar-header {
    order: 1;
    padding: 0 16px;
    flex-shrink: 0;
  }

  .sidebar-tabs {
    margin: 0 -16px;
    padding: 0 16px;
  }

  .crumbcast-map-panel {
    order: 2;
    flex: 1.618;
    min-height: 0;
    width: 100%;
  }

  .crumbcast-map-panel.is-hidden-mobile {
    display: none;
  }

  .crumbcast-map-wrap {
    flex: 1;
    min-height: 0;
  }

  #crumbcast-map {
    height: 100%;
    min-height: 160px;
  }

  .crumbcast-elevation-chart {
    display: none !important;
  }
  .crumbcast-elevation-chart.is-visible-mobile {
    display: block !important;
  }

  .crumbcast-sidebar-scroll {
    order: 3;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 16px 24px;
  }

  .crumbcast-map-layout {
    position: relative;
  }

  /* Video section — smaller margin + compact thumbs */
  .crumbcast-video-section {
    margin: 8px 0 4px;
  }
  .crumbcast-video-thumb {
    width: 143px;
  }

  /* Activity timeline — compact */
  .activity {
    padding: 10px 0;
    gap: 10px;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .activity__day {
    min-width: 36px;
  }

  .activity__day-num {
    font-size: 15px;
  }

  .activity__name {
    font-size: 13px;
  }

  /* Single-activity events: Map tab visible on mobile only */
  .single-events .sidebar-tab--map {
    display: inline-block;
  }

  /* Single-activity events: immersive map on mobile */
  .is-single-activity .crumbcast-map-panel {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
  .is-single-activity .crumbcast-map-wrap {
    flex: 1;
    min-height: 0;
  }
  .is-single-activity #crumbcast-map {
    height: 100%;
  }
  .is-single-activity .crumbcast-map-panel .mapboxgl-map {
    height: 100% !important;
  }
  /* is-visible-mobile rule is above, near base .crumbcast-elevation-chart */
  .crumbcast-elevation-chart--profile {
    height: 80px;
  }
  .is-single-activity .crumbcast-sidebar-scroll {
    flex: 0;
    overflow: hidden;
    padding: 0 16px;
    min-height: 0;
  }
  .is-single-activity .crumbcast-sidebar-scroll.has-visible-panel {
    flex: 1;
    overflow-y: auto;
    padding: 8px 16px 24px;
  }

  /* Summary strip for single-activity events */
  .single-events .activity-page__summary-strip {
    display: grid;
  }
}

/* ---- Map Modal Info Panel ---- */

.map-info-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  opacity: 0.6;
}
.map-info-empty__title {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--ink, #1a1a18);
  margin: 16px 0 6px;
}
.map-info-empty__hint {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--mist, #7a7a72);
  margin: 0;
}

.map-info-content {
  flex: 1;
  overflow-y: auto;
  animation: mapInfoFadeIn 0.3s ease-out;
}

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

.map-info__thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.map-info__accent {
  width: 40px;
  height: 3px;
  border-radius: 2px;
  margin: 16px 20px 0;
}

.map-info__header {
  padding: 12px 20px 0;
}

.map-info__title {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink, #1a1a18);
  margin: 0 0 4px;
}

.map-info__dates {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 12px;
  letter-spacing: 0.5px;
  color: var(--mist, #7a7a72);
  margin: 0;
}

.map-info__categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 20px 0;
}
.map-info__category {
  display: inline-block;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: white;
  border-radius: 2px;
}

.map-info__stats {
  display: flex;
  gap: 0;
  margin: 16px 20px 0;
  padding: 12px 0;
  border-top: 1px solid var(--stone, #e8e3db);
  border-bottom: 1px solid var(--stone, #e8e3db);
}
.map-info__stat {
  flex: 1;
  text-align: center;
}
.map-info__stat-value {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink, #1a1a18);
  display: block;
  line-height: 1;
}
.map-info__stat-label {
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--mist, #7a7a72);
  margin-top: 4px;
  display: block;
}

.map-info__activities-label {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--mist, #7a7a72);
  padding: 14px 20px 0;
  margin: 0;
}

.map-info__activity {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  color: inherit;
}
.map-info__activity:hover {
  background: rgba(107, 124, 94, 0.1);
  text-decoration: none;
  color: inherit;
}
.map-info__activity-day {
  min-width: 32px;
  text-align: center;
  padding-top: 1px;
}
.map-info__activity-day-num {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink, #1a1a18);
  line-height: 1;
}
.map-info__activity-day-label {
  font-size: 8px;
  color: var(--mist, #7a7a72);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 1px;
}
.map-info__activity-divider {
  width: 2px;
  align-self: stretch;
  background: var(--stone, #e8e3db);
  border-radius: 1px;
  position: relative;
  min-height: 32px;
}
.map-info__activity-divider::before {
  content: '';
  position: absolute;
  top: 5px;
  left: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot-color, var(--sage, #6b7c5e));
}
.map-info__activity-body {
  flex: 1;
  min-width: 0;
}
.map-info__activity-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink, #1a1a18);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.map-info__activity:hover .map-info__activity-name {
  color: var(--sage, #6b7c5e);
}
.map-info__activity-stats {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--mist, #7a7a72);
}

.map-info__cta {
  display: block;
  margin: 16px 20px 20px;
  padding: 10px;
  text-align: center;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: white;
  border-radius: 3px;
  text-decoration: none;
  transition: opacity 0.2s;
}
.map-info__cta:hover {
  opacity: 0.85;
  color: white;
  text-decoration: none;
}
