/* =========================================================
   GDrive Desktop — Documentação
   Estilos compartilhados pelas páginas em /docs
   ========================================================= */

.docs-body {
  background-color: #0b0f19;
  color: #cbd5e1;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(900px 480px at 8% -8%, rgba(66, 133, 244, 0.14), transparent 60%),
    radial-gradient(700px 460px at 96% 2%, rgba(52, 168, 83, 0.10), transparent 60%);
  background-attachment: fixed;
}

.docs-body h1, .docs-body h2, .docs-body h3, .docs-body h4 {
  color: #fff;
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.02em;
  scroll-margin-top: 6rem;
}

/* ---------- Sidebar ---------- */
.docs-sidebar {
  position: sticky;
  top: 6rem;
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  padding-right: .5rem;
}
.docs-sidebar::-webkit-scrollbar { width: 6px; }
.docs-sidebar::-webkit-scrollbar-track { background: transparent; }
.docs-sidebar::-webkit-scrollbar-thumb { background: #26304a; border-radius: 999px; }

.side-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  border-radius: .6rem;
  padding: .5rem .75rem;
  font-size: .875rem;
  color: #94a3b8;
  transition: all .2s;
  text-decoration: none;
}
.side-link:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.side-link.active {
  background: linear-gradient(135deg, rgba(66, 133, 244, .18), rgba(66, 133, 244, .06));
  color: #fff;
  box-shadow: inset 2px 0 0 #4285f4;
}
.side-link .side-num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .7rem;
  color: #475569;
}
.side-link.active .side-num { color: #4285f4; }

/* ---------- Article typography ---------- */
.article { font-size: 1rem; line-height: 1.75; }
.article p { margin: 1rem 0; color: #b6c2d2; }
.article ul, .article ol { margin: 1rem 0 1rem 1.25rem; color: #b6c2d2; }
.article ul { list-style: disc; }
.article ol { list-style: decimal; }
.article li { margin: .45rem 0; padding-left: .25rem; }
.article li::marker { color: #4285f4; }
.article strong { color: #fff; font-weight: 600; }
.article a { color: #8ab4f8; text-decoration: underline; text-underline-offset: 3px; }
.article a:hover { color: #b3d0ff; }

.article h1 {
  font-size: 2.1rem;
  font-weight: 700;
  margin: .35rem 0 1.25rem;
  line-height: 1.2;
}
.article h2 {
  font-size: 1.55rem;
  font-weight: 700;
  margin: 2.75rem 0 1rem;
  padding-top: .5rem;
  border-top: 1px solid rgba(255, 255, 255, .07);
}
.article h3 { font-size: 1.15rem; font-weight: 600; margin: 2rem 0 .75rem; }
.article h4 { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 .5rem; color: #cbd5e1; }

/* ---------- Tables ---------- */
.docs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  font-size: .875rem;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: .75rem;
  overflow: hidden;
  display: block;
  overflow-x: auto;
}
.docs-table thead { background: rgba(255, 255, 255, .05); }
.docs-table th {
  text-align: left;
  padding: .75rem 1rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.docs-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
  color: #94a3b8;
  vertical-align: top;
}
.docs-table tr:last-child td { border-bottom: none; }
.docs-table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.docs-table code { color: #8ab4f8; }

/* ---------- Inline code ---------- */
.article code:not(pre code):not(.code-block code) {
  background: rgba(66, 133, 244, .12);
  border: 1px solid rgba(66, 133, 244, .22);
  color: #a8c7fa;
  padding: .12rem .4rem;
  border-radius: .35rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .82em;
  white-space: nowrap;
}

/* ---------- Code block ---------- */
.code-block {
  position: relative;
  background: rgba(4, 8, 16, .9);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: .75rem;
  padding: 1rem 1.1rem;
  margin: 1.25rem 0;
  overflow-x: auto;
}
.code-block code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: .82rem;
  line-height: 1.7;
  color: #cbd5e1;
  white-space: pre;
}
.code-block .copy-btn {
  position: absolute;
  top: .6rem;
  right: .6rem;
  border-radius: .5rem;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .06);
  color: #94a3b8;
  font-size: .7rem;
  padding: .25rem .55rem;
  transition: all .2s;
  cursor: pointer;
}
.code-block .copy-btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.code-block .copy-btn.ok { color: #34a853; border-color: rgba(52, 168, 83, .45); }

/* ---------- Callouts ---------- */
.callout {
  display: flex;
  gap: .85rem;
  border-radius: .85rem;
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
  font-size: .92rem;
  line-height: 1.65;
  border: 1px solid;
}
.callout p { margin: .35rem 0; color: inherit; }
.callout .callout-title { font-weight: 700; color: #fff; display: block; margin-bottom: .2rem; }
.callout-note  { background: rgba(66, 133, 244, .09);  border-color: rgba(66, 133, 244, .3);  color: #cfe0fd; }
.callout-tip   { background: rgba(52, 168, 83, .09);   border-color: rgba(52, 168, 83, .32);  color: #cdebd7; }
.callout-warn  { background: rgba(251, 188, 4, .09);   border-color: rgba(251, 188, 4, .32);  color: #f7e3ac; }
.callout-danger{ background: rgba(234, 67, 53, .09);   border-color: rgba(234, 67, 53, .32);  color: #f7c9c5; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; list-style: none; margin: 1.5rem 0; padding: 0; }
.steps > li {
  position: relative;
  padding-left: 2.6rem;
  margin: 1.25rem 0;
  counter-increment: step;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -.1rem;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #4285f4, #1a73e8);
  box-shadow: 0 6px 16px -6px rgba(66, 133, 244, .8);
}

/* ---------- Cards ---------- */
.doc-card {
  display: block;
  border-radius: .9rem;
  border: 1px solid rgba(255, 255, 255, .09);
  background: linear-gradient(160deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015));
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s, box-shadow .3s;
}
.doc-card:hover {
  transform: translateY(-4px);
  border-color: rgba(66, 133, 244, .45);
  box-shadow: 0 18px 44px -22px rgba(66, 133, 244, .6);
}
.article a.doc-card,
.article a.doc-card:visited {
  color: inherit;
  text-decoration: none;
}
.article a.doc-card:hover { color: inherit; }
.doc-card h3 { font-size: 1rem; font-weight: 600; color: #fff; margin: .6rem 0 .3rem; text-decoration: none; }
.doc-card p { font-size: .84rem; color: #94a3b8; margin: 0; line-height: 1.6; text-decoration: none; }
.doc-card code {
  color: #a8c7fa !important;
  background: rgba(66, 133, 244, .12) !important;
  border-color: rgba(66, 133, 244, .22) !important;
}

/* ---------- TOC ---------- */
.toc a {
  display: block;
  padding: .3rem 0 .3rem .8rem;
  font-size: .8rem;
  color: #64748b;
  border-left: 1px solid rgba(255, 255, 255, .08);
  transition: all .2s;
  text-decoration: none;
}
.toc a:hover { color: #cbd5e1; border-left-color: #4285f4; }

/* ---------- Reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s cubic-bezier(.2,.8,.2,1), transform .6s cubic-bezier(.2,.8,.2,1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Breadcrumb ---------- */
.crumb { font-size: .78rem; color: #64748b; }
.crumb a { color: #94a3b8; text-decoration: none; }
.crumb a:hover { color: #fff; }

/* ---------- Nav pills ---------- */
.mobile-docs-nav {
  border-top: 1px solid rgba(255, 255, 255, .05);
  scrollbar-width: none;
}
.mobile-docs-nav::-webkit-scrollbar { display: none; }
.mobile-doc-link {
  flex: 0 0 auto;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .04);
  padding: .3rem .75rem;
  font-size: .75rem;
  color: #94a3b8;
  text-decoration: none;
  transition: all .2s;
}
.mobile-doc-link:hover { color: #fff; background: rgba(255, 255, 255, .09); }
.mobile-doc-link.active {
  color: #fff;
  border-color: rgba(66, 133, 244, .5);
  background: rgba(66, 133, 244, .16);
}

.doc-nav { display: flex; gap: .75rem; flex-wrap: wrap; }.doc-nav a {
  flex: 1 1 240px;
  border-radius: .8rem;
  border: 1px solid rgba(255, 255, 255, .09);
  padding: .85rem 1.1rem;
  text-decoration: none;
  transition: all .25s;
}
.doc-nav a:hover { border-color: rgba(66, 133, 244, .45); background: rgba(255, 255, 255, .03); }
.doc-nav .lbl { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #64748b; }
.doc-nav .ttl { font-weight: 600; color: #fff; font-size: .92rem; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0b0f19; }
::-webkit-scrollbar-thumb { background: #26304a; border-radius: 999px; border: 2px solid #0b0f19; }
::-webkit-scrollbar-thumb:hover { background: #3a4767; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
