/**
 * Padrão CheckInAll: ajuda contextual + banner webmaster.
 * Componente canónico do botão «Ajuda»: fundo cinza claro, contorno laranja espesso, texto negrito.
 * Activar: <body data-ci-page-help="1"> + #ci-page-help-content
 * Banner: #ci-webmaster-opt-banner (só body.user-is-webmaster)
 */
:root {
  --ci-help-btn-border: #e69100;
  --ci-help-btn-bg: #e8e8e8;
  --ci-help-btn-bg-hover: #dedede;
  --ci-help-btn-fg: #1a1a1a;
}

/* ——— Botão Ajuda (componente único do projecto) ——— */
.ci-page-help-fab {
  position: fixed;
  right: 1rem;
  bottom: 1.25rem;
  z-index: 9990;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1.2rem;
  min-height: 2.25rem;
  border-radius: 999px;
  border: 2px solid var(--ci-help-btn-border);
  background: var(--ci-help-btn-bg);
  color: var(--ci-help-btn-fg);
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
}
.ci-page-help-fab:hover {
  background: var(--ci-help-btn-bg-hover);
  border-color: #d88500;
  filter: brightness(1.02);
}
.ci-page-help-fab:focus-visible {
  outline: 2px solid var(--ci-help-btn-border);
  outline-offset: 2px;
}
.ci-page-help-fab__label {
  line-height: 1.2;
}

.ci-page-help-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9996;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.ci-page-help-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ci-page-help-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 9998;
  width: min(100vw, 28rem);
  max-width: 100%;
  height: 100%;
  max-height: 100dvh;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.18);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  font-family: system-ui, sans-serif;
}
.ci-page-help-panel.is-open {
  transform: translateX(0);
}
.ci-page-help-panel__head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
}
.ci-page-help-panel__head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}
.ci-page-help-panel__close {
  border: none;
  background: #e2e8f0;
  color: #334155;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.ci-page-help-panel__close:hover {
  background: #cbd5e1;
}
.ci-page-help-panel__body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 1rem 1.1rem 1.5rem;
  font-size: 0.9rem;
  line-height: 1.55;
}
.ci-page-help-panel__body h3 {
  margin: 1.15rem 0 0.4rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}
.ci-page-help-panel__body h3:first-child {
  margin-top: 0;
}
.ci-page-help-panel__body ul {
  margin: 0.35rem 0 0.5rem 1.1rem;
  padding: 0;
}
.ci-page-help-panel__body code {
  font-size: 0.82em;
  background: #e2e8f0;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
.ci-page-help-panel__body .hybrid-banner {
  margin: 0.5rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: #475569;
}
.ci-page-help-panel__body .hybrid-banner strong {
  color: #0f172a;
}
.ci-page-help-panel__body a {
  color: #E61E4D;
  font-weight: 600;
  text-decoration: none;
}
.ci-page-help-panel__body a:hover {
  text-decoration: underline;
}

/* ——— Banner webmaster ——— */
.ci-webmaster-opt-banner {
  display: none;
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid #c4b5fd;
  background: linear-gradient(110deg, #f5f3ff 0%, #ede9fe 50%, #faf5ff 100%);
  color: #4c1d95;
  font-size: 0.86rem;
  line-height: 1.5;
  font-family: system-ui, sans-serif;
}
body.user-is-webmaster .ci-webmaster-opt-banner {
  display: block;
}
.ci-webmaster-opt-banner strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6d28d9;
}
.ci-webmaster-opt-banner ul {
  margin: 0;
  padding-left: 1.15rem;
}

/* Fonte de ajuda na página (clonada para o painel) */
#ci-page-help-content {
  display: none !important;
}

body.ci-page-help-panel-open {
  overflow: hidden;
}
