/* Voyatale V2 ETAPP 17 — Smart Story rendering.
   Only Smart Create posts from a real Live Trip use these blocks. */

.vgSmartStory[hidden] { display: none !important; }

.vgSmartStory {
  margin: 2px 16px 16px;
  padding: 16px;
  border: 1px solid rgba(113, 0, 128, .10);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #fcf9fd 100%);
}

.vgSmartStoryTimeline {
  position: relative;
  display: grid;
  gap: 22px;
}

.vgSmartStoryTimeline::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 12px;
  width: 1px;
  background: linear-gradient(180deg, rgba(113,0,128,.28), rgba(255,138,0,.18));
}

.vgSmartStoryDay {
  position: relative;
  min-width: 0;
  padding-left: 34px;
}

.vgSmartStoryDay::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 7px;
  width: 11px;
  height: 11px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #710080;
  box-shadow: 0 0 0 1px rgba(113,0,128,.20);
}

.vgSmartStoryDayHead {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  margin-bottom: 6px;
}

.vgSmartStoryDayBadge {
  color: #710080;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.vgSmartStoryDate {
  color: #7a7f87;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
}

.vgSmartStoryDayTitle {
  margin: 0 0 8px;
  color: #171b22;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 850;
  letter-spacing: -.025em;
}

.vgSmartStoryDayText {
  color: #313740;
  font-size: 13.5px;
  line-height: 1.58;
  font-weight: 500;
  white-space: pre-wrap;
}

.vgSmartStoryStops {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.vgSmartStoryStops span {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 4px 9px;
  border: 1px solid #e6e1e8;
  border-radius: 999px;
  background: #fff;
  color: #4b4250;
  font-size: 10.5px;
  line-height: 1.2;
  font-weight: 750;
}

.vgSmartStoryPhotos {
  display: grid;
  width: 100%;
  height: 220px;
  gap: 4px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 14px;
  background: #f0f1f2;
}

.vgSmartStoryPhotos.is-1 { grid-template: 1fr / 1fr; }
.vgSmartStoryPhotos.is-2 { grid-template: 1fr / repeat(2, minmax(0, 1fr)); }
.vgSmartStoryPhotos.is-3 {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .8fr);
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.vgSmartStoryPhotos.is-3 .vgSmartStoryPhoto:first-child { grid-row: 1 / 3; }
.vgSmartStoryPhotos.is-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.vgSmartStoryPhoto {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #edf0ef;
  cursor: pointer;
}

.vgSmartStoryPhoto img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .18s ease;
}

.vgSmartStoryPhoto:hover img { transform: scale(1.015); }

.vgSmartStoryPhotoMore {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(23, 20, 25, .48);
  color: #fff;
  font-size: 24px;
  font-weight: 850;
  pointer-events: none;
}

.vgSmartStoryCollapse {
  display: block;
  margin: 16px 0 0 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #710080;
  font: inherit;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 850;
  cursor: pointer;
}

/* The collapsed feed keeps its compact cover collage. The expanded story
   replaces that collage with day-specific media. The route map remains the
   existing compact feed map and is never enlarged by Smart Story. */
#feed .vgCard.is-smart-story-expanded > .vgPhotoRow,
.vgCard.is-smart-story-expanded > .vgPhotoRow {
  display: none !important;
}

@media (max-width: 768px) {
  #feed .vgSmartStory {
    margin: 0 14px 12px !important;
    padding: 14px 12px 14px !important;
    border-radius: 15px !important;
  }

  #feed .vgSmartStoryTimeline { gap: 20px !important; }
  #feed .vgSmartStoryDay { padding-left: 30px !important; }
  #feed .vgSmartStoryTimeline::before { left: 10px !important; }
  #feed .vgSmartStoryDay::before { left: 5px !important; }

  #feed .vgSmartStoryDayTitle {
    margin-bottom: 7px !important;
    font-size: 16px !important;
  }

  #feed .vgSmartStoryDayText {
    font-size: 12.5px !important;
    line-height: 1.52 !important;
  }

  #feed .vgSmartStoryPhotos {
    height: 180px !important;
    margin-top: 10px !important;
    border-radius: 12px !important;
  }

  #feed .vgSmartStoryCollapse { margin-left: 30px !important; }
}

/* ETAPP 18 — full trip permalink entry point from the inline story. */
.vgSmartStoryFooter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 0 34px;
}

.vgSmartStoryFullLink {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  color: #710080;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 900;
  text-decoration: none;
}

.vgSmartStoryFullLink:hover { text-decoration: underline; }

.vgSmartStoryFooter .vgSmartStoryCollapse {
  margin: 0;
}

@media (max-width: 768px) {
  #feed .vgSmartStoryFooter {
    margin-left: 30px !important;
  }

  #feed .vgSmartStoryFooter .vgSmartStoryCollapse {
    margin-left: 0 !important;
  }
}


/* HOTFIX 2026-09-01 — ETAPP 19 action is also visible from inline Smart Story. */
.vgSmartStoryFooterActions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  min-width: 0;
}

@media (max-width: 768px) {
  #feed .vgSmartStoryFooter {
    align-items: flex-start;
    flex-direction: column;
  }
  #feed .vgSmartStoryFooterActions { width: 100%; }
}
