/*
  CanooHub Manual — layout 2-colunas (sidebar sticky + conteúdo)
  Carrega em adição ao canoohub-landing.css.
*/

/* ---- Body / chrome do manual ---- */
.manual-body {
  background: #fff;
}

/* Header simplificado: sólido desde o início, sem scroll effect */
.manual-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid rgba(11, 79, 108, 0.08);
  padding: 0 24px;
}

.manual-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
}

.manual-header .logo {
  color: #0B4F6C;
  font-size: 1.2rem;
  margin-left: auto;
}

.manual-header .logo .logo-icon {
  background: rgba(11, 79, 108, 0.1);
  width: 32px;
  height: 32px;
}

.manual-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #4A6274;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}

.manual-back:hover {
  background: rgba(11, 79, 108, 0.06);
  color: #0B4F6C;
}

.manual-header .lang-switch {
  background: rgba(11, 79, 108, 0.06);
}

.manual-header .lang-switch button {
  color: #8A9BAA;
}

.manual-header .lang-switch button.active {
  background: #0B4F6C;
  color: #fff;
}

.manual-sidebar-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  border-radius: 8px;
  color: #0B4F6C;
  cursor: pointer;
  font-size: 1.4rem;
}

.manual-sidebar-toggle:hover {
  background: rgba(11, 79, 108, 0.06);
}

/* ---- Shell ---- */
.manual-shell {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  padding: 0 24px;
  align-items: flex-start;
}

/* ---- Sidebar ---- */
.manual-sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  padding: 24px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(11, 79, 108, 0.2) transparent;
}

.manual-sidebar::-webkit-scrollbar {
  width: 6px;
}

.manual-sidebar::-webkit-scrollbar-thumb {
  background: rgba(11, 79, 108, 0.2);
  border-radius: 3px;
}

.manual-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.manual-sidebar-head h2 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8A9BAA;
}

.manual-sidebar-close {
  display: none;
  background: none;
  border: none;
  padding: 6px;
  border-radius: 8px;
  color: #4A6274;
  cursor: pointer;
}

.manual-search-wrap {
  position: relative;
  margin-bottom: 16px;
}

.manual-search-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: #8A9BAA;
  font-size: 0.95rem;
  pointer-events: none;
}

.manual-search {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border-radius: 10px;
  border: 1px solid rgba(11, 79, 108, 0.12);
  background: #F7FAFB;
  font-family: inherit;
  font-size: 0.88rem;
  color: #1A2B3C;
  transition: all 0.2s;
}

.manual-search:focus {
  outline: none;
  border-color: #20B2AA;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(32, 178, 170, 0.12);
}

.manual-toc {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.manual-toc a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  color: #4A6274;
  border-left: 2px solid transparent;
  transition: all 0.2s;
}

.manual-toc a:hover {
  background: rgba(11, 79, 108, 0.04);
  color: #0B4F6C;
}

.manual-toc a.active {
  color: #0B4F6C;
  font-weight: 600;
  background: rgba(32, 178, 170, 0.08);
  border-left-color: #20B2AA;
}

.manual-toc a.hidden {
  display: none;
}

/* Overlay para sidebar drawer no mobile */
.manual-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 79, 108, 0.4);
  z-index: 95;
  backdrop-filter: blur(2px);
}

.manual-overlay.open {
  display: block;
}

/* ---- Conteúdo ---- */
.manual-content {
  max-width: 760px;
  padding: 32px 0 80px;
}

.manual-hero {
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(11, 79, 108, 0.08);
  margin-bottom: 56px;
}

.manual-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #20B2AA;
  margin-bottom: 12px;
}

.manual-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: #0B4F6C;
  margin-bottom: 16px;
}

.manual-hero-lead {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #4A6274;
}

/* ---- Section ---- */
.manual-section {
  scroll-margin-top: 88px;
  padding: 56px 0;
  border-bottom: 1px solid rgba(11, 79, 108, 0.06);
}

.manual-section:last-of-type {
  border-bottom: none;
}

.manual-section-header {
  position: relative;
  margin-bottom: 24px;
  padding-right: 40px;
}

.manual-section-header h2 {
  font-size: 1.6rem;
  color: #0B4F6C;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.manual-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.manual-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.manual-tag.type-config  { background: rgba(11, 79, 108, 0.08);  color: #0B4F6C; }
.manual-tag.type-auto    { background: rgba(32, 178, 170, 0.12); color: #0E6B5E; }
.manual-tag.type-manual  { background: rgba(74, 98, 116, 0.10);  color: #4A6274; }
.manual-tag.type-public  { background: rgba(32, 178, 170, 0.12); color: #0E6B5E; }
.manual-tag.type-single  { background: rgba(74, 98, 116, 0.10);  color: #4A6274; }
.manual-tag.type-ai      { background: rgba(255, 140, 66, 0.12); color: #D06B1F; }
.manual-tag.type-optin   { background: rgba(74, 98, 116, 0.10);  color: #4A6274; }
.manual-tag.type-web     { background: rgba(32, 178, 170, 0.12); color: #0E6B5E; }
.manual-tag.type-noapp   { background: rgba(255, 140, 66, 0.12); color: #D06B1F; }

.manual-anchor {
  position: absolute;
  top: 8px;
  right: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #8A9BAA;
  font-size: 0.95rem;
  opacity: 0;
  transition: all 0.2s;
}

.manual-section:hover .manual-anchor {
  opacity: 1;
}

.manual-anchor:hover {
  background: rgba(11, 79, 108, 0.06);
  color: #0B4F6C;
}

.manual-section h3 {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #20B2AA;
  margin-top: 28px;
  margin-bottom: 12px;
  font-weight: 700;
}

.manual-section h3:first-child {
  margin-top: 0;
}

.manual-section p {
  color: #1A2B3C;
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.manual-section ul {
  padding-left: 0;
}

.manual-section ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
  font-size: 0.98rem;
  line-height: 1.65;
  color: #1A2B3C;
}

.manual-section ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.7em;
  width: 6px;
  height: 6px;
  background: #20B2AA;
  border-radius: 50%;
}

.manual-section ul li strong {
  color: #0B4F6C;
}

.manual-section em {
  color: #4A6274;
  font-style: italic;
}

/* ---- Bottom CTA ---- */
.manual-bottom-cta {
  margin-top: 80px;
  padding: 56px 40px;
  border-radius: 20px;
  background: linear-gradient(160deg, #0B4F6C 0%, #0E6B5E 50%, #20B2AA 100%);
  text-align: center;
  color: #fff;
}

.manual-bottom-cta h2 {
  color: #fff;
  margin-bottom: 12px;
}

.manual-bottom-cta p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.05rem;
  margin-bottom: 28px;
}

/* ---- Responsive ---- */
@media (max-width: 992px) {
  .manual-shell {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .manual-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .manual-back span {
    display: none;
  }

  .manual-back {
    padding: 8px;
  }

  .manual-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    bottom: 0;
    width: 300px;
    max-height: 100vh;
    background: #fff;
    padding: 24px;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.12);
    z-index: 100;
    transition: left 0.3s ease;
  }

  .manual-sidebar.open {
    left: 0;
  }

  .manual-sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .manual-content {
    padding: 24px 0 64px;
  }
}

@media (max-width: 600px) {
  .manual-header-inner {
    height: 56px;
    gap: 8px;
  }

  .manual-header .logo {
    font-size: 1rem;
  }

  .manual-content {
    padding: 16px 0 48px;
  }

  .manual-section {
    padding: 40px 0;
  }

  .manual-section-header h2 {
    font-size: 1.35rem;
  }

  .manual-bottom-cta {
    padding: 40px 24px;
  }
}
