/* ============================================
   ShopiStack Custom Styles
   - CAPTCHA Field Styles
   - Social Share Styles
   - Blog Post Navigation
   - Code Block Styling
   - Home About Author Area
   ============================================ */

/* --- Home About Author Area --- */
.home-about-author-area {
    max-width: 380px;
    justify-content: flex-start;
    padding: 27px 20px;
}
.home-about-author-area .author-info {
    max-width: none;
    width: 100%;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    padding: 0;
    -webkit-border-end: 0;
    border-inline-end: 0;
    border-bottom: 0;
}
.home-about-author-area .author-img {
    flex: 0 0 auto;
}
.home-about-author-area .author-text {
    min-width: 0;
}
@media (max-width: 575px) {
    .home-about-author-area {
        max-width: 100%;
    }
}
@media (max-width: 400px) {
    .home-about-author-area .author-info {
        flex-direction: row;
        align-items: center;
        max-width: none;
    }
}

/* --- Newsletter & Thank You States --- */
.shopistack-newsletter-message {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}
.shopistack-thank-you-section {
    background: var(--tj-color-theme-bg, #f7f8fb);
}
.shopistack-thank-you-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 50px 35px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}
.shopistack-thank-you-card .thank-you-icon {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #20c997;
    color: #ffffff;
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 25px;
}
.shopistack-thank-you-card h1 {
    margin-bottom: 18px;
}
.shopistack-thank-you-card p {
    max-width: 650px;
    margin: 0 auto;
}

/* --- CAPTCHA Field --- */
.shopistack-captcha-field {
    margin-bottom: 20px;
}
.shopistack-captcha-field .captcha-question {
    display: inline-block;
    background: #f0f4f8;
    border: 1px solid #d1d9e6;
    border-radius: 8px;
    padding: 8px 16px;
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 16px;
    color: #1a1a2e;
    letter-spacing: 1px;
    user-select: none;
}
.shopistack-captcha-field input[type="number"] {
    -moz-appearance: textfield;
}
.shopistack-captcha-field input[type="number"]::-webkit-outer-spin-button,
.shopistack-captcha-field input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* --- Social Share --- */
.shopistack-social-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px 0;
    border-top: 1px solid #414141;
    margin-top: 45px;
}
.shopistack-social-share .share-label {
    font-weight: 600;
    font-size: 15px;
    margin-right: 4px;
}
.shopistack-social-share .share-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.shopistack-social-share .share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    color: #fff;
    font-size: 15px;
    border: none;
    cursor: pointer;
    line-height: 1;
}
.shopistack-social-share .share-btn i {
    font-size: 15px;
    line-height: 1;
}
.shopistack-social-share .share-facebook {
    background: #1877f2;
}
.shopistack-social-share .share-facebook:hover {
    background: #0d5bbd;
    transform: translateY(-2px);
}
.shopistack-social-share .share-twitter {
    background: #1da1f2;
}
.shopistack-social-share .share-twitter:hover {
    background: #0c85d0;
    transform: translateY(-2px);
}
.shopistack-social-share .share-linkedin {
    background: #0a66c2;
}
.shopistack-social-share .share-linkedin:hover {
    background: #084e94;
    transform: translateY(-2px);
}
.shopistack-social-share .share-whatsapp {
    background: #25d366;
}
.shopistack-social-share .share-whatsapp:hover {
    background: #1da851;
    transform: translateY(-2px);
}
.shopistack-social-share .share-copy-link {
    width: auto;
    padding: 0 16px;
    border-radius: 20px;
    background: #6c757d;
    font-size: 13px;
}
.shopistack-social-share .share-copy-link i {
    font-size: 13px;
}
.shopistack-social-share .share-copy-link .copy-text {
    font-size: 12px;
    font-weight: 500;
}
.shopistack-social-share .share-copy-link:hover {
    background: #5a6268;
    transform: translateY(-2px);
}
.shopistack-social-share .share-copy-link.copied {
    background: #28a745;
}

/* --- Blog Share Section --- */
.blog-share-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

/* --- Blog Post Navigation --- */
.blog-post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 30px 0;
    margin-top: 20px;
    border-top: 1px solid #e8e8e8;
}
.blog-post-navigation .post-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
    max-width: 48%;
}
.blog-post-navigation .post-nav:hover {
    border-color: #1877f2;
    background: #f8faff;
}
.blog-post-navigation .post-nav.prev-post {
    text-align: left;
}
.blog-post-navigation .post-nav.next-post {
    text-align: right;
    margin-left: auto;
}
.blog-post-navigation .nav-label {
    font-size: 13px;
    color: #1877f2;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.blog-post-navigation .nav-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-post-navigation .post-nav:hover .nav-title {
    color: #1877f2;
}

/* --- Quill Code Block Styling --- */
.rich-text-content .ql-code-block-container,
.blog-text .ql-code-block-container {
    background: #171b19;
    border: 1px solid #313244;
    border-radius: 10px;
    padding: 12px 24px;
    margin: 20px 0;
    overflow-x: auto;
    position: relative;
}
.rich-text-content .ql-code-block-container::before,
.blog-text .ql-code-block-container::before {
    content: attr(data-language);
    position: absolute;
    top: 0;
    right: 0;
    padding: 4px 14px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c7086;
    background: #181825;
    border-bottom-left-radius: 8px;
    border-top-right-radius: 9px;
}
.rich-text-content .ql-code-block-container .ql-code-block,
.blog-text .ql-code-block-container .ql-code-block {
    font-family: 'Fira Code', 'JetBrains Mono', 'SF Mono', 'Cascadia Code', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.7;
    color: #cdd6f4;
    padding: 0 !important;
    margin: 0 !important;
    white-space: pre;
    display: block;
    tab-size: 4;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    float: none !important;
}
.rich-text-content .ql-code-block-container .ql-code-block + .ql-code-block,
.blog-text .ql-code-block-container .ql-code-block + .ql-code-block {
    margin: 0 !important;
    padding: 0 !important;
}
.rich-text-content .ql-code-block-container .ql-code-block:first-child,
.blog-text .ql-code-block-container .ql-code-block:first-child {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
.rich-text-content .ql-code-block-container .ql-code-block:last-child,
.blog-text .ql-code-block-container .ql-code-block:last-child {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}
.rich-text-content .ql-code-block-container .ql-code-block:only-child,
.blog-text .ql-code-block-container .ql-code-block:only-child {
    padding: 0 !important;
    margin: 0 !important;
}
/* Override main.css margin-bottom on pre inside code containers */
.rich-text-content .ql-code-block-container pre,
.blog-text .ql-code-block-container pre {
    margin-bottom: 0 !important;
}

/* Inline code styling */
.rich-text-content code,
.blog-text code {
    font-family: 'Fira Code', 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;
    background: #f0f4f8;
    color: #e63946;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    border: 1px solid #e2e8f0;
}
.rich-text-content pre,
.blog-text pre {
    background: #1e1e2e;
    border: 1px solid #313244;
    border-radius: 10px;
    padding: 20px 24px;
    margin: 20px 0;
    overflow-x: auto;
}
.rich-text-content pre code,
.blog-text pre code {
    background: none;
    color: #cdd6f4;
    padding: 0;
    border: none;
    font-size: 14px;
    line-height: 1.7;
}

/* Blockquote styling */
.rich-text-content blockquote,
.blog-text blockquote {
    border-left: 4px solid #1877f2;
    margin: 20px 0;
    padding: 16px 24px;
    background: #f8faff;
    border-radius: 0 8px 8px 0;
    color: #4a5568;
    font-style: italic;
}

@media (max-width: 576px) {
    .blog-post-navigation {
        flex-direction: column;
    }
    .blog-post-navigation .post-nav {
        max-width: 100%;
    }
    .blog-post-navigation .post-nav.next-post {
        text-align: left;
    }
    .shopistack-social-share .share-btn {
        width: 36px;
        height: 36px;
    }
    .shopistack-social-share .share-copy-link {
        width: auto;
        padding: 0 14px;
    }
    .rich-text-content .ql-code-block-container .ql-code-block,
    .blog-text .ql-code-block-container .ql-code-block {
        font-size: 13px;
    }
    .rich-text-content .ql-code-block-container,
    .blog-text .ql-code-block-container {
        padding: 16px 18px;
    }
}
