/**
 * BPC Auto Blogger — Frontend Styles
 * Divi, Elementor & Avada-compatible code blocks + justified text for generated articles.
 */

/* Justified text for generated articles */
.entry-content p,
.et_pb_post_content p,
.post-content p,
.elementor-widget-theme-post-content p,
.elementor-text-editor p,
.fusion-post-content p,
.avada-post-content p {
    text-align: justify;
}

/* ──────────────────────────────────────────
 * Code block wrapper — position relative for copy button
 * ────────────────────────────────────────── */
.bpcab-code-wrapper {
    position: relative;
}

/* Copy button — icon only, top-right corner */
.bpcab-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.45);
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bpcab-copy-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.bpcab-copy-btn:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.08);
}
.bpcab-copy-btn.bpcab-copied {
    color: #27ae60;
}

/* Code blocks — dark theme with syntax-highlighting look */
.entry-content pre,
.et_pb_post_content pre,
.post-content pre,
.elementor-widget-theme-post-content pre,
.elementor-text-editor pre,
.fusion-post-content pre,
.avada-post-content pre {
    background: #1a1a2e;
    color: #e0e0e0;
    border: none;
    border-radius: 8px;
    padding: 24px 28px;
    overflow-x: auto;
    font-family: 'Fira Code', 'Source Code Pro', 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.65;
    margin: 24px 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    -webkit-font-smoothing: antialiased;
    tab-size: 4;
}

.entry-content pre code,
.et_pb_post_content pre code,
.post-content pre code,
.elementor-widget-theme-post-content pre code,
.elementor-text-editor pre code,
.fusion-post-content pre code,
.avada-post-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border: none;
    font-size: inherit;
    line-height: inherit;
    white-space: pre;
    word-break: normal;
    word-wrap: normal;
}

/* Inline code (not inside pre) */
.entry-content code,
.et_pb_post_content code,
.post-content code,
.elementor-widget-theme-post-content code,
.elementor-text-editor code,
.fusion-post-content code,
.avada-post-content code {
    background: #f0f0f5;
    color: #d63384;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Fira Code', 'Source Code Pro', 'Consolas', monospace;
    font-size: 0.88em;
}

/* Don't double-style code inside pre */
.entry-content pre code,
.et_pb_post_content pre code,
.post-content pre code,
.elementor-widget-theme-post-content pre code,
.elementor-text-editor pre code,
.fusion-post-content pre code,
.avada-post-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
}

/* Keywords — PHP/JS: function, class, return, if, else, etc. */
.entry-content pre .keyword,
.et_pb_post_content pre .keyword,
.elementor-widget-theme-post-content pre .keyword,
.fusion-post-content pre .keyword {
    color: #c792ea;
}

/* Strings */
.entry-content pre .string,
.et_pb_post_content pre .string,
.elementor-widget-theme-post-content pre .string,
.fusion-post-content pre .string {
    color: #c3e88d;
}

/* Comments */
.entry-content pre .comment,
.et_pb_post_content pre .comment,
.elementor-widget-theme-post-content pre .comment,
.fusion-post-content pre .comment {
    color: #676e95;
    font-style: italic;
}

/* Functions/methods */
.entry-content pre .function,
.et_pb_post_content pre .function,
.elementor-widget-theme-post-content pre .function,
.fusion-post-content pre .function {
    color: #82aaff;
}

/* Variables */
.entry-content pre .variable,
.et_pb_post_content pre .variable,
.elementor-widget-theme-post-content pre .variable,
.fusion-post-content pre .variable {
    color: #f07178;
}

/* Scrollbar styling for code blocks */
.entry-content pre::-webkit-scrollbar,
.et_pb_post_content pre::-webkit-scrollbar,
.elementor-widget-theme-post-content pre::-webkit-scrollbar,
.fusion-post-content pre::-webkit-scrollbar {
    height: 6px;
}

.entry-content pre::-webkit-scrollbar-track,
.et_pb_post_content pre::-webkit-scrollbar-track,
.elementor-widget-theme-post-content pre::-webkit-scrollbar-track,
.fusion-post-content pre::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.entry-content pre::-webkit-scrollbar-thumb,
.et_pb_post_content pre::-webkit-scrollbar-thumb,
.elementor-widget-theme-post-content pre::-webkit-scrollbar-thumb,
.fusion-post-content pre::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.entry-content pre::-webkit-scrollbar-thumb:hover,
.et_pb_post_content pre::-webkit-scrollbar-thumb:hover,
.elementor-widget-theme-post-content pre::-webkit-scrollbar-thumb:hover,
.fusion-post-content pre::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ──────────────────────────────────────────────
 * Hide categories / tags widgets below articles
 * ────────────────────────────────────────────── */
.widget_categories,
.cat-links,
.post-categories,
.et_post_meta_wrapper .et-post-categories,
.entry-categories,
.single-post-categories,
.post-footer-categories,
.tag-links,
.entry-footer {
    display: none !important;
}
