/* AiFax guided tour: popover look and the header Tour button.
   Overrides for driver.js (assets/aifax-tour/driver.css) plus the button
   that aifax-tour.js inserts into the header. Loaded from index.html;
   delete this file, aifax-tour.js and their tags to fully revert. Nothing
   here restyles a host element: the tour sits on top of the page. */

/* The dimmed backdrop must sit above every app overlay (CDK panes at
   1000, ng-bootstrap modals at 1050, the fax-view dialog at 10000).
   driver.css already puts the popover itself far above that. */
.driver-overlay {
  z-index: 100000 !important;
}

.driver-popover.aifax-tour-popover {
  border-radius: 12px;
  max-width: 360px;
  padding: 18px 20px 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
  color: #222b45;
}
.driver-popover.aifax-tour-popover .driver-popover-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}
.driver-popover.aifax-tour-popover .driver-popover-description {
  font-size: 14px;
  line-height: 1.5;
  margin-top: 6px;
}
.driver-popover.aifax-tour-popover .driver-popover-footer {
  margin-top: 14px;
}
/* Muted text at 5.35:1 on white (#8f9bb3 would be 2.8:1). */
.driver-popover.aifax-tour-popover .driver-popover-progress-text {
  font-size: 12px;
  color: #5f6b85;
  white-space: nowrap;
}
.driver-popover.aifax-tour-popover .driver-popover-navigation-btns {
  align-items: center;
}
/* Primary action ("Start tour", "Got it", "Done"): the Bootstrap success
   green family of the app's Send Fax button (.btn-success #28a745), one
   shade darker so white text passes WCAG AA (#218838 is 4.52:1,
   #1e7e34 is 5.14:1; #28a745 would be 3.13:1). */
.driver-popover.aifax-tour-popover .driver-popover-next-btn {
  background: #218838;
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-shadow: none;
}
.driver-popover.aifax-tour-popover .driver-popover-next-btn:hover,
.driver-popover.aifax-tour-popover .driver-popover-next-btn:focus {
  background: #1e7e34;
  color: #fff;
}
/* driver.css resets the button outline; keyboard focus needs a ring. */
.driver-popover.aifax-tour-popover .driver-popover-next-btn:focus-visible {
  outline: 2px solid #222b45;
  outline-offset: 2px;
}
/* "Skip tour": a plain underlined text link. It is the last element in the
   footer so the primary button receives focus first; order puts it on the
   left visually. */
.driver-popover.aifax-tour-popover .aifax-tour-skip {
  order: -1;
  color: #5f6b85;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  margin-right: 14px;
  white-space: nowrap;
}
.driver-popover.aifax-tour-popover .aifax-tour-skip:hover {
  color: #222b45;
}

/* Header "Tour" button, matching the look of #aifax-did-badge. */
#aifax-tour-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 14px;
  padding: 4px 12px;
  border-radius: 16px;
  background: rgba(51, 102, 255, 0.08);
  color: #3366ff !important;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
  text-decoration: none !important;
  cursor: pointer;
}
#aifax-tour-btn:hover,
#aifax-tour-btn:focus {
  background: rgba(51, 102, 255, 0.16);
  text-decoration: none !important;
}
#aifax-tour-btn .fa {
  font-size: 15px;
}

/* Phones and small tablets: aifax-mobile.css lets the header wrap and
   pads the page for exactly its one-row height, so the button must not
   add a row (in the flow it wraps under the logo at 320-360px). It is
   taken out of the flow and pinned inside the bottom-right padding of the
   fixed header bar (nb-layout-header.fixed is its containing block). */
@media (max-width: 820px) {
  #aifax-tour-btn {
    position: absolute;
    right: 12px;
    bottom: 2px;
    margin: 0;
    padding: 4px 10px;
    font-size: 12px;
  }
  .driver-popover.aifax-tour-popover {
    max-width: calc(100vw - 24px);
  }
}
