@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,300..900;1,300..900&display=swap');

/* =====================================================
REMOVE THEME WIDTH LIMITS
===================================================== */

.single-doc_page article,
.single-doc_page #primary,
.single-doc_page main:not(.doc-main),
.single-doc_page .content-area {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
}

body.single-doc_page h1.entry-title {
    font-size: 36px !important;
}


/* =====================================================
PAGE BACKGROUND
===================================================== */

body.single-doc_page {
    background: #f6f8fb;
    margin-top: 140px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* =====================================================
DOC WRAPPER
===================================================== */

.doc-wrapper {
    width: 100%;
}


/* =====================================================
MAIN FLEX LAYOUT  ⭐ CORE FIX
===================================================== */

.doc-layout {
    display: flex;
    flex-direction: row;
    align-items: flex-start;

    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 40px 0 0 0;
    padding: 0;
    gap: 0;
}

/* =====================================================
LARGE SCREENS (e.g., iMacs, Ultrawides)
===================================================== */
@media(min-width: 1440px) {
    .doc-layout {
        max-width: 100%;
        padding: 0;
    }
}

/* =====================================================
SIDEBAR NAVIGATION
===================================================== */
.doc-sidebar {
    width: 300px;
    min-width: 300px;
    background: transparent;
    padding: 0;
    box-sizing: border-box;
    position: sticky;
    top: 100px;
    max-height: calc(200vh - 120px);
    overflow-y: auto;
}

@media(min-width: 992px) {
    .doc-sidebar {
        margin-left: 20px;
    }
}

/* scrollbar styling for sidebar */
.doc-sidebar::-webkit-scrollbar {
    width: 6px;
}

.doc-sidebar::-webkit-scrollbar-thumb {
    background-color: #dfe1e6;
    border-radius: 4px;
}

/* Sidebar Accordion Styles */
.ior-tree-level {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: left !important;
}

.doc-children .ior-tree-level {
    padding-left: 20px !important;
}

.doc-page-item {
    margin: 2px 0;
    text-align: left !important;
}

.doc-item-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    text-align: left !important;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.1s;
    position: relative;
}

.doc-item-wrapper:hover {
    background: #ebecf0;
}

.doc-item-wrapper.active {
    background: #e6effc;
}

.doc-item-wrapper.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 3px;
    background-color: #0c66e4;
    border-radius: 0 3px 3px 0;
}

.doc-item-wrapper.active a {
    color: #0c66e4 !important;
}

.doc-item-wrapper a {
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    text-align: left !important;
    color: #344563 !important;
    /* Confluence text color */
    text-decoration: none !important;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    flex-grow: 1;
    border: none !important;
    box-shadow: none !important;
    padding-right: 20px !important;
}

.doc-item-wrapper a:hover {
    color: #172b4d !important;
    text-decoration: none !important;
}

.doc-toggle {
    cursor: pointer;
    font-size: 16px;
    width: 20px;
    height: 20px;
    line-height: 20px;
    color: #5e6c84;
    transition: transform 0.2s;
    margin-right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-toggle:hover {
    background: rgba(9, 32, 66, 0.08);
    border-radius: 3px;
}

.doc-toggle.expanded {
    transform: rotate(90deg);
}

.doc-toggle-placeholder {
    width: 20px;
    height: 20px;
    margin-right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #42526E;
    line-height: 1;
}

.doc-icon {
    font-size: 16px;
    line-height: 1.2;
    width: 20px;
    height: 16px;
    margin-right: 8px;
    color: #5e6c84;
}

.doc-item-wrapper.active .doc-icon {
    color: #0c66e4;
}

.doc-toc {
    width: 100%;
    box-sizing: border-box;
    background: #fafbfc;
    /* Confluence light gray */
    padding: 20px 25px;
    margin-bottom: 40px;
    border: 1px solid #dfe1e6;
    border-radius: 3px;
}

.doc-toc h3 {
    margin-top: 0;
    font-size: 18px;
    font-weight: 600;
    color: #172b4d;
    /* Confluence text color */
}

/* Base UL settings for counters */
.doc-toc ul {
    counter-reset: toc-item;
    list-style-type: none !important;
    margin: 0 !important;
    padding-left: 20px !important;
}

/* First level shouldn't have left padding since it's flush */
.doc-toc>ul {
    padding-left: 0 !important;
    margin-top: 10px !important;
}

.doc-toc li {
    position: relative;
    font-weight: 400;
    color: #172b4d;
    margin-bottom: 8px !important;
    margin-top: 8px !important;
    display: block;
    line-height: 1.4;
}

/* Generate numeric counter content (1. 1.1. 1.1.1.) */
.doc-toc li::before {
    counter-increment: toc-item;
    content: counters(toc-item, ".") " ";
    color: #5e6c84;
    font-size: 14px;
    margin-right: 6px;
    font-weight: 400;
}

.doc-toc a {
    color: #0052cc;
    font-weight: 400;
    /* Confluence link color */
    text-decoration: none;
    font-size: 16px;
}

.doc-toc a:hover {
    text-decoration: underline;
    color: #0052cc;
}

/* =====================================================
CONTENT AREA
===================================================== */

.doc-main {
    flex-grow: 1;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;

    background: #fff;
    padding: 10px 200px 40px 200px !important;

    border-radius: 0;
    box-shadow: none;
}




/* =====================================================
TYPOGRAPHY
===================================================== */

.doc-main h1,
.doc-main h2,
.doc-main h3,
.doc-main h4,
.doc-main h5,
.doc-main h6 {
    color: #172b4d;
    font-weight: 600;
    font-family: "Source Sans 3", sans-serif !important;
    line-height: 1.25 !important;
}

.doc-main h1 {
    font-size: 32px !important;
    margin-top: 40px !important;
    margin-bottom: 24px !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em !important;
}

.doc-main h2 {
    font-size: 28px !important;
    margin-top: 36px !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
    margin-bottom: 16px !important;
    line-height: 1.25 !important;
    letter-spacing: -0.01em !important;
}

.doc-main h3 {
    font-size: 24px !important;
    margin-top: 28px !important;
    margin-bottom: 12px !important;
    line-height: 1.3 !important;
}

.doc-main h4 {
    font-size: 22px !important;
    font-weight: 600 !important;
    margin-top: 24px !important;
    margin-bottom: 8px !important;
    line-height: 1.4 !important;
}

.doc-main p,
.doc-main li {
    font-family: "Source Sans 3", sans-serif !important;
    font-size: 16px !important;
    line-height: 1.66666667 !important;
    color: #172b4d;
    margin-top: 0 !important;
    margin-bottom: 16px !important;
}

.doc-content-inner a {
    color: #0052cc !important;
    text-decoration: none;
}

.doc-content-inner a:hover {
    color: #0052cc !important;
    text-decoration: underline;
}

.doc-main table:not(.hljs-ln),
.doc-main table:not(.hljs-ln) th,
.doc-main table:not(.hljs-ln) td {
    font-family: "Source Sans 3", sans-serif !important;
    font-size: 16px !important;
    color: #172b4d;
}

/* Reset Confluence Macro Wrappers */
.doc-main .code.panel,
.doc-main .codeContent.panelContent {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 16px !important;
}


/* =====================================================
LIST FIX
===================================================== */

.doc-main ul,
.doc-main ol {
    margin-top: 12px !important;
    margin-bottom: 16px !important;
    padding-left: 24px !important;
    /* Precise indentation */
}

.doc-main ul {
    list-style-type: disc !important;
    /* Confluence uses standard unicode discs actually rather than pseudo-elements usually */
}

.doc-main ul li,
.doc-main ol li {
    margin-top: 4px !important;
    margin-bottom: 4px !important;
    /* Tighter line wrapping for lists */
    padding-left: 0 !important;
}

.doc-main ul ul,
.doc-main ol ol,
.doc-main ul ol,
.doc-main ol ul {
    margin-top: 4px !important;
    margin-bottom: 4px !important;
    padding-left: 24px !important;
}

.doc-main ol {
    list-style-type: decimal !important;
}


/* =====================================================
IMAGES
===================================================== */

.doc-main img {
    max-width: 100%;
    width: auto;
    max-height: 450px;
    object-fit: contain;
    display: block;
    margin: 40px auto;
    border-radius: 8px;
    /* Slightly tighter radius like Confluence's default image embedding */
    box-shadow: 0 4px 12px rgba(9, 30, 66, 0.08);
    /* More subtle shadow */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.doc-main img:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(9, 30, 66, 0.12);
}

@media(min-width: 1600px) {
    .doc-main img {
        max-height: 550px;
        margin: 50px auto;
    }
}


/* =====================================================
INLINE COMMENT HIGHLIGHT
===================================================== */

.doc-highlight {
    background: #fff1a8;
    padding: 2px 4px;
    border-radius: 4px;
    cursor: pointer;
}

.doc-highlight:hover {
    background: #ffe066;
}

/* =====================================================
ACTION ICON (INLINE COMMENT BUTTON)
===================================================== */

.doc-action-icon {
    position: absolute;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #172b4d !important;
    color: #fff !important;
    border: none !important;
    outline: none !important;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(9, 30, 66, 0.25) !important;
    cursor: pointer;
    z-index: 9999;
    transform: translateX(-50%);
    transition: background 0.2s, transform 0.1s;
}

.doc-action-icon svg {
    font-size: 18px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-action-icon:hover {
    background: #0052cc;
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 14px rgba(9, 30, 66, 0.3);
}


/* =====================================================
COMMENT INPUT POPUP
===================================================== */

.doc-comment-popup {

    position: absolute;
    min-width: 280px;

    background: #fff;
    padding: 15px;

    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    z-index: 9999;
    display: block !important;
}

.doc-comment-popup input,
.doc-comment-popup textarea {

    width: 100%;
    padding: 8px;
    margin-bottom: 10px;

    border: 1px solid #ddd;
    border-radius: 6px;
}

.doc-comment-popup textarea {
    height: 80px;
    resize: vertical;
    min-height: 50px;
    max-height: 300px;
}


/* =====================================================
POPUP BUTTONS
===================================================== */

.doc-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.doc-actions button {
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.doc-actions .save {
    background: #0c66e4;
    color: #fff;
}

.doc-actions .cancel {
    background: #eee;
}

.doc-actions .resolve {
    background: #22c55e;
    color: #fff;
}


/* =====================================================
VIEW COMMENT POPUP
===================================================== */

.doc-view-popup {

    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    background: #fff;
    padding: 25px;

    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .2);

    width: 90%;
    max-width: 420px;
    z-index: 9999;
    display: block !important;
}


/* =====================================================
FRONTEND LOGIN SECTION (MODAL)
===================================================== */

.doc-login-modal-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    background: rgba(9, 30, 66, 0.54);
    z-index: 9998;
    display: flex;
    justify-content: center;
    align-items: center;
}

.doc-login-section {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
    width: 90%;
    max-width: 400px;
    position: relative;
    z-index: 9999;
}

.doc-login-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #5e6c84;
    padding: 0;
    line-height: 1;
}

.doc-login-close:hover {
    color: #172b4d;
}

.doc-login-section h4 {
    margin-top: 0;
    color: #172b4d;
    font-size: 20px;
    margin-bottom: 5px;
}

.doc-login-section p {
    color: #5e6c84;
    font-size: 14px;
    margin-bottom: 20px;
    margin-top: 0;
}

.doc-login-section form {
    display: flex;
    flex-direction: column;
}

.doc-login-section .login-username,
.doc-login-section .login-password {
    margin-bottom: 15px;
}

.doc-login-section label {
    display: block;
    font-weight: 500;
    color: #172b4d;
    margin-bottom: 8px;
    font-size: 14px;
}

.doc-login-section input[type="text"],
.doc-login-section input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #dfe1e6;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.doc-login-section input[type="text"]:focus,
.doc-login-section input[type="password"]:focus {
    border-color: #0052cc;
    outline: none;
}

.doc-login-section .login-remember {
    margin-bottom: 20px;
    font-size: 14px;
    color: #5e6c84;
    display: flex;
    align-items: center;
}

.doc-login-section .login-remember input {
    margin-right: 8px;
}

.doc-login-section .login-submit input {
    background: #0c66e4;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}

.doc-login-section .login-submit input:hover {
    background: #0052cc;
}


/* =====================================================
BOTTOM COMMENTS SECTION (OVERRIDE THEME STYLES)
===================================================== */

/* Forcefully hide Elementor's duplicate default comments section */
.single-doc_page main#content>#comments,
.single-doc_page main#content>.comments-area {
    display: none !important;
}

.doc-bottom-comments {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #dfe1e6;
}

.doc-bottom-comments #reply-title,
.doc-bottom-comments .comments-title {
    font-size: 24px;
    color: #172b4d;
    font-weight: 500;
    margin-bottom: 20px;
}

.doc-bottom-comments .comment-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 40px 0 !important;
}

.doc-bottom-comments .comment-body {
    background: #fafbfc;
    border: 1px solid #dfe1e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.doc-bottom-comments .comment-meta {
    margin-bottom: 10px;
    font-size: 14px;
    color: #5e6c84;
}

.doc-bottom-comments .comment-meta b {
    color: #172b4d;
    font-size: 16px;
}

.doc-bottom-comments .comment-content p {
    font-size: 15px;
    color: #172b4d;
    margin: 0;
}

/* Comment Form Styling */
.doc-bottom-comments .comment-form {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(9, 30, 66, 0.08);
    border: 1px solid #dfe1e6;
}

.doc-bottom-comments .comment-form-comment label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #172b4d;
}

.doc-bottom-comments .comment-form textarea {
    width: 100%;
    border: 2px solid #dfe1e6;
    border-radius: 6px;
    padding: 12px;
    font-size: 15px;
    color: #172b4d;
    transition: border-color 0.2s;
    box-sizing: border-box;
    resize: vertical;
    min-height: 100px;
}

.doc-bottom-comments .comment-form textarea:focus {
    border-color: #0052cc;
    outline: none;
}

.doc-bottom-comments .form-submit .submit {
    background: #0c66e4;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 15px;
}

.doc-bottom-comments .form-submit .submit:hover {
    background: #0052cc;
}

.doc-bottom-comments .logged-in-as {
    font-size: 14px;
    color: #5e6c84;
    margin-bottom: 20px;
}

.doc-bottom-comments .logged-in-as a {
    color: #0052cc;
    text-decoration: none;
}

.doc-bottom-comments .logged-in-as a:hover {
    text-decoration: underline;
}


/* =====================================================
TABLET
===================================================== */

@media(max-width:1024px) {

    body.single-doc_page {
        margin-top: 110px;
    }

    .doc-layout {
        flex-direction: column;
        padding: 0 40px;
        gap: 20px;
    }

    .doc-sidebar {
        width: 100%;
        min-width: 0;
        position: static;
        max-height: none;
        margin-bottom: 20px;
        border-bottom: 1px solid #dfe1e6;
        padding-bottom: 20px;
    }

    .doc-toc,
    .doc-main {
        min-width: 0;
        width: 100%;
    }

    .doc-toc {
        margin-bottom: 25px;
    }

}


/* =====================================================
MOBILE
===================================================== */

@media(max-width:600px) {

    body.single-doc_page {
        margin-top: 40px;
    }

    .doc-layout {
        padding: 0 10px;
    }

    .doc-main {
        padding: 30px 20px !important;
    }

    .doc-main h1 {
        font-size: 28px;
    }

    .doc-main h2 {
        font-size: 22px;
    }

    .doc-comment-popup {
        width: 90%;
        min-width: 0;
        left: 5% !important;
    }

}


/* =====================================================
SHORTCODE GRID CARD STYLES
===================================================== */
.ior-docs-grid-container {
    width: 100%;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
    max-width: 1280px;
    /* Aligns with main layout max-width */
}

.ior-docs-grid {
    display: grid;
    /* 3 cards per row matching screenshot */
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.ior-doc-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    height: 100%;
    box-sizing: border-box;
    cursor: pointer;
    overflow: hidden;
}

.ior-doc-card-header {
    width: 100%;
    height: 200px;
    background: #0f2142;
    /* Deep Navy Blue */
    border-bottom: 1px solid #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* Optional subtle background pattern or gradient for depth */
.ior-doc-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.ior-doc-card .ior-doc-title-overlay {
    font-size: 22px !important;
    color: #ffffff !important;
    text-align: center;
    margin: 0 !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    z-index: 1;
    /* ensures it sits above the subtle gradient */
}

.ior-doc-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ior-doc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-color: #d0d0d0;
    text-decoration: none !important;
}



.ior-doc-card .ior-doc-excerpt {
    font-size: 14.5px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

/* Ensure no formatting from doc-main overrides card P inside excerpt */
.ior-doc-card .ior-doc-excerpt p {
    font-size: 14.5px !important;
    line-height: 1.6 !important;
    color: #666 !important;
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.ior-doc-card .ior-read-more {
    font-size: 14px;
    font-weight: 700;
    color: #2b4b8a;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    margin-top: auto;
}

.ior-doc-card:hover .ior-read-more {
    color: #0c66e4;
    text-decoration: none !important;
}

@media(max-width: 600px) {
    .ior-docs-grid {
        grid-template-columns: 1fr;
    }
}


/* =====================================================
TERMINOLOGY GLOSSARY HOVER TOOLTIP
===================================================== */
.doc-terminology {
    border-bottom: 2px dashed #0052cc;
    /* Confluence style terminology underline */
    color: #172b4d;
    cursor: help;
    position: relative;
    background: transparent;
    font-weight: 500;
}

.doc-terminology::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #172b4d;
    color: #fff;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    white-space: pre-wrap;
    width: max-content;
    max-width: 250px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(9, 30, 66, 0.15);
}

/* Little triangle for the tooltip */
.doc-terminology::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: #172b4d transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1000;
}

.doc-terminology:hover::after,
.doc-terminology:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}


/* =====================================================
IMAGE LIGHTBOX / CLICK TO ENLARGE
===================================================== */
.doc-main img {
    cursor: zoom-in;
}

.doc-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(9, 30, 66, 0.85);
    /* Confluence dark navy overlay */
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
    padding: 20px;
    box-sizing: border-box;
}

.doc-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    object-fit: contain;
    background: #fff;
    /* Optional: in case of transparent PNGs */
    animation: lightboxZoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.doc-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.doc-lightbox-close:hover {
    color: #ff5630;
}

@keyframes lightboxZoomIn {
    0% {
        transform: scale(0.9);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* =====================================================
CONFLUENCE EXPORT FAQ ACCORDION (EXPAND MACRO)
===================================================== */
.doc-main .expand-container {
    border: 1px solid #dfe1e6;
    border-radius: 6px;
    margin-bottom: 16px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(9, 30, 66, 0.05);
    /* very subtle Confluence style drop shadow */
}

.doc-main .expand-control {
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    background: #fafbfc;
    transition: background 0.2s ease;
    user-select: none;
}

.doc-main .expand-control:hover {
    background: #ebecf0;
}

/* Hide Confluence's default static icon from HTML export */
.doc-main .expand-control-icon,
.doc-main .expand-control-image {
    display: none !important;
}

/* Add custom animated Chevron */
.doc-main .expand-control::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235e6c84' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: 16px;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
}

/* Rotate Chevron when expanded */
.doc-main .expand-container.expanded .expand-control::before {
    transform: rotate(90deg);
}

.doc-main .expand-control-text {
    font-size: 16px;
    font-weight: 600;
    color: #172b4d;
    margin: 0;
}

.doc-main .expand-content {
    display: none;
    /* Hidden by default */
    padding: 20px;
    border-top: 1px solid #dfe1e6;
    color: #172b4d;
}

.doc-main .expand-content> :first-child {
    margin-top: 0 !important;
}

.doc-main .expand-content> :last-child {
    margin-bottom: 0 !important;
}

/* =====================================================
CODE BLOCKS (SYNTAX HIGHLIGHTING & EDITOR LOOK)
===================================================== */
.doc-main .code-block {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.doc-main pre,
.doc-main .code-block pre {
    background: #f4f5f7 !important;
    /* Confluence light background */
    border: 1px solid #dfe1e6 !important;
    border-radius: 3px !important;
    padding: 16px !important;
    margin: 24px 0 !important;
    box-shadow: none !important;
    overflow-x: auto !important;
}

.doc-main code,
.doc-main pre code,
.doc-content-inner code,
.doc-content-inner pre code,
pre code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace !important;
    font-size: 16px !important;
    line-height: 1.8 !important;
    /* Increased to reduce congestion */
}

.doc-main pre code {
    background: transparent !important;
    padding: 0 !important;
    /* Removed padding here since pre now handles it */
    border: none !important;
    border-radius: 0;
    display: block;
}

/* highlightjs-line-numbers styles */
.doc-main pre table.hljs-ln {
    width: auto !important;
    min-width: 100% !important;
    border-collapse: collapse !important;
    margin: 0 !important;
    table-layout: auto !important;
}

.doc-main pre table.hljs-ln td {
    padding: 0 !important;
    border: none !important;
}

/* Line numbers column */
.doc-main pre td.hljs-ln-numbers {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    text-align: right;
    color: #8f9bb3 !important;
    /* Lighter grey for numbers matching image */
    border-right: none !important;
    /* No visible separator to match the image exactly */
    vertical-align: top !important;
    padding-right: 20px !important;
    /* Increased space between number and code */
    padding-left: 16px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    width: 1% !important;
    /* Shrink to fit securely */
    white-space: nowrap !important;
    background: #f4f5f7 !important;
    /* Confluence light background */
}

/* Code column */
.doc-main pre td.hljs-ln-code {
    padding-left: 16px !important;
    padding-right: 16px !important;
    padding-top: 4px !important;
    /* Increased padding to reduce congestion */
    padding-bottom: 4px !important;
    vertical-align: top !important;
    background: #f4f5f7 !important;
    /* Confluence light background */
}

/* Remove default padding from code if it has line numbers table */
.doc-main pre code:has(table.hljs-ln) {
    padding: 12px 0 !important;
}

/* Custom Scrollbar for Code Blocks */
.doc-main pre::-webkit-scrollbar,
.doc-main .code-block pre::-webkit-scrollbar {
    height: 10px;
    background: transparent;
}

.doc-main pre::-webkit-scrollbar-track,
.doc-main .code-block pre::-webkit-scrollbar-track {
    background: #f4f5f7;
    border-radius: 0 0 3px 3px;
}

.doc-main pre::-webkit-scrollbar-thumb,
.doc-main .code-block pre::-webkit-scrollbar-thumb {
    background-color: #8f9bb3;
    /* Matches the grey from the image scrollbar */
    border-radius: 5px;
    border: 2px solid #f4f5f7;
    /* Gives the thumb a nice padded pill look inside the grey background */
}

.doc-main pre::-webkit-scrollbar-thumb:hover,
.doc-main .code-block pre::-webkit-scrollbar-thumb:hover {
    background-color: #6b778c;
}

/* Inline code (not inside pre) */
.doc-main p code,
.doc-main li code,
.doc-content-inner p code,
.doc-content-inner li code {
    background: #f4f5f7;
    padding: 3px 6px;
    border-radius: 4px;
    color: #172b4d;
    font-size: 16px !important;
    border: 1px solid #ebecf0;
}

/* =====================================================
MOBILE RESPONSIVENESS
===================================================== */
@media(max-width: 991px) {
    .doc-layout {
        flex-direction: column !important;
    }

    .doc-sidebar {
        width: 100% !important;
        min-width: 100% !important;
        margin-left: 0 !important;
        position: relative !important;
        top: 0 !important;
        max-height: none !important;
        margin-bottom: 30px;
        border-bottom: 1px solid #dfe1e6;
        padding-bottom: 20px;
    }

    .doc-main {
        padding: 0 20px 40px 20px !important;
    }
}

@media(max-width: 768px) {
    .doc-main h1 {
        font-size: 26px !important;
    }

    .doc-main h2 {
        font-size: 22px !important;
    }

    .doc-main img {
        margin: 20px auto;
    }
}