/* Rentari Tour: brand theming layered on top of intro.js v7.
   Overrides target intro.js classes (.introjs-*), plus our own
   .rentari-tour-tooltip applied via tooltipClass.

   Design intent:
     - Card looks like the rest of the dashboard: rounded-2xl, soft brand-teal
       glow, white surface, slate body, Inter type stack.
     - Motion is spring-y entry, transform+opacity only, respects
       prefers-reduced-motion.
     - Primary action (Next/Done) is brand-teal; Back/Skip are quiet ghosts.
*/

/* ---------- Backdrop ---------- */
.introjs-overlay {
  background-color: rgba(15, 23, 42, 0.55) !important;
  opacity: 0 !important;
  animation: rentari-tour-fade 220ms ease-out forwards;
}
@keyframes rentari-tour-fade {
  to { opacity: 1 !important; }
}

/* ---------- Highlighted cutout ---------- */
.introjs-helperLayer {
  border-radius: 10px !important;
  box-shadow: rgba(15, 118, 110, 0.55) 0 0 0 3px,
              rgba(15, 23, 42, 0.55) 0 0 0 5000px !important;
  transition: all 320ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ---------- Tooltip card ---------- */
.rentari-tour-tooltip.introjs-tooltip {
  background: #ffffff !important;
  color: #0f172a !important;
  border-radius: 16px !important;
  border: 1px solid rgba(15, 118, 110, 0.18) !important;
  box-shadow: 0 24px 48px -12px rgba(15, 118, 110, 0.25),
              0 8px 16px -4px rgba(15, 23, 42, 0.12) !important;
  min-width: 320px !important;
  max-width: 380px !important;
  padding: 0 !important;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif !important;
  animation: rentari-tour-pop 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform, opacity;
}
@keyframes rentari-tour-pop {
  from { opacity: 0; transform: scale(0.94) translateY(4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .rentari-tour-tooltip.introjs-tooltip,
  .introjs-overlay,
  .introjs-helperLayer {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Title ---------- */
.rentari-tour-tooltip .introjs-tooltip-title {
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.01em !important;
  padding: 18px 44px 4px 20px !important;
  line-height: 1.3 !important;
}

/* ---------- Header (intro.js v7 wraps title + skip in .introjs-tooltip-header) ---------- */
.rentari-tour-tooltip .introjs-tooltip-header {
  padding: 0 !important;
  position: relative !important;
}

/* ---------- Body ---------- */
.rentari-tour-tooltip .introjs-tooltiptext {
  font-size: 14px !important;
  line-height: 1.55 !important;
  color: #293649 !important;
  padding: 6px 20px 14px !important;
}

/* ---------- Button bar ---------- */
.rentari-tour-tooltip .introjs-tooltipbuttons {
  border-top: 1px solid #f1f5f9 !important;
  padding: 12px 16px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  text-align: left !important;
}

/* ---------- Buttons: default ghost ---------- */
.rentari-tour-tooltip .introjs-button {
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  border: 1px solid #e2e8f0 !important;
  background: #ffffff !important;
  color: #293649 !important;
  text-shadow: none !important;
  box-shadow: none !important;
  transition: transform 120ms ease, background 120ms ease,
              border-color 120ms ease, color 120ms ease !important;
}
.rentari-tour-tooltip .introjs-button:hover {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}
.rentari-tour-tooltip .introjs-button:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2) !important;
}
.rentari-tour-tooltip .introjs-button:active {
  transform: scale(0.97) !important;
}

/* ---------- Buttons: primary (Next / Done) ---------- */
.rentari-tour-tooltip .introjs-nextbutton,
.rentari-tour-tooltip .introjs-donebutton {
  background: #0f766e !important;
  color: #ffffff !important;
  border-color: #0f766e !important;
  margin-left: auto !important;
}
.rentari-tour-tooltip .introjs-nextbutton:hover,
.rentari-tour-tooltip .introjs-donebutton:hover {
  background: #0d5c56 !important;
  border-color: #0d5c56 !important;
  color: #ffffff !important;
}

/* ---------- Skip: quiet text link in the top-right ---------- */
.rentari-tour-tooltip .introjs-skipbutton {
  position: absolute !important;
  top: 12px !important;
  right: 14px !important;
  padding: 4px 6px !important;
  background: transparent !important;
  border: none !important;
  color: #576478 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}
.rentari-tour-tooltip .introjs-skipbutton:hover {
  color: #293649 !important;
  background: transparent !important;
  border: none !important;
}

/* ---------- Hide intro.js bullets entirely (we use a progress bar) ---------- */
.rentari-tour-tooltip .introjs-bullets { display: none !important; }

/* ---------- Progress bar ---------- */
.rentari-tour-tooltip .introjs-progress {
  background: #f1f5f9 !important;
  height: 3px !important;
  border-radius: 99px !important;
  margin: 0 20px 12px !important;
  overflow: hidden !important;
}
.rentari-tour-tooltip .introjs-progressbar {
  background: #0f766e !important;
  border-radius: 99px !important;
  transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ---------- Arrows (tinted to match card surface) ---------- */
.rentari-tour-tooltip .introjs-arrow.top         { border-bottom-color: #ffffff !important; }
.rentari-tour-tooltip .introjs-arrow.bottom      { border-top-color: #ffffff !important; }
.rentari-tour-tooltip .introjs-arrow.left        { border-right-color: #ffffff !important; }
.rentari-tour-tooltip .introjs-arrow.right       { border-left-color: #ffffff !important; }
.rentari-tour-tooltip .introjs-arrow.top-right   { border-bottom-color: #ffffff !important; }
.rentari-tour-tooltip .introjs-arrow.top-middle  { border-bottom-color: #ffffff !important; }
.rentari-tour-tooltip .introjs-arrow.bottom-right{ border-top-color: #ffffff !important; }
.rentari-tour-tooltip .introjs-arrow.bottom-middle { border-top-color: #ffffff !important; }


/* ======================================================================
   Tour catalog popover ("Help & tours")
   ====================================================================== */

.rentari-tour-catalog {
  position: fixed;
  width: 360px;
  max-height: 480px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  box-shadow: 0 24px 48px -12px rgba(15, 118, 110, 0.25),
              0 8px 16px -4px rgba(15, 23, 42, 0.12);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  animation: rentari-catalog-pop 220ms cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: bottom left;
}
.rentari-tour-catalog.hidden { display: none; }

@keyframes rentari-catalog-pop {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .rentari-tour-catalog { animation: none; }
}

/* ---------- Header ---------- */
.rentari-tour-catalog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid #f1f5f9;
}
.rentari-tour-catalog__title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.rentari-tour-catalog__subtitle {
  font-size: 12px;
  color: #354358;
  margin-top: 2px;
}
.rentari-tour-catalog__close {
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: #576478;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 120ms ease, color 120ms ease;
  flex-shrink: 0;
}
.rentari-tour-catalog__close:hover {
  background: #f1f5f9;
  color: #293649;
}
.rentari-tour-catalog__close:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.2);
}

/* ---------- List ---------- */
.rentari-tour-catalog__list {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 8px 4px;
}
.rentari-tour-catalog__cat {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #576478;
  padding: 12px 12px 6px;
}
.rentari-tour-catalog__cat:first-child { padding-top: 4px; }

.rentari-tour-catalog__row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 80ms ease;
  font-family: inherit;
  color: #0f172a;
}
.rentari-tour-catalog__row:hover,
.rentari-tour-catalog__row:focus {
  background: #f8fafc;
  border-color: #e2e8f0;
  outline: none;
}
.rentari-tour-catalog__row:focus {
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}
.rentari-tour-catalog__row:active { transform: scale(0.99); }

.rentari-tour-catalog__row-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 118, 110, 0.1);
  color: #0f766e;
  font-size: 14px;
}
.rentari-tour-catalog__row.is-seen .rentari-tour-catalog__row-icon {
  background: #f1f5f9;
  color: #576478;
}

.rentari-tour-catalog__row-body {
  flex: 1 1 auto;
  min-width: 0;
}
.rentari-tour-catalog__row-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.3;
}
.rentari-tour-catalog__row.is-seen .rentari-tour-catalog__row-title {
  color: #293649;
}
.rentari-tour-catalog__row-desc {
  font-size: 12px;
  color: #354358;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rentari-tour-catalog__row-state { flex-shrink: 0; }
.rentari-tour-catalog__pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 99px;
  line-height: 1;
}
.rentari-tour-catalog__pill.is-new {
  background: #0f766e;
  color: #ffffff;
}
.rentari-tour-catalog__pill.is-seen {
  background: #f1f5f9;
  color: #354358;
}

.rentari-tour-catalog__empty {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: #576478;
}

/* ---------- Footer ---------- */
.rentari-tour-catalog__footer {
  border-top: 1px solid #f1f5f9;
  padding: 10px 12px;
}
.rentari-tour-catalog__help-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #293649;
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease;
}
.rentari-tour-catalog__help-link:hover {
  background: #f8fafc;
  color: #0f766e;
}

/* ---------- Mobile bottom sheet ---------- */
.rentari-tour-catalog__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 9998;
  animation: rentari-catalog-fade 180ms ease-out;
}
.rentari-tour-catalog__backdrop.hidden { display: none; }

@keyframes rentari-catalog-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.rentari-tour-catalog.is-mobile {
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  width: 100%;
  max-height: 75vh;
  border-radius: 20px 20px 0 0;
  border-bottom: none;
  transform-origin: bottom center;
  animation: rentari-catalog-slide-up 240ms cubic-bezier(0.34, 1.4, 0.64, 1);
}
@keyframes rentari-catalog-slide-up {
  from { opacity: 0; transform: translateY(100%); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Sidebar trigger badge ---------- */
#sidebar-tour-badge.hidden { display: none; }

