/* Offer pages: guided tour of the panel widget (one level). The features are listed on the left under
   their themes, only the active one shows its text, and its HTML mockup fills the frame on the right.
   Markup: .features-tabs.offer-tour[data-offer-tour] > .tab-content > .tab-pane.active > .row
   > .col-md-5.offer-tour-list (p.offer-tour-group, .feature-item[data-preview] with span.offer-tour-progress)
   + .col-md-7.image-column > .image-container > .feature-preview[data-preview-id]. */

.offer-tour-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 6px;
  color: #5ccdde;
  font-size: 12px !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4 !important;
  text-transform: uppercase;
}

.offer-tour-group:first-child {
  margin-top: 0;
}

.offer-tour .feature-item {
  position: relative;
  overflow: hidden;
  margin-bottom: 6px;
  padding: 10px 14px;
}

.offer-tour .feature-item h3 {
  margin: 0;
  font-size: 16px !important;
  line-height: 1.35;
}

.offer-tour .feature-item p {
  display: none;
  margin: 6px 0 0;
  font-size: 14px !important;
  line-height: 1.55 !important;
}

.offer-tour .feature-item.active p {
  display: block;
}

.offer-tour .feature-item::after {
  display: none;
}

.offer-tour .feature-item:focus-visible {
  outline: 2px solid #5ccdde;
  outline-offset: 2px;
}

/* The mockup column does not inherit the old text-center of the tabbed widget. */
.offer-tour .image-column {
  text-align: left;
}

/* Every mockup fills the frame: its first wrappers stretch as flex columns. */
.offer-tour .tab-pane .image-container .feature-preview > * {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

/* No scrollbar in a presentation mockup: its content is sized to fit the frame, and a wide table still
   swipes on mobile without showing a bar. */
.offer-tour .feature-preview,
.offer-tour .feature-preview * {
  scrollbar-width: none;
}

.offer-tour .feature-preview::-webkit-scrollbar,
.offer-tour .feature-preview ::-webkit-scrollbar {
  display: none;
}

/* A mockup table keeps its full height (it only scrolls sideways on mobile). */
.offer-tour .feature-preview .game-panel-mockup-table-responsive {
  flex-shrink: 0;
  overflow-y: hidden;
}

.offer-tour-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 3px;
  background: #5ccdde;
}

.offer-tour.is-visible:not(.is-manual) .feature-item.active .offer-tour-progress {
  animation: offer-tour-progress 8s linear forwards;
}

.offer-tour:hover .feature-item.active .offer-tour-progress {
  animation-play-state: paused;
}

@keyframes offer-tour-progress {
  from { width: 0; }
  to { width: 100%; }
}

@media (min-width: 992px) {
  /* Selectors as strong as the generic .features-tabs rules of main-modernized.css, loaded before this file. */
  .features-tabs.offer-tour[data-offer-tour] .tab-content .tab-pane > .row {
    align-items: flex-start;
  }

  .offer-tour .offer-tour-list {
    min-height: var(--offer-tour-height, 0);
  }

  /* The frame starts on the first item of the list and ends at the bottom of the last one. */
  .features-tabs.offer-tour[data-offer-tour] .tab-content .tab-pane .image-container {
    min-height: 0;
    height: var(--offer-tour-stage, auto);
    margin-top: var(--offer-tour-offset, 0);
  }
}

@media (max-width: 991px) {
  /* Stacked columns take the full width (the row stays a wrapping flex container), so that a narrow mockup
     fills the width and a wide table scrolls inside its mockup. */
  .offer-tour .offer-tour-list,
  .offer-tour .image-column {
    flex: 0 0 100%;
    width: 100%;
    min-width: 0;
  }

  /* List and mockup are stacked: no automatic progression, which would move the page. */
  .offer-tour .offer-tour-progress {
    display: none;
  }
}

@media (max-width: 575px) {
  /* Without a visible scrollbar, a table must fit the width: the action buttons column of the mockup tables
     (right-aligned cells) is left out on a phone. */
  .offer-tour .feature-preview .game-panel-mockup-table th.text-right,
  .offer-tour .feature-preview .game-panel-mockup-table td.text-right {
    display: none;
  }

  .offer-tour .feature-preview .game-panel-mockup-table th,
  .offer-tour .feature-preview .game-panel-mockup-table td {
    padding-left: 8px;
    padding-right: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .offer-tour .offer-tour-progress {
    animation: none !important;
  }
}
