/* blog.css — shared Google Docs chrome for The GTM & SDR Diary.
   Used by blog_post.html (public viewer, also served on blog.sdr.chat)
   and superadmin_blog_edit.html (admin editor).
   Page-specific CSS stays inline in each template. */

* { box-sizing: border-box; }
body {
    margin: 0; min-height: 100vh;
    background-color: #f9fbfd;
    font-family: 'Google Sans', 'Helvetica Neue', Arial, sans-serif;
    color: #202124;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ── Header ── */
.gdoc-header { background-color: #fff; border-bottom: 1px solid #dadce0; padding: 8px 12px 0; }
.gdoc-header-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.gdoc-back { background: none; border: none; cursor: pointer; font-size: 18px; color: #5f6368; padding: 4px; }
.gdoc-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.gdoc-btn {
    background: #fff; border: 1px solid #dadce0; border-radius: 4px;
    padding: 6px 12px; font-size: 13px; color: #5f6368;
    cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
    font-family: inherit; text-decoration: none;
}
.gdoc-btn:hover { background: #f1f3f4; }
.gdoc-avatar { width: 32px; height: 32px; border-radius: 50%; background-color: #1a73e8; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 500; flex-shrink: 0; }

/* ── Menu bar + dropdowns ── */
.gdoc-menu { display: flex; gap: 4px; font-size: 13px; color: #444746; padding-bottom: 2px; }
.gdoc-menu .menu-wrap { position: relative; }
.gdoc-menu .menu-btn {
    display: inline-block; padding: 4px 8px; border-radius: 4px;
    cursor: pointer; user-select: none; -webkit-user-select: none;
}
.gdoc-menu .menu-btn:hover, .gdoc-menu .menu-btn.open { background: #f1f3f4; }
.menu-dd {
    position: absolute; top: 100%; left: 0; margin-top: 2px;
    background: #fff; border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    border: 1px solid #dadce0; padding: 6px 0; min-width: 240px;
    z-index: 300; display: none;
}
.menu-dd.open { display: block; }
.menu-dd button {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    width: 100%; text-align: left; padding: 8px 16px;
    border: none; background: none; cursor: pointer;
    font-size: 13px; color: #202124; font-family: inherit; white-space: nowrap;
}
.menu-dd button:hover { background: #f1f3f4; }
.menu-dd button:disabled { color: #9aa0a6; cursor: default; }
.menu-dd button:disabled:hover { background: none; }
.menu-dd .shortcut { color: #9aa0a6; font-size: 12px; flex-shrink: 0; }
.menu-dd .dd-sep { border-top: 1px solid #e8eaed; margin: 6px 0; }

/* ── Toolbar ── */
.gdoc-toolbar {
    background-color: #edf2fa; border-bottom: 1px solid #dadce0;
    padding: 4px 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.gdoc-toolbar .icon {
    padding: 4px 6px; font-size: 14px; border-radius: 4px; color: #444;
    cursor: pointer; border: none; background: none; font-family: inherit;
}
.gdoc-toolbar .icon:hover { background: #d3e3fd; }
.gdoc-toolbar .icon.active { background: #d3e3fd; }
.gdoc-toolbar .sep { width: 1px; height: 20px; background-color: #c7c7c7; }
.gdoc-toolbar select, .gdoc-toolbar .pill {
    border: 1px solid #c7c7c7; border-radius: 4px; padding: 2px 8px;
    font-size: 13px; background-color: #fff; color: #444; font-family: inherit;
}
.gdoc-toolbar select { cursor: pointer; }
.gdoc-toolbar input.pill { width: 48px; text-align: center; outline: none; }
.gdoc-toolbar .tb-btn { padding: 2px 8px; font-size: 13px; border-radius: 4px; cursor: pointer; color: #444; border: none; background: none; }
.gdoc-toolbar .tb-btn:hover { background: #d3e3fd; }

/* ── Paper page ── */
.gdoc-page {
    width: 8.5in; max-width: 100%; min-height: 11in;
    background-color: #ffffff;
    box-shadow: 0 1px 3px 1px rgba(60,64,67,0.15);
    border: 1px solid #e8eaed;
    padding: clamp(24px, 5vw, 72px) clamp(16px, 5vw, 96px);
    font-family: 'Arial', sans-serif; font-size: 15px;
    line-height: 1.75; color: #202124;
    word-wrap: break-word; overflow-wrap: break-word;
}
.gdoc-page hr { border: none; border-top: 1px solid #dadce0; margin: 16px 0; }

/* ── Dialogs (link dialog + generic info/confirm dialogs) ── */
.link-dialog-bg { position: fixed; inset: 0; background-color: rgba(0,0,0,0.3); z-index: 1000; display: none; align-items: center; justify-content: center; }
.link-dialog-bg.open { display: flex; }
.link-dialog {
    background-color: #fff; border-radius: 12px; padding: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,.25); min-width: 360px; max-width: 92vw;
    display: flex; flex-direction: column; gap: 12px;
}
.link-dialog .ttl { font-size: 15px; font-weight: 600; color: #202124; }
.link-dialog label { font-size: 12px; color: #5f6368; font-weight: 500; margin-bottom: 4px; display: block; }
.link-dialog input[type=text] { width: 100%; border: 1px solid #dadce0; border-radius: 4px; padding: 8px 10px; font-size: 14px; color: #202124; outline: none; }
.link-dialog select { width: 100%; border: 1px solid #dadce0; border-radius: 4px; padding: 8px 10px; font-size: 13px; color: #5f6368; background: #fff; }
.link-dialog .chk { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #444; }
.link-dialog .acts { display: flex; gap: 8px; justify-content: flex-end; }
.link-dialog .acts .cancel { padding: 6px 16px; font-size: 13px; border: 1px solid #dadce0; border-radius: 4px; background: #fff; cursor: pointer; color: #444; }
.link-dialog .acts .ok { padding: 6px 16px; font-size: 13px; border: none; border-radius: 4px; background: #1a73e8; color: #fff; cursor: pointer; font-weight: 500; }
.dlg-body { font-size: 13px; color: #444; line-height: 1.7; }
.dlg-body a { color: #1a73e8; text-decoration: underline; }
.dlg-body table { width: 100%; border-collapse: collapse; }
.dlg-body td { padding: 6px 0; border-bottom: 1px solid #f1f3f4; }
.dlg-body td:last-child { text-align: right; font-weight: 600; color: #202124; }
.dlg-body kbd {
    background: #f1f3f4; border: 1px solid #dadce0; border-radius: 4px;
    padding: 1px 6px; font-size: 12px; font-family: monospace; color: #202124;
}

/* ── Toast ── */
.toast {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: #202124; color: #fff; padding: 10px 20px;
    border-radius: 4px; font-size: 13px; z-index: 2000;
    opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.toast.show { opacity: 1; }

/* ── Responsive ── */
@media (max-width: 640px) { .gdoc-menu, .gdoc-toolbar, .nav-arrow-col { display: none !important; } }

/* ── Print: chrome never reaches the PDF / print output ── */
@media print {
    .gdoc-header, .gdoc-toolbar, .gdoc-menu, .menu-dd, .url-bar,
    .lang-tabs, .lang-tabs-wrap, .nav-arrow-col, .page-indicator,
    .cta-bottom, .toast, .nav-tooltip, .preview-panel, .drawer, .drawer-bg,
    .link-dialog-bg, .share-menu,
    .blk-remove, .add-zone, .blk-url-input, .blk-page-select { display: none !important; }
    .gdoc-page { box-shadow: none; border: 0; }
}
