/* Blocks produced by the blog editor (blog-compose.js) - shared by the editor
   (#blog-edit.bc-content) and the public post (#view-player-blog). */
.bc-content, #view-player-blog { --bcc-accent: var(--primary-color, #06a2cb); --bcc-border: rgba(128,128,128,.25); --bcc-soft: rgba(128,128,128,.08); }
#view-player-blog { font-size: 17px; line-height: 1.75; word-wrap: break-word; }
#view-player-blog img { max-width: 100%; height: auto; border-radius: 8px; }
#view-player-blog h2, #view-player-blog h3 { line-height: 1.3; margin: 1.2em 0 .5em; }
#view-player-blog blockquote { margin: 1em 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--bcc-accent); opacity: .85; }
#view-player-blog table, .bc-content table { border-collapse: collapse; max-width: 100%; }
#view-player-blog td, #view-player-blog th { border: 1px solid var(--bcc-border); padding: 6px 10px; }
#view-player-blog iframe { max-width: 100%; }
.bc-content figure.image, #view-player-blog figure.image { display: table; margin: 1em auto; }
.bc-content figure.image figcaption, #view-player-blog figure.image figcaption { display: table-caption; caption-side: bottom; text-align: center; font-size: .85em; opacity: .7; padding-top: 6px; }

/* columns */
.bc-cols { display: grid; gap: 20px; margin: 1em 0; }
.bc-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bc-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bc-cols-12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.bc-col > :first-child { margin-top: 0; }
.bc-col > :last-child { margin-bottom: 0; }
.bc-content .bc-col { outline: 1px dashed var(--bcc-border); outline-offset: 4px; border-radius: 4px; min-height: 2em; }

/* callouts */
.bc-callout { margin: 1em 0; padding: 12px 16px 12px 46px; border-radius: 10px; position: relative; background: var(--bcc-soft); border: 1px solid var(--bcc-border); }
.bc-callout::before { position: absolute; left: 16px; top: 12px; font-size: 18px; line-height: 1.6; }
.bc-callout > :last-child { margin-bottom: 0; }
.bc-callout-info { background: rgba(59,130,246,.08); border-color: rgba(59,130,246,.35); }
.bc-callout-info::before { content: "\2139\FE0F"; }
.bc-callout-tip { background: rgba(16,185,129,.08); border-color: rgba(16,185,129,.35); }
.bc-callout-tip::before { content: "\1F4A1"; }
.bc-callout-warn { background: rgba(245,158,11,.10); border-color: rgba(245,158,11,.40); }
.bc-callout-warn::before { content: "\26A0\FE0F"; }
.bc-callout-danger { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.35); }
.bc-callout-danger::before { content: "\26D4"; }

/* button */
.bc-btn-wrap { margin: 1.2em 0; }
.bc-btn-wrap.bc-center { text-align: center; }
a.bc-btn { display: inline-block; padding: 10px 22px; border-radius: 999px; background: var(--bcc-accent); color: #fff !important; font-weight: 600; text-decoration: none !important; line-height: 1.3; }
a.bc-btn:hover { filter: brightness(1.08); }
a.bc-btn.bc-btn-outline { background: transparent; color: var(--bcc-accent) !important; box-shadow: inset 0 0 0 2px var(--bcc-accent); }

/* gallery */
.bc-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; margin: 1em 0; }
.bc-gallery figure { margin: 0; }
.bc-gallery img { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; display: block; }

/* table of contents */
.bc-toc { margin: 1em 0 1.5em; padding: 12px 16px; border: 1px solid var(--bcc-border); border-radius: 10px; background: var(--bcc-soft); font-size: .92em; }
.bc-toc-t { font-weight: 700; margin: 0 0 6px; }
.bc-toc ul { margin: 0; padding: 0 0 0 18px; }
.bc-toc li { margin: 2px 0; }
.bc-toc li.bc-toc-h3 { margin-left: 16px; }
.bc-toc a { color: var(--bcc-accent); text-decoration: none; }
.bc-toc a:hover { text-decoration: underline; }

/* accordion (TinyMCE accordion plugin) */
.bc-content details, #view-player-blog details { margin: .6em 0; border: 1px solid var(--bcc-border); border-radius: 10px; padding: 8px 14px; }
.bc-content details > summary, #view-player-blog details > summary { cursor: pointer; font-weight: 600; }

/* divider */
#view-player-blog hr, .bc-content hr { border: 0; height: 1px; background: var(--bcc-border); margin: 2em 0; }

/* poll: editor placeholder + live poll */
.bc-poll { margin: 1.2em 0; padding: 14px 16px; border: 1px solid var(--bcc-border); border-radius: 12px; background: var(--bcc-soft); font-size: 15px; line-height: 1.4; }
.bc-poll .bc-poll-q { font-weight: 700; margin: 0 0 10px; font-size: 1.05em; }
.bc-poll .bc-poll-o { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bc-content .bc-poll { cursor: pointer; }
.bc-content .bc-poll .bc-poll-q::before { content: "\1F4CA  Poll \2014  "; font-weight: 600; opacity: .7; }
.bc-content .bc-poll .bc-poll-o li { padding: 7px 12px; border: 1px solid var(--bcc-border); border-radius: 8px; background: rgba(255,255,255,.4); }
.bc-content .bc-poll::after { content: "Double-click to edit"; display: block; margin-top: 8px; font-size: 11px; opacity: .55; }
.bc-poll-live .bc-poll-opt {
    position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
    padding: 9px 12px; margin: 0; border: 1px solid var(--bcc-border); border-radius: 8px; overflow: hidden;
    background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.bc-poll-live .bc-poll-opt:hover:not(:disabled) { border-color: var(--bcc-accent); }
.bc-poll-live .bc-poll-opt.bc-sel { border-color: var(--bcc-accent); box-shadow: inset 0 0 0 1px var(--bcc-accent); }
.bc-poll-live .bc-poll-opt:disabled { cursor: default; opacity: 1; }
.bc-poll-live .bc-poll-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: color-mix(in srgb, var(--bcc-accent) 18%, transparent); transition: width .5s ease; }
.bc-poll-live .bc-poll-t, .bc-poll-live .bc-poll-p { position: relative; }
.bc-poll-live .bc-poll-p { font-weight: 700; font-variant-numeric: tabular-nums; }
.bc-poll-live .bc-mine .bc-poll-t::after { content: " \2713"; color: var(--bcc-accent); font-weight: 700; }
.bc-poll-live .bc-poll-f { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 12.5px; opacity: .8; }
.bc-poll-live .bc-poll-hint { flex: 1; }
.bc-poll-live.bc-voted .bc-poll-hint { display: none; }
.bc-poll-live .bc-poll-submit { margin-left: auto; padding: 6px 16px; border: 0; border-radius: 999px; background: var(--bcc-accent); color: #fff; font-weight: 600; cursor: pointer; }

@media (max-width: 640px) {
    .bc-cols-2, .bc-cols-3, .bc-cols-12 { grid-template-columns: 1fr; }
}
