/* Guided tours: Driver.js popovers and the tour player (washly-tours.js).
   Loaded by the admin layout and the sign-in page. Only theme variables (with fallbacks for the sign-in
   page, which has no washly-theme.css), so tours follow the Theme & Branding colours. */

.driver-popover.w-tour-popover {
  background-color: var(--w-surface, #FFFFFF);
  color: var(--w-navy);
  font-family: var(--w-font, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
  border-radius: var(--w-radius, 12px);
  box-shadow: var(--w-shadow-lg, 0 12px 32px rgba(14, 42, 71, 0.12));
  padding: 18px 18px 14px;
  min-width: 260px;
  max-width: 360px;
}

.driver-popover.w-tour-popover .driver-popover-title {
  font-family: var(--w-font, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--w-navy);
  padding-right: 24px;
}

.driver-popover.w-tour-popover .driver-popover-description {
  font-family: var(--w-font, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
  font-size: 14px;
  line-height: 1.5;
  color: var(--w-navy);
}

.driver-popover.w-tour-popover .w-tour-body { margin: 0; }

.driver-popover.w-tour-popover .w-tour-note {
  margin: 10px 0 0;
  padding: 6px 0 6px 10px;
  border-left: 3px solid var(--w-teal);
  font-size: 13px;
}

.driver-popover.w-tour-popover .driver-popover-progress-text {
  color: var(--w-teal-text);
  font-size: 12px;
  font-weight: 600;
  flex-basis: 100%;
  margin-bottom: 8px;
}

.driver-popover.w-tour-popover .driver-popover-footer {
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.driver-popover.w-tour-popover .driver-popover-navigation-btns {
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  margin-left: auto;
}

.driver-popover.w-tour-popover .driver-popover-footer button {
  font: 600 13px/1.3 var(--w-font, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
  text-shadow: none;
  border-radius: calc(var(--w-radius, 12px) - 4px);
  padding: 7px 12px;
  margin: 0;
  border: 1px solid var(--w-teal);
  background-color: var(--w-surface, #FFFFFF);
  color: var(--w-navy);
}

.driver-popover.w-tour-popover .driver-popover-footer .driver-popover-next-btn {
  background-color: var(--w-navy);
  border-color: var(--w-navy);
  color: var(--w-surface, #FFFFFF);
}

.driver-popover.w-tour-popover .driver-popover-footer .w-tour-exit {
  border-color: transparent;
  text-decoration: underline;
  padding-left: 0;
  order: 2;
}

.driver-popover.w-tour-popover .driver-popover-footer .w-tour-skip {
  border-style: dashed;
}

.driver-popover.w-tour-popover .driver-popover-footer button:hover {
  background-color: var(--w-teal);
  border-color: var(--w-teal);
  color: var(--w-on-teal);
}

.driver-popover.w-tour-popover button:focus-visible,
.driver-popover.w-tour-popover .driver-popover-footer button:focus-visible {
  outline: 3px solid var(--w-teal);
  outline-offset: 2px;
}

.driver-popover.w-tour-popover .driver-popover-close-btn {
  color: var(--w-navy);
  font-size: 22px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.driver-popover.w-tour-popover .driver-popover-close-btn:hover {
  color: var(--w-teal-text);
}

.driver-popover.w-tour-popover .driver-popover-arrow-side-left.driver-popover-arrow { border-left-color: var(--w-surface, #FFFFFF); }
.driver-popover.w-tour-popover .driver-popover-arrow-side-right.driver-popover-arrow { border-right-color: var(--w-surface, #FFFFFF); }
.driver-popover.w-tour-popover .driver-popover-arrow-side-top.driver-popover-arrow { border-top-color: var(--w-surface, #FFFFFF); }
.driver-popover.w-tour-popover .driver-popover-arrow-side-bottom.driver-popover-arrow { border-bottom-color: var(--w-surface, #FFFFFF); }

@media (max-width: 767px) {
  .driver-popover.w-tour-popover {
    min-width: 0;
    max-width: calc(100vw - 32px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .driver-fade .driver-overlay,
  .driver-fade .driver-popover {
    animation: none;
  }
}

/* ==========================================================================
   Tour player (washly-tours.js): tours auto-play like a video, with a timed
   popover, a moving pointer and a control bar at the bottom of the screen.
   ========================================================================== */
.driver-popover.w-tour-popover.w-play-popover {
  padding: 20px 22px 0;
  max-width: min(400px, calc(100vw - 32px));
  border-radius: var(--w-radius-lg, 16px);
  overflow: hidden;
}
.driver-popover.w-play-popover .driver-popover-title { font-size: 19px; font-weight: 700; margin-top: 6px; padding-right: 0; }
.driver-popover.w-play-popover .driver-popover-description { font-size: 15px; }
.driver-popover.w-play-popover .driver-popover-footer,
.driver-popover.w-play-popover .driver-popover-close-btn { display: none !important; }

.w-play-kicker {
  display: flex; align-items: center; gap: 6px;
  font: 700 12px/1.2 var(--w-font, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif); letter-spacing: .09em; text-transform: uppercase;
  color: var(--w-navy);
}
.w-play-kicker .w-play-tour { color: var(--w-muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-play-dot {
  flex: none; width: 9px; height: 9px; border-radius: 50%;
  background: var(--w-teal);
  box-shadow: 0 0 0 0 rgba(var(--w-teal-rgb), .6);
  animation: w-play-pulse 1.6s infinite;
}
.w-play-kicker.is-paused .w-play-dot { background: var(--w-muted); animation: none; }
@keyframes w-play-pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--w-teal-rgb), .55); }
  70% { box-shadow: 0 0 0 7px rgba(var(--w-teal-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--w-teal-rgb), 0); }
}
.w-play-pill {
  margin: 14px 0 18px; padding: 9px 14px; border-radius: 10px;
  background: var(--w-mist); color: var(--w-navy);
  font: 600 14px/1.35 var(--w-font, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
}
.w-play-pill::before { content: '\2022'; margin-right: 6px; color: var(--w-teal-text); }
.w-play-progress { height: 4px; margin: 0 -22px; background: var(--w-border); }
.w-play-progress span { display: block; height: 100%; width: 0; background: var(--w-teal-text); }

/* pointer */
.w-play-cursor {
  position: fixed; left: 0; top: 0; z-index: 1000000004; pointer-events: none; opacity: 0;
  transition: transform .8s cubic-bezier(.22, .8, .3, 1), opacity .3s;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35));
}
.w-play-cursor.is-visible { opacity: 1; }
.w-play-cursor svg { display: block; transition: transform .15s; }
.w-play-cursor.is-clicking svg { transform: scale(.82); }

/* control bar */
.w-play-bar {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 1000000005;
  width: min(980px, calc(100vw - 32px)); box-sizing: border-box;
  display: flex; align-items: center; gap: 20px; padding: 14px 18px 14px 24px;
  border-radius: 20px; background: var(--w-navy); color: var(--w-on-navy);
  font-family: var(--w-font, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif); box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}
.driver-active .w-play-bar, .driver-active .w-play-bar * { pointer-events: auto; }
.w-play-info { flex: 1; min-width: 0; }
.w-play-titles { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.w-play-titles strong { font-size: 17px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-play-titles span { font-size: 14px; color: rgba(var(--w-on-navy-rgb), .65); white-space: nowrap; }
.w-play-segs { display: flex; gap: 6px; margin-top: 10px; }
.w-play-seg {
  position: relative; flex: 1; height: 4px; padding: 0; border: 0; border-radius: 4px;
  background: rgba(var(--w-on-navy-rgb), .18); cursor: pointer; overflow: visible;
}
.w-play-seg::after { content: ''; position: absolute; inset: -8px 0; } /* larger click target */
.w-play-seg span { display: block; height: 100%; border-radius: 4px; background: var(--w-teal); transition: width .4s; }
.w-play-ctrls { display: flex; align-items: center; gap: 8px; flex: none; }
.w-play-btn {
  width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--w-on-navy); cursor: pointer;
  font: 700 14px/1 var(--w-font, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
}
.w-play-btn:hover { background: rgba(var(--w-on-navy-rgb), .1); }
.w-play-btn:disabled { opacity: .35; cursor: default; background: transparent; }
.w-play-btn:focus-visible, .w-play-seg:focus-visible, .w-play-list-item:focus-visible { outline: 3px solid var(--w-teal); outline-offset: 2px; }
.w-play-main { width: 58px; height: 58px; background: var(--w-surface, #FFFFFF); color: var(--w-navy); }
.w-play-main:hover { background: var(--w-surface, #FFFFFF); transform: scale(1.04); }
.w-play-main svg { width: 26px; height: 26px; }
.w-play-speed { width: 50px; height: 50px; border: 1.5px solid rgba(var(--w-on-navy-rgb), .35); }

/* section list */
.w-play-list {
  position: absolute; right: 18px; bottom: calc(100% + 10px);
  width: min(360px, calc(100vw - 32px)); max-height: 60vh; overflow: auto; padding: 8px;
  border-radius: 16px; background: var(--w-navy); box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}
.w-play-list-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px;
  border: 0; border-radius: 10px; background: transparent; color: var(--w-on-navy); cursor: pointer;
  text-align: left; font: 500 14px/1.3 var(--w-font, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif);
}
.w-play-list-item:hover { background: rgba(var(--w-on-navy-rgb), .08); }
.w-play-list-item.is-current { background: rgba(var(--w-teal-rgb), .18); }
.w-play-list-num {
  flex: none; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(var(--w-on-navy-rgb), .12); font-weight: 700; font-size: 12px;
}
.w-play-list-item.is-current .w-play-list-num { background: var(--w-teal); color: var(--w-on-teal); }
.w-play-list-title { flex: 1; }
.w-play-list-count { color: rgba(var(--w-on-navy-rgb), .55); font-size: 12px; white-space: nowrap; }

@media (max-width: 767px) {
  .w-play-bar { bottom: 10px; width: calc(100vw - 16px); gap: 10px; padding: 10px 10px 10px 14px; border-radius: 16px; flex-wrap: wrap; }
  .w-play-info { flex-basis: 100%; }
  .w-play-titles strong { font-size: 15px; }
  .w-play-ctrls { width: 100%; justify-content: space-between; }
  .w-play-main { width: 50px; height: 50px; }
  .w-play-cursor { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .w-play-cursor, .w-play-seg span { transition: none; }
  .w-play-dot { animation: none; }
}
