/* ─── Documentation Layout ─────────────────────────────────────────────── */
.doc-page-layout {
    display: flex;
    align-items: flex-start;
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
}

/* ─── Sidebar ────────────────────────────────────────────────────────────── */
.doc-sidebar {
    width: 224px;
    min-width: 224px;
    flex-shrink: 0;
    position: sticky;
    top: 64px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    background: var(--slate-50);
    border-right: 1px solid var(--slate-200);
    padding: 2rem 0;
    z-index: 10;
}

.doc-sidebar-group {
    margin-bottom: 1.5rem;
}

.doc-search {
    padding: 0 0 1.25rem;
}

.doc-search input {
    box-sizing: border-box;
    width: 100%;
    border: 1px solid var(--slate-200);
    border-radius: 0;
    padding: 0.65rem 0.9rem;
    background: white;
    color: var(--slate-900);
    font: inherit;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.doc-search input:focus {
    outline: 3px solid rgba(20, 184, 166, 0.24);
    border-color: var(--teal-500);
}

.doc-sidebar-group[hidden],
.doc-nav-item[hidden] {
    display: none;
}

.doc-sidebar-label {
    display: block;
    padding: 0 1.125rem 0.5rem calc(1.125rem - 10px);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-500);
}

.doc-nav-item {
    display: block;
    padding: 0.5rem 1.125rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--slate-700);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.doc-nav-item:hover {
    background: var(--slate-100);
    color: var(--teal-600);
}

.doc-nav-item.active {
    background: white;
    color: var(--teal-600);
    font-weight: 600;
    border-left-color: var(--teal-600);
}

/* ─── Content ────────────────────────────────────────────────────────────── */
.doc-content {
    flex: 1;
    min-width: 0;
    padding: 1.5rem 1.25rem;
    line-height: 1.6;
}

.doc-article {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
}

.doc-article > :not(.sshot-section) {
    max-width: min(860px, 100%);
    min-width: 0;
}

.doc-content .container {
    width: 100%;
    max-width: 100%;
}

.doc-article h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--navy-900);
}

.doc-article .lead {
    font-size: 1.2rem;
    color: var(--slate-600);
    margin-bottom: 1.25rem;
}

.doc-article h2 {
    font-size: 1.75rem;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--slate-200);
    padding-bottom: 0.5rem;
}

.doc-article p {
    margin-bottom: 1.25rem;
}

.doc-article ul, .doc-article ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.doc-article li {
    margin-bottom: 0.5rem;
}

.doc-article table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
}

.doc-article th,
.doc-article td {
    white-space: normal;
    vertical-align: top;
}

.doc-info-box {
    background: var(--teal-100);
    border-left: 4px solid var(--teal-500);
    padding: 1.25rem;
    margin: 1.25rem 0;
    border-radius: 0 8px 8px 0;
}

.doc-page-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    gap: 1rem;
    align-items: start;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 1120px;
    min-width: 0;
}

.doc-body-search,
.doc-page-toc {
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    background: white;
    padding: 1rem;
    min-width: 0;
}

.doc-body-search label,
.doc-page-toc-title {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--navy-900);
    font-weight: 700;
}

.doc-body-search input {
    width: 100%;
    border: 1px solid var(--slate-200);
    border-radius: 999px;
    padding: 0.65rem 0.9rem;
    font: inherit;
}

.doc-body-search input:focus {
    outline: 3px solid rgba(20, 184, 166, 0.24);
    border-color: var(--teal-500);
}

.doc-body-search-status {
    margin: 0.55rem 0 0;
    color: var(--slate-500);
    font-size: 0.88rem;
}

.doc-page-toc ol {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding-left: 1.15rem;
}

.doc-page-toc a {
    color: var(--slate-700);
    text-decoration: none;
}

.doc-page-toc a:hover {
    color: var(--teal-600);
}

.doc-search-hit {
    border-radius: 6px;
    background: rgba(245, 158, 11, 0.16);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.doc-screenshot {
    margin: 1.25rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid var(--slate-200);
}

.doc-screenshot img {
    width: 100%;
    display: block;
}

.doc-content .sshot-section {
    margin: 2rem 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    background: transparent;
    border-top: none;
}

.doc-content .sshot-section .container {
    margin: 0;
}

.doc-content .sshot-carousel-wrap {
    width: 100%;
    max-width: 100%;
}

.doc-content .sshot-heading {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 0.85rem;
}

.doc-content .sshot-carousel {
    position: relative;
    width: 100%;
    max-width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--slate-200);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
    user-select: none;
}

.doc-content .sshot-track {
    position: relative;
    width: 100%;
    height: 500px;
    max-width: 100%;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.98));
}

.doc-content .sshot-slide {
    display: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-width: 100%;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.doc-content .sshot-slide.is-active {
    display: flex;
}

.doc-content .sshot-slide img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center top;
    display: block;
    cursor: zoom-in;
}

.doc-content .sshot-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.85);
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.28);
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
    z-index: 5;
}

.doc-content .sshot-btn:hover {
    background: rgba(15, 23, 42, 0.94);
    transform: translateY(-50%) scale(1.03);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.32);
}

.doc-content .sshot-btn:focus-visible {
    outline: 3px solid rgba(20, 184, 166, 0.45);
    outline-offset: 2px;
}

.doc-content .sshot-btn svg {
    width: 20px;
    height: 20px;
    display: block;
    flex: 0 0 auto;
}

.doc-content .sshot-prev {
    left: 14px;
}

.doc-content .sshot-next {
    right: 14px;
}

.doc-content .sshot-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem 1rem;
    background: var(--slate-50);
    border-top: 1px solid var(--slate-200);
}

.doc-content .sshot-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.doc-content .sshot-dots {
    display: flex;
    gap: 6px;
}

.doc-content .sshot-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1px solid var(--slate-400);
    background: white;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.doc-content .sshot-dot.is-active {
    background: var(--teal-500);
    border-color: var(--teal-600);
    transform: scale(1.25);
}

.doc-content .sshot-count {
    margin: 0;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    background: white;
    border: 1px solid var(--slate-300);
    color: var(--slate-700);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.doc-content .sshot-caption {
    font-size: 0.88rem;
    color: var(--slate-600);
    margin: 0;
    text-align: center;
    max-width: 900px;
}

.doc-content .sshot-single .sshot-btn {
    display: none;
}

.doc-image-lightbox[hidden] {
    display: none;
}

.doc-image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(10px);
}

.doc-image-lightbox__panel {
    width: min(96vw, 1800px);
    max-height: 96vh;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.doc-image-lightbox__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: white;
}

.doc-image-lightbox__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.doc-image-lightbox__close {
    border: none;
    border-radius: 999px;
    padding: 0.55rem 0.85rem;
    background: rgba(255, 255, 255, 0.14);
    color: white;
    font: inherit;
    cursor: pointer;
}

.doc-image-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.doc-image-lightbox__viewport {
    overflow: auto;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

.doc-image-lightbox__image {
    display: block;
    width: auto;
    max-width: none;
    height: auto;
}

.doc-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.5rem 0 2rem;
}

.doc-feature-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    padding: 1.25rem;
    background: white;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.doc-feature-card:hover {
    transform: translateY(-2px);
    border-color: var(--teal-500);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.doc-feature-card strong {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--navy-900);
}

.doc-feature-card span {
    display: block;
    color: var(--slate-600);
    font-size: 0.92rem;
}

.doc-user-guide {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--slate-200);
}

.doc-conversion-panel {
    margin: 2.25rem 0 2rem;
    padding: 2rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(15, 118, 110, 0.18);
}

body.wp-theme-serviceopus:not(.builder-shell-body):not(.forum-body) .doc-conversion-panel {
    padding: 2rem;
}

.doc-conversion-panel h2 {
    font-size: 1.4rem;
    margin: 0 0 0.65rem;
    border-bottom: none;
    padding-bottom: 0;
}

.doc-conversion-panel p {
    max-width: 62ch;
    margin: 0 0 1.25rem;
    color: var(--slate-700);
    font-size: 0.95rem;
}

.doc-conversion-panel .cta-buttons {
    margin-top: 0;
    gap: 0.75rem;
}

.doc-page-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.75rem;
}

.doc-page-nav-link {
    display: grid;
    gap: 0.3rem;
    padding: 1rem;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    background: white;
    text-decoration: none;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.doc-page-nav-link:hover {
    border-color: var(--teal-500);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.doc-page-nav-link.next {
    text-align: right;
}

.doc-page-nav-label {
    color: var(--slate-500);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.doc-page-nav-title {
    color: var(--navy-900);
    font-weight: 700;
}

.doc-guide-outcome {
    font-size: 1.05rem;
    color: var(--slate-700);
}

.doc-guide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.25rem 0 1.75rem;
}

.doc-guide-panel {
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    padding: 1.15rem;
    background: white;
}

.doc-guide-panel h3,
.doc-user-guide > h3 {
    margin-top: 0;
    color: var(--navy-900);
}

.doc-guide-panel h3 {
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}

.doc-user-guide > h3 {
    font-size: 1.2rem;
    margin-bottom: 0.9rem;
}

.doc-guide-panel ul,
.doc-guide-steps {
    margin-bottom: 0;
}

.doc-guide-panel li,
.doc-guide-steps li {
    color: var(--slate-700);
}

.doc-guide-steps {
    display: grid;
    gap: 0.75rem;
    padding-left: 1.25rem;
    margin: 0 0 1.75rem;
}

.doc-guide-steps li {
    padding-left: 0.25rem;
}

@media (max-width: 1024px) {
    .doc-content { padding: 1.25rem 1rem; }
    .doc-sidebar { width: 224px; min-width: 224px; }
}

@media (max-width: 680px) {
    .doc-content .sshot-btn {
        width: 34px;
        height: 34px;
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .doc-page-layout { flex-direction: column; }
    .doc-sidebar { 
        width: 100%; 
        position: static; 
        max-height: none; 
        border-right: none; 
        border-bottom: 1px solid var(--slate-200);
        padding: 0.65rem;
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .doc-content { padding: 1rem 0.75rem; }
    .doc-search {
        min-width: 220px;
        padding: 0;
    }
    .doc-search input {
        padding: 0.55rem 0.8rem;
    }
    .doc-sidebar-group {
        display: flex;
        flex-shrink: 0;
        margin: 0;
    }
    .doc-sidebar-items {
        display: flex;
        gap: 0.35rem;
    }
    .doc-sidebar-label {
        display: none;
    }
    .doc-nav-item {
        white-space: nowrap;
        border-left: 0;
        border-bottom: 2px solid transparent;
        border-radius: 999px;
        padding: 0.55rem 0.8rem;
        background: white;
    }
    .doc-nav-item.active {
        border-bottom-color: var(--teal-600);
        background: rgba(15, 118, 110, 0.1);
    }
    .doc-feature-grid { grid-template-columns: 1fr; }
    .doc-guide-grid { grid-template-columns: 1fr; }
    .doc-page-tools { grid-template-columns: 1fr; }
    .doc-page-nav { grid-template-columns: 1fr; }
    .doc-page-nav-link.next { text-align: left; }
    .doc-conversion-panel {
        margin: 1.5rem 0 1.25rem;
        padding: 1.25rem;
    }
    body.wp-theme-serviceopus:not(.builder-shell-body):not(.forum-body) .doc-conversion-panel {
        padding: 1.25rem;
    }
    .doc-conversion-panel h2 {
        font-size: 1.25rem;
    }
    .doc-content .sshot-section {
        width: 100%;
        max-width: 100%;
    }
}

/* Compact feature guide spacing */
body.wp-theme-serviceopus:not(.builder-shell-body):not(.forum-body) .doc-article section {
    padding: 0;
}

body.wp-theme-serviceopus:not(.builder-shell-body):not(.forum-body) .doc-content .sshot-section {
    padding: 1.75rem 0 1.25rem;
}

body.wp-theme-serviceopus:not(.builder-shell-body):not(.forum-body) .doc-article .doc-conversion-panel {
    padding: 1.6rem;
}

.doc-content {
    padding: 1.15rem 1rem;
}

.doc-sidebar {
    padding: 0 0 1.25rem;
}

.doc-sidebar-group {
    margin-bottom: 1rem;
}

.doc-search {
    padding: 0 0 0.85rem;
}

.doc-nav-item {
    padding: 0.42rem 1.125rem;
}

.doc-page-tools {
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.doc-body-search,
.doc-page-toc {
    padding: 0.85rem;
}

.doc-article h1 {
    margin-bottom: 0.65rem;
    font-size: 2.15rem;
}

.doc-article .lead {
    margin-bottom: 0.9rem;
    font-size: 1.08rem;
}

.doc-article h2 {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    font-size: 1.5rem;
}

.doc-article p,
.doc-article ul,
.doc-article ol {
    margin-bottom: 0.85rem;
}

.doc-article li {
    margin-bottom: 0.32rem;
}

.doc-info-box {
    margin: 0.95rem 0;
    padding: 1rem;
}

.doc-feature-grid,
.doc-guide-grid {
    gap: 0.85rem;
    margin: 1rem 0;
}

.doc-feature-card,
.doc-guide-panel {
    padding: 1rem;
}

.doc-user-guide {
    margin-top: 1.25rem;
    padding-top: 1rem;
}

.doc-guide-steps {
    margin-bottom: 1rem;
}

.doc-guide-steps li {
    padding: 0.65rem 0 0.65rem 0.25rem;
}

.doc-conversion-panel {
    margin: 1.5rem 0 1.25rem;
}

.doc-page-nav {
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.doc-page-nav-link {
    padding: 0.85rem;
}

@media (max-width: 768px) {
    .doc-content {
        padding: 0.75rem;
    }

    body.wp-theme-serviceopus:not(.builder-shell-body):not(.forum-body) .doc-article .doc-conversion-panel {
        padding: 1.1rem;
    }
}
