/* Blog post tables — Summernote editor + public article */
.note-editable table.hostcry-blog-table,
.note-editable table {
    width: 100%;
    max-width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: #1a1a1a !important;
    color: #ffffff !important;
    border-radius: 10px;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.6;
    table-layout: fixed;
}

.article-content .table-responsive-wrap,
.support-article-content .table-responsive-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    margin: 1.5rem 0;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    overflow-wrap: normal;
    word-break: normal;
}

.article-content table.hostcry-blog-table,
.article-content table,
.support-article-content table.hostcry-blog-table,
.support-article-content table {
    width: 100%;
    max-width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    margin: 0;
    background: #1a1a1a !important;
    color: #ffffff !important;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.6;
    table-layout: fixed;
    box-sizing: border-box;
}

.note-editable table.hostcry-blog-table th,
.note-editable table.hostcry-blog-table td,
.note-editable table th,
.note-editable table td,
.article-content table.hostcry-blog-table th,
.article-content table.hostcry-blog-table td,
.article-content table th,
.article-content table td,
.support-article-content table.hostcry-blog-table th,
.support-article-content table.hostcry-blog-table td,
.support-article-content table th,
.support-article-content table td {
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    text-align: left !important;
    vertical-align: top;
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: manual;
    background: transparent !important;
    color: #ffffff !important;
}

.note-editable table.hostcry-blog-table th,
.note-editable table th,
.article-content table.hostcry-blog-table th,
.article-content table th,
.support-article-content table.hostcry-blog-table th,
.support-article-content table th {
    font-weight: 700;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

.note-editable table.hostcry-blog-table tr:last-child td,
.note-editable table tr:last-child td,
.article-content table.hostcry-blog-table tr:last-child td,
.article-content table tr:last-child td,
.support-article-content table.hostcry-blog-table tr:last-child td,
.support-article-content table tr:last-child td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.article-content .hostcry-table-embed {
    margin: 1.5rem 0;
    max-width: 100%;
}

@media (max-width: 768px) {
    .note-editable table,
    .article-content table,
    .support-article-content table {
        min-width: 480px;
        font-size: 14px;
    }

    .note-editable table th,
    .note-editable table td,
    .article-content table th,
    .article-content table td,
    .support-article-content table th,
    .support-article-content table td {
        padding: 12px 14px;
    }

    .article-content .table-responsive-wrap,
    .support-article-content .table-responsive-wrap {
        margin-left: 0;
        margin-right: 0;
        border-radius: 8px;
    }
}

/* Blog article inline images (screenshots, diagrams) */
.article-content .blog-content-figure,
.support-article-content .blog-content-figure,
.ae-post-content .blog-content-figure {
    margin: 2rem 0;
    max-width: 100%;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    background: #f8fafc;
}

.article-content .blog-image-lightbox,
.support-article-content .blog-image-lightbox,
.ae-post-content .blog-image-lightbox {
    position: relative;
    display: block;
    cursor: zoom-in;
    line-height: 0;
}

.article-content .blog-image-lightbox::after,
.support-article-content .blog-image-lightbox::after,
.ae-post-content .blog-image-lightbox::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 55%, rgba(15, 23, 42, 0.45) 100%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.article-content .blog-image-lightbox:hover::after,
.support-article-content .blog-image-lightbox:hover::after,
.ae-post-content .blog-image-lightbox:hover::after {
    opacity: 1;
}

.article-content .blog-content-image,
.support-article-content .blog-content-image,
.ae-post-content .blog-content-image,
.article-content img:not([class]),
.support-article-content img:not([class]),
.ae-post-content img:not([class]) {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin: 0;
}

/* Click-to-enlarge lightbox */
body.blog-lightbox-open {
    overflow: hidden;
}

.blog-lightbox-overlay[hidden] {
    display: none !important;
}

.blog-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 10050;
}

.blog-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(4px);
}

.blog-lightbox-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 24px 64px;
    box-sizing: border-box;
}

.blog-lightbox-figure {
    margin: 0;
    max-width: min(1200px, 100%);
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.blog-lightbox-img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 120px);
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    background: #fff;
}

.blog-lightbox-caption {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
    max-width: 760px;
}

.blog-lightbox-caption[hidden] {
    display: none;
}

.blog-lightbox-close,
.blog-lightbox-nav {
    position: absolute;
    border: 0;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.blog-lightbox-close:hover,
.blog-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.24);
}

.blog-lightbox-close {
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-size: 28px;
    line-height: 1;
}

.blog-lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 999px;
    font-size: 30px;
    line-height: 1;
}

.blog-lightbox-nav:hover {
    transform: translateY(-50%) scale(1.05);
}

.blog-lightbox-prev {
    left: 18px;
}

.blog-lightbox-next {
    right: 18px;
}

.blog-lightbox-nav[hidden] {
    display: none;
}

@media (max-width: 768px) {
    .blog-lightbox-dialog {
        padding: 16px 12px;
    }

    .blog-lightbox-nav {
        width: 38px;
        height: 38px;
        font-size: 24px;
    }

    .blog-lightbox-prev {
        left: 8px;
    }

    .blog-lightbox-next {
        right: 8px;
    }

    .blog-lightbox-close {
        top: 12px;
        right: 12px;
    }
}
