/* blog search suggestions show */
.search-suggestions {
    position: absolute;
    max-width: 320px;
    background: white;
    border: 1px solid #ddd;
    display: none;
    z-index: 9999;
    max-height: 250px;
    overflow-y: auto;
    padding: 0;
    list-style: none;
    margin-top: 5px;
}

.search-suggestions li {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.search-suggestions li:hover {
    background: #f5f5f5;
}

/* end blog search suggestions show */

/* blog description code editor and copy button */

.in-content-ad {
    margin: 2rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 5px;
    text-align: center;
}

.in-content-ad iframe {
    margin: 0 auto;
}

.ql-code-block-container {
    background-color: #1e1e1e;
    color: #f1f1f1;
    padding: 1rem;
    border-radius: 8px;
    font-family: monospace;
    margin-bottom: 1rem;
    position: relative;
}

.ql-code-block {
    white-space: pre-wrap;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #444;
    color: #fff;
    border: none;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
}

.copy-btn:hover {
    background-color: #666;
}

.keyword {
    color: #569cd6;
}

.string {
    color: #ce9178;
}

.number {
    color: #b5cea8;
}

.comment {
    color: #6a9955;
    font-style: italic;
}

.function {
    color: #dcdcaa;
}

.variable {
    color: #9cdcfe;
}

.ql-video {
    width: 100%;
    height: 500px;
}

/* end blog description code editor and copy button */

/* Table of Contents (TOC) Styles */
.table-of-contents {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 3px solid #dc133b;
}

.table-of-contents h4 {
    margin-top: 0;
    color: #333;
}

.toc-list {
    list-style: none;
    padding-left: 0;
}

.toc-list li {
    margin: 8px 0;
}

.toc-list a {
    color: #555;
    text-decoration: none;
    transition: color 0.3s;
}

.toc-list a:hover {
    color: #dc133b;
}

.toc-link.active {
    color: #dc133b;
    font-weight: bold;
}

.table-of-contents {
    top: 20px;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    scroll-margin-top: 300px;
}

/* end Table of Contents (TOC) Styles */

/* Quill-specific styles */
.ql-ui {
    display: none !important;
}

/* Code block styles */
pre,
.ql-syntax {
    background: #282c34 !important;
    color: #abb2bf !important;
    border-radius: 6px;
    padding: 16px;
    overflow: auto;
    margin: 1em 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.5;
    tab-size: 4;
}

/* Line numbers for code blocks */
.hljs-ln-numbers {
    text-align: right;
    color: #5c6370;
    border-right: 1px solid #5c6370;
    padding-right: 10px;
    margin-right: 10px;
}

/* Copy button styles */
.copy-btn {
    position: absolute;
    right: 8px;
    top: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 4px 8px;
    color: #abb2bf;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

pre:hover .copy-btn,
.ql-code-block-container:hover .copy-btn {
    opacity: 1;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* blog in a tag color */
#blog-content p a {
    color: #0066cc;
}

/* blog content in table*/
#blog-content table {
    border: 1px solid black !important;
    border-collapse: collapse !important;
    width: 100% !important;
    margin: 1rem 0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

#blog-content th,
#blog-content td {
    border: 1px solid black !important;
    padding: 12px 15px !important;
    text-align: left !important;
    position: relative !important;
}

#blog-content th {
    background-color: #f8f9fa !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 0.85em !important;
    letter-spacing: 0.5px !important;
}

#blog-content tr:nth-child(even) {
    background-color: #f8f9fa !important;
}

#blog-content tr:hover {
    background-color: #f1f1f1 !important;
    transition: background-color 0.2s ease !important;
}

@media screen and (max-width: 768px) {
    #blog-content table {
        border: 0 !important;
        box-shadow: none !important;
    }

    #blog-content thead {
        display: none !important;
    }

    #blog-content tr {
        display: block !important;
        margin-bottom: 1rem !important;
        border: 1px solid #ddd !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    }

    #blog-content td {
        display: block !important;
        text-align: right !important;
        padding-left: 50% !important;
        position: relative !important;
        border: none !important;
        border-bottom: 1px solid #eee !important;
    }

    #blog-content td::before {
        content: attr(data-label) !important;
        position: absolute !important;
        left: 15px !important;
        width: 45% !important;
        padding-right: 10px !important;
        font-weight: bold !important;
        text-align: left !important;
    }

    #blog-content tr td:last-child {
        border-bottom: 0 !important;
    }
}

#blog-content .ql-editor table {
    margin: 1.5em 0 !important;
}

#blog-content td:focus {
    outline: 2px solid #4285f4 !important;
    background-color: #f8fbff !important;
}

/* end blog content in table*/

/* blog promotion */
.blog-wise-promotion img,
.default-promotion img {
    max-width: 100%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#sticky-promo-box {
    position: fixed;
    bottom: 1%;
    right: 5%;
    max-width: 25%;
    z-index: 98;
    background: #fff;
    padding: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    display: none;
}

#sticky-promo-box img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}
