/* Documentation layout — shared by /chrome-extensions/extensio/docs/* */

.docs-hero {
    padding: 120px 0 40px;
    background: var(--background);
}

.docs-hero h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0.75rem 0 0.5rem;
}

.docs-hero .docs-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 640px;
}

.docs-container {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 3rem;
    align-items: start;
    padding-bottom: 5rem;
}

/* Sidebar */
.docs-sidebar {
    position: sticky;
    top: 90px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--background-card);
    padding: 1rem;
}

.docs-sidebar .docs-sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0 0 0.5rem 0.5rem;
}

.docs-sidebar a {
    display: block;
    padding: 0.45rem 0.5rem;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.925rem;
    transition: var(--transition);
}

.docs-sidebar a:hover {
    background: var(--background);
    color: var(--text-primary);
}

.docs-sidebar a.active {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
}

body.dark-mode .docs-sidebar {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .docs-sidebar a:hover {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .docs-sidebar a.active {
    background: rgba(249, 115, 22, 0.15);
    color: var(--secondary);
}

/* Article */
.docs-article {
    min-width: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.75;
}

.docs-article h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2.5rem 0 0.75rem;
    scroll-margin-top: 90px;
}

.docs-article h2:first-child {
    margin-top: 0;
}

.docs-article h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.75rem 0 0.5rem;
    scroll-margin-top: 90px;
}

.docs-article p {
    margin: 0 0 1rem;
}

.docs-article ul,
.docs-article ol {
    margin: 0 0 1rem;
    padding-left: 1.4rem;
}

.docs-article li {
    margin-bottom: 0.4rem;
}

.docs-article a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
}

.docs-article a:hover {
    text-decoration: underline;
}

.docs-article code {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.1rem 0.4rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.875em;
    color: var(--text-primary);
}

body.dark-mode .docs-article code {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.docs-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.25rem;
    font-size: 0.925rem;
}

.docs-article th,
.docs-article td {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.docs-article th {
    color: var(--text-primary);
    font-weight: 600;
}

body.dark-mode .docs-article th,
body.dark-mode .docs-article td {
    border-color: rgba(255, 255, 255, 0.08);
}

/* Callouts */
.docs-note,
.docs-tip,
.docs-premium {
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    margin: 0 0 1.25rem;
    font-size: 0.95rem;
    border: 1px solid;
}

.docs-note {
    background: var(--background);
    border-color: var(--border);
}

.docs-tip {
    background: rgba(34, 197, 94, 0.06);
    border-color: rgba(34, 197, 94, 0.25);
}

.docs-premium {
    background: var(--primary-light);
    border-color: var(--accent);
}

body.dark-mode .docs-note {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .docs-premium {
    background: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.3);
}

.docs-premium strong:first-child::before {
    content: "👑 ";
}

/* Step list */
.docs-steps {
    counter-reset: docs-step;
    list-style: none;
    padding-left: 0;
}

.docs-steps > li {
    counter-increment: docs-step;
    position: relative;
    padding-left: 2.6rem;
    margin-bottom: 1rem;
}

.docs-steps > li::before {
    content: counter(docs-step);
    position: absolute;
    left: 0;
    top: 0.05rem;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Docs hub cards */
.docs-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.docs-card {
    display: block;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--background-card);
    padding: 1.4rem;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.docs-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary);
}

.docs-card .docs-card-icon {
    font-size: 1.6rem;
    margin-bottom: 0.6rem;
}

.docs-card h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.docs-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

body.dark-mode .docs-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Prev/next footer nav */
.docs-pager {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

body.dark-mode .docs-pager {
    border-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 860px) {
    .docs-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .docs-sidebar {
        position: static;
    }

    .docs-hero {
        padding-top: 100px;
    }

    .docs-hero h1 {
        font-size: 1.75rem;
    }
}
