/**
 * Hospitality Flow — Demo Mode transitions & chrome
 */
:root {
  --hf-demo-accent: #5b9fd4;
  --hf-demo-accent-soft: rgba(91, 159, 212, 0.16);
  --hf-demo-ink: #eef2f7;
  --hf-demo-muted: #a8b4c4;
  --hf-demo-panel: rgba(12, 24, 41, 0.92);
  --hf-demo-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --hf-demo-banner-h: 0px;
  /* Align with production navy/blue tokens */
  --hf-demo-navy: #0c1829;
  --hf-demo-navy-800: #122240;
  --hf-demo-blue-50: #eef6fc;
  --hf-demo-blue-600: #3a7ab0;
  --hf-demo-radius: 12px;
  --hf-demo-radius-lg: 16px;
}

html.hf-demo-active {
  --hf-demo-banner-h: 58px;
}

html.hf-demo-transitioning,
html.hf-demo-transitioning body {
  overflow: hidden;
}

/* —— Enable / exit overlay —— */
.hf-demo-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(91, 159, 212, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 80% 90%, rgba(58, 122, 176, 0.12), transparent 50%),
    rgba(7, 14, 26, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.32s var(--hf-demo-ease);
  pointer-events: none;
}

.hf-demo-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.hf-demo-overlay-panel {
  position: relative;
  width: min(440px, 100%);
  padding: 36px 32px 32px;
  border-radius: 20px;
  background: var(--hf-demo-panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  transition: transform 0.4s var(--hf-demo-ease), opacity 0.4s var(--hf-demo-ease);
  overflow: hidden;
}

.hf-demo-overlay.is-visible .hf-demo-overlay-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.hf-demo-overlay-orb {
  position: absolute;
  top: -40px;
  right: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 159, 212, 0.35), transparent 70%);
  animation: hfDemoOrb 4.5s ease-in-out infinite;
  pointer-events: none;
}

.hf-demo-overlay-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hf-demo-accent);
  margin-bottom: 10px;
}

.hf-demo-overlay-title {
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--hf-demo-ink);
  margin-bottom: 10px;
}

.hf-demo-overlay-step {
  font-size: 0.9rem;
  color: var(--hf-demo-muted);
  margin-bottom: 22px;
  min-height: 1.4em;
  transition: opacity 0.25s var(--hf-demo-ease);
}

.hf-demo-overlay-steps {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hf-demo-overlay-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: rgba(168, 180, 196, 0.45);
  transition: color 0.3s var(--hf-demo-ease), opacity 0.3s var(--hf-demo-ease);
}

.hf-demo-overlay-steps li.is-active {
  color: var(--hf-demo-ink);
}

.hf-demo-overlay-steps li.is-done {
  color: var(--hf-demo-muted);
}

.hf-demo-step-mark {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  transition: background 0.3s var(--hf-demo-ease), box-shadow 0.3s var(--hf-demo-ease), transform 0.3s var(--hf-demo-ease);
}

.hf-demo-overlay-steps li.is-active .hf-demo-step-mark {
  background: var(--hf-demo-accent);
  box-shadow: 0 0 0 4px var(--hf-demo-accent-soft);
  transform: scale(1.15);
}

.hf-demo-overlay-steps li.is-done .hf-demo-step-mark {
  background: #6bc992;
  box-shadow: none;
}

.hf-demo-overlay-bar {
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.hf-demo-overlay-bar span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--hf-demo-accent), var(--hf-demo-blue-600));
  transition: width 0.45s var(--hf-demo-ease);
}

@keyframes hfDemoOrb {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.85; }
  50% { transform: translate(-12px, 8px) scale(1.08); opacity: 1; }
}

/* —— Persistent banner —— */
.hf-demo-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.4s var(--hf-demo-ease), opacity 0.35s var(--hf-demo-ease);
  background: linear-gradient(105deg, rgba(18, 34, 64, 0.98), rgba(12, 24, 41, 0.96));
  border-bottom: 1px solid rgba(91, 159, 212, 0.28);
  box-shadow: 0 8px 24px rgba(7, 14, 26, 0.22);
}

.hf-demo-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.hf-demo-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.hf-demo-banner-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.hf-demo-banner-badge {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 100px;
  color: var(--hf-demo-blue-600);
  background: var(--hf-demo-blue-50);
  border: 1px solid rgba(74, 143, 196, 0.28);
}

.hf-demo-banner-text {
  margin: 0;
  font-size: 0.82rem;
  color: var(--hf-demo-muted);
  line-height: 1.35;
}

.hf-demo-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.hf-demo-banner-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--hf-demo-accent);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.2s var(--hf-demo-ease), color 0.2s var(--hf-demo-ease);
}

.hf-demo-banner-link:hover,
.hf-demo-banner-link:focus-visible {
  background: var(--hf-demo-accent-soft);
  color: #fff;
  outline: none;
}

.hf-demo-banner-exit,
.hf-demo-banner-reset {
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--hf-demo-ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 6px 12px;
  transition: background 0.2s var(--hf-demo-ease), border-color 0.2s var(--hf-demo-ease);
}

.hf-demo-banner-reset {
  color: #dce9f5;
  border-color: rgba(91, 159, 212, 0.45);
  background: rgba(91, 159, 212, 0.14);
}

.hf-demo-banner-exit:hover,
.hf-demo-banner-exit:focus-visible,
.hf-demo-banner-reset:hover,
.hf-demo-banner-reset:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  outline: none;
}

.hf-demo-banner-reset:hover,
.hf-demo-banner-reset:focus-visible {
  background: rgba(91, 159, 212, 0.28);
  border-color: rgba(91, 159, 212, 0.7);
}

.hf-demo-first-action-cue {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(74, 143, 196, 0.28);
  background: rgba(238, 246, 252, 0.95);
  color: #1a3055;
  font-size: 0.88rem;
  line-height: 1.4;
}

/* Public Demo only — never apply outside html.hf-demo-workspace */
html.hf-demo-workspace #copyBtn,
html.hf-demo-workspace #saveHandoverBtn,
html.hf-demo-workspace #exportPdfBtn,
html.hf-demo-workspace #printHandoverBtn,
html.hf-demo-workspace #handoverOutputActions,
html.hf-demo-workspace #newHandoverBtn,
html.hf-demo-workspace #savedHandoversSection,
html.hf-demo-workspace #advancedDataOptions {
  display: none !important;
}

/* Locked sample fields — fixed values, not “broken disabled” greys */
/* Guided demo: Clear Notes hidden; sample notes remain visible but fixed */
html.hf-demo-workspace #clearBtn {
  display: none !important;
}

html.hf-demo-workspace #notesInput.hf-demo-notes-locked,
html.hf-demo-workspace #notesInput.hf-demo-locked-field {
  cursor: default;
  caret-color: transparent;
  resize: none;
  background: rgba(245, 248, 252, 0.98);
  border-color: rgba(74, 143, 196, 0.18);
  color: #24364f;
  box-shadow: none;
}

html.hf-demo-workspace .hf-demo-locked-field,
html.hf-demo-workspace .form-input--demo-locked,
html.hf-demo-workspace #hotelName[readonly],
html.hf-demo-workspace #preparedBy[readonly],
html.hf-demo-workspace #handoverDate[readonly] {
  cursor: default;
  caret-color: transparent;
  user-select: none;
  opacity: 1;
  color: #24364f;
  background: rgba(245, 248, 252, 0.98);
  border-color: rgba(74, 143, 196, 0.22);
  box-shadow: none;
}

html.hf-demo-workspace .hf-demo-locked-field:focus,
html.hf-demo-workspace .form-input--demo-locked:focus,
html.hf-demo-workspace #handoverDate.hf-demo-locked-field:focus {
  outline: none;
  border-color: rgba(74, 143, 196, 0.28);
  box-shadow: none;
}

html.hf-demo-workspace #handoverDate.hf-demo-locked-field::-webkit-calendar-picker-indicator {
  opacity: 0.4;
  pointer-events: none;
}

html.hf-demo-workspace .hf-demo-locked-shift {
  position: relative;
}

html.hf-demo-workspace .hf-demo-locked-shift .shift-btn {
  cursor: default;
  pointer-events: none;
  box-shadow: none;
}

html.hf-demo-workspace .hf-demo-locked-shift .shift-btn:not(.active) {
  opacity: 0.58;
  background: rgba(245, 248, 252, 0.9);
}

html.hf-demo-workspace .hf-demo-locked-shift .shift-btn.active {
  opacity: 1;
}

html.hf-demo-workspace .snapshot-field-input.hf-demo-locked-field {
  pointer-events: none;
}

html.hf-demo-workspace .glance-snapshot.hf-demo-locked-snapshot,
html.hf-demo-workspace .glance-snapshot.hf-demo-locked-snapshot:hover,
html.hf-demo-workspace .glance-snapshot.hf-demo-locked-snapshot:focus-visible {
  cursor: default;
  transform: none;
  box-shadow: none;
}

html.hf-demo-workspace .hotel-snapshot-pre-hint {
  color: #3d5a78;
}

/* —— Hotel Brain Demo (read-only sample knowledge) —— */
.hf-demo-brain-note {
  display: none;
  margin: 10px 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #3d5a78;
}

html.hf-demo-brain-readonly .hf-demo-brain-note:not([hidden]) {
  display: block;
}

.hf-demo-brain-setup-actions {
  display: none;
  margin-top: 12px;
}

html.hf-demo-brain-readonly .hf-demo-brain-setup-actions:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

html.hf-demo-brain-readonly #saveBtn,
html.hf-demo-brain-readonly .improve-writing-btn,
html.hf-demo-brain-readonly .ai-polish-btn,
html.hf-demo-brain-readonly .add-row-btn,
html.hf-demo-brain-readonly .gs-add-note-btn,
html.hf-demo-brain-readonly .facility-remove,
html.hf-demo-brain-readonly .logo-delete-btn,
html.hf-demo-brain-readonly .logo-remove-btn,
html.hf-demo-brain-readonly .remove-row,
html.hf-demo-brain-readonly .remove-dept,
html.hf-demo-brain-readonly .remove-term,
html.hf-demo-brain-readonly .remove-inventory,
html.hf-demo-brain-readonly .remove-room-facility,
html.hf-demo-brain-readonly .remove-supply,
html.hf-demo-brain-readonly .remove-guest-loan,
html.hf-demo-brain-readonly .remove-guest-supplier,
html.hf-demo-brain-readonly .remove-email-recipient,
html.hf-demo-brain-readonly .remove-gs-note,
html.hf-demo-brain-readonly .icon-btn,
html.hf-demo-brain-readonly #exportProfileBtn,
html.hf-demo-brain-readonly #importProfileBtn,
html.hf-demo-brain-readonly #downloadPdfBtn,
html.hf-demo-brain-readonly #printProfileBtn,
html.hf-demo-brain-readonly #hotelBrainBackupActions,
html.hf-demo-brain-readonly #logoUpload,
html.hf-demo-brain-readonly #logoInput,
html.hf-demo-brain-readonly #logoDelete,
html.hf-demo-brain-readonly #logoRemove,
html.hf-demo-brain-readonly #removeLogoBtn,
html.hf-demo-brain-readonly #loadZetterSampleBtn,
html.hf-demo-brain-readonly #demoModePanel,
html.hf-demo-brain-readonly #devSamplePanel,
html.hf-demo-brain-readonly .dev-only-panel,
html.hf-demo-brain-readonly .col-actions,
html.hf-demo-brain-readonly .rooms-table .btn-text,
html.hf-demo-brain-readonly #improveWritingModal,
html.hf-demo-brain-readonly #roomNotesModal,
html.hf-demo-brain-readonly .hf-demo-brain-mutation-hidden {
  display: none !important;
}

html.hf-demo-brain-readonly .hf-demo-workspace-gated-note:not([hidden]) {
  display: block !important;
  margin: 0 0 4px;
  color: var(--hf-demo-blue-600, #3a7ab0);
  font-weight: 600;
}

html.hf-demo-brain-readonly main input:not([type="hidden"]),
html.hf-demo-brain-readonly main textarea,
html.hf-demo-brain-readonly main select,
html.hf-demo-brain-readonly main .hf-demo-locked-field {
  cursor: default;
  caret-color: transparent;
  user-select: none;
  pointer-events: none;
  background: rgba(245, 248, 252, 0.98);
  border-color: rgba(74, 143, 196, 0.18);
  color: #24364f;
  box-shadow: none;
  opacity: 1;
}

html.hf-demo-brain-readonly main input:focus,
html.hf-demo-brain-readonly main textarea:focus,
html.hf-demo-brain-readonly main select:focus {
  outline: none;
  box-shadow: none;
  border-color: rgba(74, 143, 196, 0.22);
}

/* Sidebar / disclosure / collapse controls stay interactive for browsing */
html.hf-demo-brain-readonly .profile-sidebar button,
html.hf-demo-brain-readonly .sidebar button,
html.hf-demo-brain-readonly .disclosure-card-toggle,
html.hf-demo-brain-readonly .supply-item-toggle,
html.hf-demo-brain-readonly .collapse-toggle,
html.hf-demo-brain-readonly .section-nav button,
html.hf-demo-brain-readonly .section-nav-group-toggle,
html.hf-demo-brain-readonly .section-nav-link,
html.hf-demo-brain-readonly .mobile-nav,
html.hf-demo-brain-readonly .mobile-nav-link,
html.hf-demo-brain-readonly [data-profile-nav],
html.hf-demo-brain-readonly .profile-card-header[data-collapse-toggle],
html.hf-demo-brain-readonly #hfDemoBrainSetupActions a,
html.hf-demo-brain-readonly .nav-back-handover {
  pointer-events: auto;
  cursor: pointer;
  user-select: auto;
  display: revert;
}

.hf-demo-restricted-note {
  display: none;
  margin: 10px 0 0;
  padding: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #5a6b80;
}

html.hf-demo-workspace .hf-demo-restricted-note:not([hidden]) {
  display: block;
}

.hf-demo-conversion-card {
  display: none;
  margin: 24px 0 8px;
  padding: 22px 24px 20px;
  border-radius: var(--hf-demo-radius-lg);
  border: 1px solid rgba(7, 14, 26, 0.06);
  background: linear-gradient(135deg, #ffffff 0%, var(--hf-demo-blue-50) 100%);
  box-shadow: 0 1px 2px rgba(7, 14, 26, 0.04), 0 2px 8px rgba(7, 14, 26, 0.03);
}

html.hf-demo-workspace .hf-demo-conversion-card:not([hidden]) {
  display: block;
}

.hf-demo-conversion-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hf-demo-navy);
}

.hf-demo-conversion-text {
  margin: 0 0 16px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: #5a6578;
  max-width: 42rem;
}

.hf-demo-conversion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hf-demo-conversion-actions .btn-primary,
.hf-demo-conversion-actions .btn-secondary {
  min-height: 42px;
  border-radius: var(--hf-demo-radius);
}

/* Offset fixed headers when demo banner is visible */
html.hf-demo-active .header,
html.hf-demo-active .app-header,
html.hf-demo-active header.header,
html.hf-demo-active .topnav,
html.hf-demo-active nav.topnav {
  top: var(--hf-demo-banner-h);
  transition: top 0.4s var(--hf-demo-ease);
}

html.hf-demo-active body {
  padding-top: var(--hf-demo-banner-h);
  transition: padding-top 0.4s var(--hf-demo-ease);
}

/* —— Operator QA link (Account → Operator section only) —— */
.hf-demo-operator-note {
  margin-top: -8px;
  margin-bottom: 16px;
}

.hf-demo-operator-host {
  display: inline-flex;
  align-items: center;
}

.hf-demo-operator-link,
.account-links .hf-demo-operator-link {
  display: inline;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  border-radius: 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gray-400, var(--hf-demo-muted));
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s var(--hf-demo-ease);
}

.hf-demo-operator-link:hover,
.hf-demo-operator-link:focus-visible,
.account-links .hf-demo-operator-link:hover,
.account-links .hf-demo-operator-link:focus-visible {
  background: none;
  border: none;
  color: var(--white, var(--hf-demo-ink));
  outline: none;
}

@media (max-width: 720px) {
  .hf-demo-banner-inner {
    padding: 10px 16px;
  }

  .hf-demo-banner-text {
    font-size: 0.75rem;
  }

  .hf-demo-overlay-panel {
    padding: 28px 22px 24px;
  }

  html.hf-demo-active {
    --hf-demo-banner-h: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hf-demo-overlay,
  .hf-demo-overlay-panel,
  .hf-demo-banner,
  .hf-demo-overlay-bar span,
  .hf-demo-step-mark,
  html.hf-demo-active .header,
  html.hf-demo-active body {
    transition: none !important;
    animation: none !important;
  }

  .hf-demo-overlay-orb {
    animation: none !important;
  }

}
