/* Product tour & help drawer */

.screen-help-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.screen-help-btn {
  white-space: nowrap;
}

.screen-help-btn-tour {
  background: linear-gradient(135deg, #0e7a8a 0%, #163a5f 100%);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-soft);
}

.help-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2600;
  border: none;
  background: rgba(11, 39, 69, 0.35);
  cursor: pointer;
}

.help-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 2610;
  width: min(420px, 100vw);
  height: 100vh;
  background: #fff;
  border-left: 1px solid #dbe5ec;
  box-shadow: -12px 0 32px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  animation: helpDrawerIn 0.22s ease;
}

@keyframes helpDrawerIn {
  from {
    transform: translateX(100%);
    opacity: 0.6;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.help-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.help-drawer-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0e7a8a;
}

.help-drawer-title {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
}

.help-drawer-close {
  width: var(--btn-height-sm);
  height: var(--btn-height-sm);
  border: none;
  border-radius: var(--btn-radius-sm);
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.help-drawer-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.help-drawer-body {
  flex: 1;
  overflow: auto;
  padding: 16px 18px 24px;
}

.help-drawer-section + .help-drawer-section {
  margin-top: 18px;
}

.help-drawer-section h3 {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.help-drawer-section p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #475569;
}

.help-drawer-steps,
.help-drawer-notes {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 13px;
  line-height: 1.55;
  color: #475569;
}

.help-drawer-notes {
  list-style: disc;
}

.help-drawer-faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
  background: #f8fafc;
}

.help-faq-item summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.help-faq-item p {
  margin-top: 8px;
}

.help-drawer-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.help-drawer-card-item {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fafc;
}

.help-drawer-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #0f172a;
  margin-bottom: 6px;
}

.help-drawer-card-title i {
  color: #0e7a8a;
  width: 16px;
  text-align: center;
}

.help-drawer-card-item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #475569;
}

.help-drawer-media {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.help-drawer-video-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0e7a8a;
  font-weight: 600;
  text-decoration: none;
}

.help-drawer-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.welcome-tour-modal-root {
  position: fixed;
  inset: 0;
  z-index: 2700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.welcome-tour-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 39, 69, 0.48);
}

.welcome-tour-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 28px 24px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #dbe5ec;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.18);
  text-align: center;
  animation: welcomeCardIn 0.25s ease;
}

@keyframes welcomeCardIn {
  from {
    transform: translateY(12px) scale(0.98);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.welcome-tour-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #e8f5f8, #d8f2f5);
  color: #0e7a8a;
  font-size: 22px;
}

.welcome-tour-card h2 {
  margin: 0 0 10px;
  font-size: 20px;
  color: #0f172a;
}

.welcome-tour-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #64748b;
}

.welcome-tour-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

/* Help Center admin page */
.help-center-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.help-center-list {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 12px;
  max-height: calc(100vh - 220px);
  overflow: auto;
}

.help-center-list-title {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.help-center-screen-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.help-center-screen-btn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.help-center-screen-btn:hover {
  border-color: #cbd5e1;
}

.help-center-screen-btn.is-active {
  border-color: #0e7a8a;
  box-shadow: 0 0 0 1px #0e7a8a;
}

.help-center-screen-code {
  font-size: 11px;
  color: #94a3b8;
  font-family: ui-monospace, monospace;
}

.help-center-saved-pill {
  margin-top: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #15803d;
  background: #dcfce7;
  padding: 2px 6px;
  border-radius: 999px;
}

.help-center-editor {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-center-editor-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 4px;
}

.help-center-tour-editor {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
}

.help-center-editor-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

/* Driver.js theme overrides */
.driver-popover.product-tour-popover {
  background: #fff;
  color: #0f172a;
  border-radius: 12px;
  border: 1px solid #dbe5ec;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  max-width: min(360px, calc(100vw - 32px));
}

.driver-popover.product-tour-popover .driver-popover-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.driver-popover.product-tour-popover .driver-popover-description {
  font-size: 13px;
  line-height: 1.5;
  color: #475569;
}

.driver-popover.product-tour-popover .driver-popover-progress-text {
  font-size: 12px;
  color: #64748b;
}

.driver-popover.product-tour-popover button {
  min-height: var(--btn-height-sm);
  padding: 0 var(--btn-sm-pad-x);
  font-family: inherit;
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  border-radius: var(--btn-radius-sm);
  text-shadow: none;
}

.driver-popover.product-tour-popover .driver-popover-next-btn,
.driver-popover.product-tour-popover .driver-popover-done-btn {
  background: linear-gradient(135deg, #0e7a8a 0%, #163a5f 100%);
  color: #fff;
  border: none;
}

.driver-popover.product-tour-popover .driver-popover-prev-btn {
  background: #fff;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.driver-popover.product-tour-popover .driver-popover-close-btn {
  color: #64748b;
}

@media (max-width: 960px) {
  .screen-help-bar {
    gap: 6px;
  }

  .screen-help-btn span,
  .screen-help-btn {
    font-size: 12px;
  }

  .help-center-layout {
    grid-template-columns: 1fr;
  }

  .help-center-list {
    max-height: none;
  }
}

@media (max-width: 640px) {
  .screen-help-bar .screen-help-btn:first-child span {
    display: none;
  }

  .screen-help-bar .screen-help-btn:first-child::after {
    content: '?';
    font-weight: 700;
  }
}
