/* ============================================================
   presentation.css — Presentation & Guided Tour Mode
   Floating button, info panel, focus/dim transitions,
   progress bar, and glassmorphism overlay styles.
   ============================================================ */

/* --- Floating Presentation Button ------------------------- */
.pres-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: linear-gradient(135deg, #3B82F6, #60A5FA);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
  letter-spacing: 0.3px;
}

.pres-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(59, 130, 246, 0.55);
}

.pres-btn i {
  font-size: 1rem;
}

.pres-btn--active {
  background: linear-gradient(135deg, #EF4444, #F87171);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.pres-btn--active:hover {
  box-shadow: 0 6px 28px rgba(239, 68, 68, 0.55);
}

/* --- Presentation Mode: Body State ------------------------ */
body.presentation-active {
  /* Slightly larger base font for better visibility */
  font-size: 0.95rem;
}

body.presentation-active .sidebar {
  width: 0;
  overflow: hidden;
  border-right: none;
  padding: 0;
}

body.presentation-active .main {
  margin-left: 0;
}

body.presentation-active .navbar__subtitle,
body.presentation-active .navbar__icon-btn,
body.presentation-active .navbar__toggle,
body.presentation-active .filter-toolbar,
body.presentation-active .section__subtitle,
body.presentation-active .viz-card__toolbar,
body.presentation-active .insight-panel__info-btn,
body.presentation-active .dashboard-header__actions,
body.presentation-active .exec-header__meta {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

body.presentation-active .section__header {
  margin-bottom: 0.8rem;
}

body.presentation-active .viz-card {
  min-height: 320px;
}

body.presentation-active .kpi-card__value {
  font-size: 2.2rem;
}

body.presentation-active .exec-header__title {
  font-size: 1.6rem;
}

/* --- Focus / Dim Transition ------------------------------- */
.pres-section--dim {
  opacity: 0.18;
  pointer-events: none;
  filter: grayscale(0.6) blur(1px);
  transition: opacity 0.5s ease, filter 0.5s ease;
}

.pres-section--focus {
  opacity: 1;
  pointer-events: auto;
  filter: none;
  position: relative;
  z-index: 10;
  transition: opacity 0.5s ease, filter 0.5s ease;
}

.pres-section--focus::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 20px;
  border: 2px solid rgba(59, 130, 246, 0.35);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.15), 0 0 60px rgba(59, 130, 246, 0.06);
  pointer-events: none;
  z-index: -1;
  animation: presFocusPulse 2.5s ease-in-out infinite;
}

@keyframes presFocusPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(59, 130, 246, 0.15), 0 0 60px rgba(59, 130, 246, 0.06); }
  50%      { box-shadow: 0 0 40px rgba(59, 130, 246, 0.25), 0 0 80px rgba(59, 130, 246, 0.1); }
}

/* --- Presentation Info Panel ------------------------------ */
.pres-panel {
  position: fixed;
  bottom: 90px;
  right: 28px;
  z-index: 501;
  width: 420px;
  max-width: calc(100vw - 56px);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  transition: opacity 0.4s ease, transform 0.4s ease;
  font-family: 'Poppins', sans-serif;
}

.pres-panel--hidden {
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
}

.pres-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.pres-panel__step-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #3B82F6;
  background: rgba(59, 130, 246, 0.12);
  padding: 4px 12px;
  border-radius: 20px;
}

.pres-panel__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #F8FAFC;
  margin-bottom: 12px;
  line-height: 1.3;
}

.pres-panel__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pres-panel__explain {
  font-size: 0.8rem;
  color: #CBD5E1;
  line-height: 1.6;
}

.pres-panel__insight {
  background: rgba(59, 130, 246, 0.08);
  border-left: 3px solid #3B82F6;
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  font-size: 0.78rem;
  color: #93C5FD;
  line-height: 1.6;
}

.pres-panel__insight i {
  margin-right: 6px;
  color: #3B82F6;
}

.pres-panel__recommendation {
  background: rgba(245, 158, 11, 0.06);
  border-left: 3px solid #F59E0B;
  border-radius: 0 8px 8px 0;
  padding: 10px 14px;
  font-size: 0.78rem;
  color: #FCD34D;
  line-height: 1.6;
}

.pres-panel__recommendation i {
  margin-right: 6px;
  color: #F59E0B;
}

.pres-panel__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  gap: 8px;
}

.pres-panel__nav-btn {
  padding: 8px 18px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(148, 163, 184, 0.06);
  color: #E2E8F0;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pres-panel__nav-btn:hover {
  background: rgba(148, 163, 184, 0.14);
  border-color: rgba(148, 163, 184, 0.35);
}

.pres-panel__nav-btn--primary {
  background: linear-gradient(135deg, #3B82F6, #4F8FF7);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

.pres-panel__nav-btn--primary:hover {
  background: linear-gradient(135deg, #4F8FF7, #60A5FA);
}

.pres-panel__nav-btn--finish {
  background: linear-gradient(135deg, #22C55E, #16A34A);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}

.pres-panel__nav-btn--finish:hover {
  background: linear-gradient(135deg, #16A34A, #15803D);
}

.pres-panel__nav-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* --- Progress Bar ----------------------------------------- */
.pres-progress {
  position: fixed;
  top: var(--navbar-height, 64px);
  left: 0;
  right: 0;
  z-index: 499;
  height: 3px;
  background: rgba(148, 163, 184, 0.08);
}

.pres-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, #3B82F6, #60A5FA);
  border-radius: 0 2px 2px 0;
  transition: width 0.5s ease;
}

.pres-progress__label {
  position: absolute;
  right: 16px;
  top: 8px;
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(59, 130, 246, 0.7);
  font-family: 'Poppins', sans-serif;
}

/* --- Responsive: Smaller screens -------------------------- */
@media screen and (max-width: 767px) {
  .pres-panel {
    width: calc(100vw - 32px);
    right: 16px;
    bottom: 80px;
    padding: 18px;
  }

  .pres-btn {
    right: 16px;
    bottom: 20px;
    padding: 10px 18px;
    font-size: 0.72rem;
  }

  .pres-panel__title {
    font-size: 0.95rem;
  }

  .pres-panel__nav {
    flex-wrap: wrap;
  }

  .pres-panel__nav-btn {
    flex: 1;
    justify-content: center;
    font-size: 0.7rem;
    padding: 8px 12px;
  }
}
