/* docs.css — стили документации Smartello */

/* ===========================
   Docs layout
   =========================== */

.docs-layout {
    display: flex;
    gap: 24px;
    width: 100%;
    max-width: 1100px;
    padding: 0 16px;
    box-sizing: border-box;
    align-items: flex-start;
}

/* ===========================
   Sidebar
   =========================== */

.docs-sidebar-wrapper {
    width: 260px;
    min-width: 260px;
    position: sticky;
    top: 88px;
}

.docs-sidebar {
    background: #ffffff;
    border-radius: 22px;
    box-shadow:
        0 26px 60px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.04);
    padding: 24px 18px;
    box-sizing: border-box;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #aaa;
    margin-bottom: 8px;
    padding: 0 10px;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 2px;
}

.sidebar-link {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    color: #555;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-link:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #222;
}

.sidebar-link.is-active {
    background: #e6f7ec;
    color: #1a8f2e;
    font-weight: 500;
}

/* ===========================
   Mobile sidebar toggle
   =========================== */

.docs-sidebar-toggle-input {
    display: none;
}

.docs-sidebar-toggle-label {
    display: none;
    width: 100%;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
    padding: 14px 18px;
    box-sizing: border-box;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    margin-bottom: 12px;
    user-select: none;
}

.docs-sidebar-toggle-label svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

/* ===========================
   Main content
   =========================== */

.docs-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.docs-content {
    background: #ffffff;
    border-radius: 22px;
    box-shadow:
        0 26px 60px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.04);
    padding: 48px 52px;
    box-sizing: border-box;
}

/* ===========================
   Article typography
   =========================== */

.docs-article h1 {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 30px;
    color: #111;
    letter-spacing: -0.2px;
}

.docs-article h2 {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
    margin: 36px 0 12px;
    color: #111;
}

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

.docs-article h3 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin: 28px 0 10px;
    color: #222;
}

.docs-article p {
    font-size: 16px;
    line-height: 1.75;
    margin: 0 0 14px;
    color: #333;
}

.docs-article p:last-child {
    margin-bottom: 0;
}

.docs-article ul,
.docs-article ol {
    margin: 4px 0 16px;
    padding-left: 22px;
}

.docs-article li {
    font-size: 16px;
    line-height: 1.65;
    margin-bottom: 6px;
    color: #333;
}

.docs-article a {
    color: #1a8f2e;
    text-decoration: none;
}

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

.docs-article strong {
    font-weight: 600;
    color: #222;
}

/* Blockquotes */
.docs-article blockquote {
    border-left: 4px solid #ccc;
    padding: 14px 18px;
    margin: 22px 0;
    background: rgba(0, 0, 0, 0.025);
    border-radius: 0 10px 10px 0;
}

.docs-article blockquote p {
    margin: 0 0 8px;
    font-size: 15px;
}

.docs-article blockquote p:last-child {
    margin-bottom: 0;
}

.docs-article blockquote.note-warning {
    border-left-color: #d32f2f;
    background: rgba(211, 47, 47, 0.04);
}

.docs-article blockquote.note-info {
    border-left-color: #1976d2;
    background: rgba(25, 118, 210, 0.04);
}

/* Images */
.docs-article img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    margin: 16px 0;
    display: block;
}

/* Accent colors */
.text-danger { color: #d32f2f; }

/* ===========================
   Article bottom navigation
   =========================== */

.docs-article-nav {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 12px;
    background: #ffffff;
    border-radius: 22px;
    box-shadow:
        0 26px 60px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.04);
    padding: 18px 24px;
    box-sizing: border-box;
}

.docs-nav-btn {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 10px;
    transition: background 0.15s ease;
    min-width: 0;
}

.docs-nav-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

.docs-nav-btn--next {
    text-align: right;
    margin-left: auto;
}

.docs-nav-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #aaa;
}

.docs-nav-title {
    font-size: 14px;
    font-weight: 500;
    color: #222;
}

/* ===========================
   Category page (index of a section)
   =========================== */

.docs-category-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.docs-category-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.docs-category-item:hover {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.12);
}

.docs-category-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #e6f7ec;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.docs-category-item-body {
    min-width: 0;
}

.docs-category-item-title {
    font-size: 15px;
    font-weight: 600;
    color: #111;
    margin-bottom: 2px;
}

.docs-category-item-arrow {
    margin-left: auto;
    color: #ccc;
    flex-shrink: 0;
}

/* ===========================
   Index page (docs home)
   =========================== */

.docs-index-content {
    background: #ffffff;
    border-radius: 22px;
    box-shadow:
        0 26px 60px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.04);
    padding: 48px 52px;
    box-sizing: border-box;
    width: 100%;
    max-width: 1100px;
    padding-left: calc(16px + 260px + 24px);
    padding-right: 16px;
}

.docs-index-section {
    margin-bottom: 40px;
}

.docs-index-section:last-child {
    margin-bottom: 0;
}

.docs-index-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.docs-index-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #111;
}

.docs-index-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 680px) {
    .docs-index-links {
        grid-template-columns: 1fr;
    }
}

.docs-index-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.docs-index-link:hover {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.13);
}

.docs-index-link-num {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #e6f7ec;
    color: #1a8f2e;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.docs-index-link-title {
    font-size: 14px;
    font-weight: 500;
    color: #222;
    line-height: 1.35;
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 900px) {
    .docs-layout {
        flex-direction: column;
    }

    .docs-sidebar-wrapper {
        width: 100%;
        min-width: 0;
        position: static;
    }

    .docs-sidebar-toggle-label {
        display: flex;
    }

    .docs-sidebar-toggle-input:not(:checked) ~ .docs-sidebar {
        display: none;
    }

    .docs-sidebar-toggle-input:checked ~ .docs-sidebar-toggle-label svg {
        transform: rotate(180deg);
    }

    .docs-sidebar {
        max-height: none;
        margin-top: 0;
        border-radius: 16px;
    }

    .docs-content {
        padding: 28px 24px;
    }

    .docs-article h1 {
        font-size: 24px;
        margin-bottom: 22px;
    }

    .docs-article h2 {
        font-size: 19px;
    }

    .docs-index-content {
        padding: 28px 24px;
    }
}

@media (max-width: 600px) {
    .docs-content {
        padding: 22px 18px;
    }

    .docs-article-nav {
        flex-direction: column;
        padding: 14px 16px;
    }

    .docs-nav-btn--next {
        text-align: left;
        margin-left: 0;
    }
}
