/* ==============================================================
   SMSVerifier Blog — Rich Component Library
   Loaded on /blog/* pages. Namespaced under .bc- to avoid clashes.
   Brand palette: --bc-primary (indigo), --bc-accent (violet).
   ============================================================== */
:root {
    --bc-primary: #6366f1;
    --bc-primary-dark: #4f46e5;
    --bc-accent: #8b5cf6;
    --bc-success: #10b981;
    --bc-warn: #f59e0b;
    --bc-danger: #ef4444;
    --bc-info: #0ea5e9;
    --bc-text: #111827;
    --bc-text-2: #6b7280;
    --bc-text-3: #9ca3af;
    --bc-bg: #f9fafb;
    --bc-card: #fff;
    --bc-border: #e5e7eb;
    --bc-radius: 12px;
}

.blog-article, .bc-scope { color: var(--bc-text); line-height: 1.7; font-size: 16px; }
.blog-article :where(h2, h3, h4) { color: var(--bc-text); letter-spacing: -0.01em; }
.blog-article h2 { font-size: 24px; font-weight: 700; margin: 40px 0 14px; scroll-margin-top: 80px; }
.blog-article h3 { font-size: 19px; font-weight: 700; margin: 28px 0 10px; }
.blog-article p { margin: 0 0 14px; }
.blog-article ul, .blog-article ol { margin: 0 0 16px 22px; padding: 0; }
.blog-article li { margin-bottom: 6px; }
.blog-article a { color: var(--bc-primary); text-decoration: underline; text-decoration-color: rgba(99,102,241,.35); text-underline-offset: 3px; }
.blog-article a:hover { text-decoration-color: currentColor; }
.blog-article strong { color: var(--bc-text); font-weight: 700; }
.blog-article img { max-width: 100%; height: auto; border-radius: var(--bc-radius); }
.blog-article figure { margin: 20px 0; }
.blog-article figure figcaption { font-size: 13px; color: var(--bc-text-2); margin-top: 6px; text-align: center; font-style: italic; }

/* -----------------------------------------------------------
   1. TL;DR blockquote (existing, kept for compat)
   ----------------------------------------------------------- */
.tldr, .blog-article .tldr {
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    border-left: 4px solid var(--bc-primary);
    padding: 16px 20px;
    border-radius: 10px;
    margin: 0 0 24px;
    font-size: 15px;
    color: #1e1b4b;
    font-weight: 500;
}

/* -----------------------------------------------------------
   2. Info Card — blue tinted
   ----------------------------------------------------------- */
.bc-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid var(--bc-info);
    border-radius: 10px;
    padding: 14px 18px;
    margin: 20px 0;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.bc-info::before {
    content: "ℹ";
    background: var(--bc-info);
    color: #fff;
    width: 26px; height: 26px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 700; flex-shrink: 0;
}
.bc-info > div { flex: 1; }
.bc-info strong { color: #075985; }
.bc-info p { margin: 4px 0 0; color: #1e3a8a; }

/* -----------------------------------------------------------
   3. Warning Box — amber
   ----------------------------------------------------------- */
.bc-warn {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid var(--bc-warn);
    border-radius: 10px;
    padding: 14px 18px;
    margin: 20px 0;
    display: flex; gap: 12px; align-items: flex-start;
}
.bc-warn::before {
    content: "⚠";
    background: var(--bc-warn);
    color: #fff;
    width: 26px; height: 26px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; flex-shrink: 0;
}
.bc-warn > div { flex: 1; }
.bc-warn strong { color: #92400e; }
.bc-warn p { margin: 4px 0 0; color: #78350f; }

/* -----------------------------------------------------------
   4. Expert Tip — purple/branded
   ----------------------------------------------------------- */
.bc-tip {
    background: linear-gradient(135deg, #faf5ff 0%, #eef2ff 100%);
    border: 1px solid #e9d5ff;
    border-left: 4px solid var(--bc-accent);
    border-radius: 10px;
    padding: 14px 18px;
    margin: 20px 0;
    display: flex; gap: 12px; align-items: flex-start;
}
.bc-tip::before {
    content: "💡";
    background: var(--bc-accent);
    color: #fff;
    width: 26px; height: 26px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
}
.bc-tip > div { flex: 1; }
.bc-tip strong { color: #6d28d9; }
.bc-tip p { margin: 4px 0 0; color: #5b21b6; }

/* -----------------------------------------------------------
   5. Callout — neutral highlight (quote-like)
   ----------------------------------------------------------- */
.bc-callout {
    background: #f9fafb;
    border-left: 4px solid var(--bc-text);
    padding: 14px 20px;
    margin: 20px 0;
    border-radius: 6px;
    font-size: 16px;
    color: var(--bc-text);
    font-style: italic;
}

/* -----------------------------------------------------------
   6. Timeline — vertical dot-line
   ----------------------------------------------------------- */
.bc-timeline {
    list-style: none;
    padding: 0;
    margin: 24px 0;
    position: relative;
}
.bc-timeline::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--bc-border);
}
.bc-timeline li {
    position: relative;
    padding-left: 40px;
    margin-bottom: 18px;
}
.bc-timeline li::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bc-primary);
    box-shadow: 0 0 0 4px #eef2ff;
}
.bc-timeline .bc-time-title {
    font-weight: 700;
    color: var(--bc-text);
    display: block;
    margin-bottom: 2px;
}
.bc-timeline .bc-time-body {
    color: var(--bc-text-2);
    font-size: 14px;
}

/* -----------------------------------------------------------
   7. Feature Cards — 2 or 3 col grid
   ----------------------------------------------------------- */
.bc-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin: 24px 0;
}
.bc-feature {
    background: var(--bc-card);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius);
    padding: 16px;
    transition: transform .15s, box-shadow .15s;
    display: grid;
    grid-template-columns: 40px 1fr;
    column-gap: 12px;
    align-items: start;
}
.bc-feature:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.06); }
.bc-feature .bc-feature-icon {
    width: 40px; height: 40px;
    background: #eef2ff;
    color: var(--bc-primary);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    grid-column: 1;
    grid-row: 1;
    margin: 0;
}
.bc-feature h3 {
    font-size: 16px;
    margin: 0;
    color: var(--bc-text);
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    line-height: 1.25;
}
.bc-feature p {
    font-size: 14px;
    color: var(--bc-text-2);
    margin: 8px 0 0;
    grid-column: 1 / -1;   /* description spans full width under icon+title */
    grid-row: 2;
}

/* -----------------------------------------------------------
   8. Statistic Cards
   ----------------------------------------------------------- */
.bc-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 24px 0;
}
.bc-stat {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    padding: 18px 16px;
    border-radius: var(--bc-radius);
    text-align: center;
}
.bc-stat .bc-stat-num {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}
.bc-stat .bc-stat-label {
    font-size: 12px;
    opacity: .9;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.bc-stat.bc-stat-alt {
    background: var(--bc-card);
    color: var(--bc-text);
    border: 1px solid var(--bc-border);
}
.bc-stat.bc-stat-alt .bc-stat-num { color: var(--bc-primary); }

/* -----------------------------------------------------------
   9. Flow Chart — horizontal boxes with arrows
   ----------------------------------------------------------- */
.bc-flow {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 24px 0;
    overflow-x: auto;
    padding: 4px 0;
}
.bc-flow-step {
    background: var(--bc-card);
    border: 2px solid var(--bc-primary);
    color: var(--bc-primary);
    border-radius: 10px;
    padding: 12px 16px;
    text-align: center;
    min-width: 130px;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bc-flow-arrow {
    display: flex;
    align-items: center;
    color: var(--bc-primary);
    padding: 0 8px;
    flex-shrink: 0;
    font-size: 20px;
    font-weight: 700;
}
.bc-flow-arrow::before { content: "→"; }
.bc-flow-step.bc-flow-start { background: #eef2ff; }
.bc-flow-step.bc-flow-end { background: var(--bc-primary); color: #fff; }

/* -----------------------------------------------------------
   10. SVG Diagram wrapper
   ----------------------------------------------------------- */
.bc-diagram {
    background: var(--bc-card);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius);
    padding: 24px;
    margin: 24px 0;
    display: flex;
    justify-content: center;
}
.bc-diagram svg {
    max-width: 100%;
    height: auto;
}
.bc-diagram + .bc-caption {
    text-align: center;
    font-size: 13px;
    color: var(--bc-text-2);
    margin-top: -12px;
    margin-bottom: 24px;
    font-style: italic;
}

/* -----------------------------------------------------------
   11. Interactive TOC (sticky sidebar on desktop)
   ----------------------------------------------------------- */
.bc-toc {
    background: #f9fafb;
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius);
    padding: 16px 18px;
    margin: 0 0 24px;
}
.bc-toc-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--bc-text-2);
    font-weight: 700;
    margin-bottom: 10px;
}
.bc-toc ol {
    list-style: none;
    counter-reset: toc;
    margin: 0;
    padding: 0;
}
.bc-toc ol li {
    counter-increment: toc;
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
}
.bc-toc ol li:last-child { border-bottom: none; }
.bc-toc ol li::before {
    content: counter(toc) ".";
    color: var(--bc-primary);
    font-weight: 700;
    margin-right: 8px;
}
.bc-toc a {
    color: var(--bc-text);
    text-decoration: none;
    font-size: 14px;
}
.bc-toc a:hover { color: var(--bc-primary); }
.bc-toc a.active { color: var(--bc-primary); font-weight: 600; }

/* Sticky on wide screens */
@media (min-width: 1024px) {
    .bc-toc.bc-sticky { position: sticky; top: 80px; }
}

/* -----------------------------------------------------------
   12. Code Blocks + Copy Button
   ----------------------------------------------------------- */
.bc-code {
    position: relative;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 16px 0;
    overflow-x: auto;
    font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    line-height: 1.55;
}
.bc-code pre { margin: 0; white-space: pre-wrap; word-break: break-word; }
.bc-code .bc-code-lang {
    position: absolute;
    top: 8px;
    right: 46px;
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 700;
}
.bc-code-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #1e293b;
    color: #cbd5e1;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: background .15s;
}
.bc-code-copy:hover { background: #334155; color: #fff; }
.bc-code-copy.copied { background: var(--bc-success); color: #fff; }

/* -----------------------------------------------------------
   13. Tabs
   ----------------------------------------------------------- */
.bc-tabs {
    margin: 20px 0;
    background: var(--bc-card);
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius);
    overflow: hidden;
}
.bc-tabs-nav {
    display: flex;
    gap: 0;
    background: #f9fafb;
    border-bottom: 1px solid var(--bc-border);
    overflow-x: auto;
}
.bc-tabs-nav button {
    background: transparent;
    border: none;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--bc-text-2);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    font-family: inherit;
}
.bc-tabs-nav button.active {
    color: var(--bc-primary);
    border-bottom-color: var(--bc-primary);
    background: #fff;
}
.bc-tabs-panels { padding: 16px; }
.bc-tabs-panel { display: none; }
.bc-tabs-panel.active { display: block; }

/* -----------------------------------------------------------
   14. Accordion
   ----------------------------------------------------------- */
.bc-accordion {
    margin: 20px 0;
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius);
    overflow: hidden;
}
.bc-accordion details {
    border-bottom: 1px solid var(--bc-border);
    background: var(--bc-card);
}
.bc-accordion details:last-child { border-bottom: none; }
.bc-accordion summary {
    padding: 14px 18px;
    font-weight: 600;
    color: var(--bc-text);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 15px;
}
.bc-accordion summary::-webkit-details-marker { display: none; }
.bc-accordion summary::after {
    content: "+";
    color: var(--bc-primary);
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    transition: transform .15s;
    flex-shrink: 0;
}
.bc-accordion details[open] summary::after { transform: rotate(45deg); }
.bc-accordion .bc-acc-body {
    padding: 0 18px 16px;
    color: var(--bc-text-2);
    font-size: 15px;
    line-height: 1.7;
}

/* -----------------------------------------------------------
   15. Responsive Tables
   ----------------------------------------------------------- */
.bc-table-wrap {
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid var(--bc-border);
    border-radius: var(--bc-radius);
    -webkit-overflow-scrolling: touch;
}
.bc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 480px;
}
.bc-table th {
    background: #f9fafb;
    color: var(--bc-text);
    padding: 12px 14px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 2px solid var(--bc-border);
}
.bc-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f3f4f6;
    color: var(--bc-text);
}
.bc-table tr:last-child td { border-bottom: none; }
.bc-table tr:hover td { background: #fafafa; }
.bc-table td.bc-good { color: var(--bc-success); font-weight: 600; }
.bc-table td.bc-bad { color: var(--bc-danger); font-weight: 600; }

/* -----------------------------------------------------------
   16. Inline Icons (SVG helper)
   ----------------------------------------------------------- */
.bc-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    vertical-align: -3px;
    color: var(--bc-primary);
}

/* -----------------------------------------------------------
   17. CTA Banner
   ----------------------------------------------------------- */
.bc-cta {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border-radius: 14px;
    padding: 24px 24px;
    margin: 32px 0 20px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(99,102,241,.25);
}
.bc-cta h3 {
    color: #fff !important;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 6px;
}
.bc-cta p {
    color: rgba(255,255,255,.9);
    margin: 0 0 14px;
    font-size: 15px;
}
.bc-cta a.bc-cta-btn {
    display: inline-block;
    background: #fff;
    color: var(--bc-primary);
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
}
.bc-cta a.bc-cta-btn:hover { background: #eef2ff; }

/* -----------------------------------------------------------
   18. Country Flag Pill
   ----------------------------------------------------------- */
.bc-flag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef2ff;
    color: #3730a3;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin: 0 2px;
}
.bc-flag img {
    width: 16px;
    height: 12px;
    border-radius: 2px;
    object-fit: cover;
    display: block;
}

/* -----------------------------------------------------------
   19. FAQ Accordion (uses .bc-accordion styles + FAQPage schema)
   ----------------------------------------------------------- */
.bc-faq {
    margin: 32px 0 24px;
}
.bc-faq h2 {
    margin-bottom: 14px !important;
}

/* -----------------------------------------------------------
   20. Layout — sticky sidebar layout
   ----------------------------------------------------------- */
.bc-layout {
    display: block;
}
@media (min-width: 1024px) {
    .bc-layout {
        display: grid;
        grid-template-columns: 240px 1fr;
        gap: 40px;
    }
    .bc-layout > aside {
        position: sticky;
        top: 80px;
        align-self: start;
    }
}
