/* NGM Book Publisher – frontend */
.ngm-bp-form { max-width: 1000px; margin: 24px auto; padding: 28px; border: 1px solid #ddd; border-radius: 10px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.04); box-sizing: border-box; }
.ngm-bp-form h2 { margin-top: 28px; }
.ngm-bp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.ngm-bp-field { margin: 0 0 16px; }
.ngm-bp-field.full { grid-column: 1 / -1; }
.ngm-bp-field label { display: block; font-weight: 600; margin-bottom: 7px; }
.ngm-bp-field input, .ngm-bp-field textarea, .ngm-chapter input, .ngm-chapter textarea { display: block; width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid #bbb; border-radius: 6px; font: inherit; }
.ngm-bp-field textarea { min-height: 120px; }
.ngm-bp-help { color: #666; font-size: .9em; }
.ngm-chapter { border: 1px solid #ddd; padding: 15px; margin: 12px 0; border-radius: 8px; background: #fcfcfc; }
.ngm-chapter input { margin: 0 0 10px; font-weight: 600; }
.ngm-chapter-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ngm-remove-chapter { background: none; border: 1px solid #d63638; color: #d63638; border-radius: 4px; padding: 3px 10px; cursor: pointer; }
.ngm-bp-actions { margin-top: 20px; }
.ngm-bp-notice { padding: 15px; margin: 16px auto; max-width: 1000px; background: #fff3cd; border-radius: 6px; box-sizing: border-box; }
.ngm-bp-success { background: #d8f0dc; }
.ngm-bp-table { width: 100%; border-collapse: collapse; }
.ngm-bp-table th, .ngm-bp-table td { padding: 10px; border-bottom: 1px solid #e5e5e5; text-align: left; vertical-align: top; }
.ngm-status { display: inline-block; padding: 2px 10px; border-radius: 10px; background: #eee; font-size: .85em; }
.ngm-status-submitted, .ngm-status-review { background: #fcf0d1; }
.ngm-status-corrections { background: #fbe3e4; }
.ngm-status-approved, .ngm-status-typesetting, .ngm-status-proof { background: #e1ecf7; }
.ngm-status-published { background: #d8f0dc; }
.ngm-book-preview { margin: 2rem auto; background: #fff; box-sizing: border-box; color: #111; }
.ngm-book-titlepage { text-align: center; margin-bottom: 3em; }
.ngm-book-titlepage h1 { margin-bottom: .3em; }
.ngm-subtitle { font-size: 1.3em; font-style: italic; }
.ngm-meta { margin: .2em 0; }
.ngm-book-toc ol { padding-left: 1.4em; }
.ngm-book-preview section { margin-top: 2.5em; }
.ngm-book-preview table { border-collapse: collapse; }
.ngm-book-preview td, .ngm-book-preview th { border: 1px solid #999; padding: 4px 8px; }
.ngm-bp-preview-page { background: #e9e9e9; margin: 0; font-family: sans-serif; }
.ngm-bp-preview-page .ngm-book-preview { box-shadow: 0 2px 12px rgba(0,0,0,.15); }
.ngm-bp-preview-bar { position: sticky; top: 0; background: #1d2327; color: #fff; padding: 10px 16px; font-size: 14px; z-index: 2; }
.ngm-bp-preview-bar a { color: #9ec2e6; }
@media (max-width: 700px) {
  .ngm-bp-grid { grid-template-columns: 1fr; }
  .ngm-bp-form { padding: 16px; }
  .ngm-book-preview { padding: 16px !important; }
  .ngm-bp-table thead { display: none; }
  .ngm-bp-table tr { display: block; border-bottom: 2px solid #ddd; }
  .ngm-bp-table td { display: block; border: 0; padding: 4px 0; }
  .ngm-bp-table td::before { content: attr(data-label) ": "; font-weight: 600; }
}
@media print { .ngm-bp-preview-bar { display: none; } .ngm-bp-preview-page { background: #fff; } .ngm-bp-preview-page .ngm-book-preview { box-shadow: none; } .ngm-chapter-section { page-break-before: always; } }

/* Call for Chapters – public form */
.ngm-cfc-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .8em; color: #2271b1; margin: 0 0 4px; font-weight: 600; }
.ngm-cfc-form h1 { margin: 0 0 6px; }
.ngm-cfc-meta { color: #555; margin: 0 0 6px; }
.ngm-cfc-deadline { display: inline-block; background: #fcf0d1; padding: 6px 12px; border-radius: 6px; }
.ngm-cfc-guidelines { border: 1px solid #e2e2e2; border-radius: 8px; padding: 12px 16px; margin: 16px 0; background: #fafafa; }
.ngm-cfc-guidelines summary { cursor: pointer; font-weight: 600; }
.ngm-cfc-author { position: relative; border: 1px solid #ddd; border-radius: 8px; padding: 14px 16px 4px; margin: 0 0 14px; background: #fcfcfc; }
.ngm-cfc-author.is-corresponding { border-color: #2271b1; background: #f5f9fd; }
.ngm-cfc-author legend { font-weight: 700; padding: 0 6px; }
.ngm-cfc-remove-author { position: absolute; top: 8px; right: 12px; background: none; border: 1px solid #d63638; color: #d63638; border-radius: 4px; padding: 2px 10px; cursor: pointer; }
.ngm-cfc-inline { display: flex !important; gap: 8px; align-items: flex-start; font-weight: 400 !important; }
.ngm-cfc-inline input { width: auto !important; margin-top: 4px; }
.ngm-bp-field select { display: block; width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid #bbb; border-radius: 6px; font: inherit; background: #fff; }
.ngm-bp-error { background: #fbe3e4; }
.ngm-bp-error ul { margin: 8px 0 0 18px; }
.ngm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.ngm-cfc-count { font-weight: 400; color: #777; }
.ngm-cfc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; max-width: 1000px; margin: 24px auto; }
.ngm-cfc-card { border: 1px solid #ddd; border-radius: 10px; padding: 18px; background: #fff; }
.ngm-cfc-card h3 { margin-top: 0; }
.ngm-cfc-status .ngm-bp-table th { width: 30%; }
.ngm-cs-received, .ngm-cs-revised { background: #fcf0d1; }
.ngm-cs-review { background: #e1ecf7; }
.ngm-cs-revision { background: #fbe3e4; }
.ngm-cs-accepted { background: #d8f0dc; }
.ngm-cs-rejected, .ngm-cs-withdrawn { background: #e5e5e5; }
.ngm-chapter-byline { font-style: italic; margin-top: -.5em; white-space: normal; }
/* Theme-independent buttons (block themes do not style .button) */
.ngm-bp-form .button, .ngm-cfc-card .button, .ngm-bp-dashboard .button { display: inline-block; padding: 10px 18px; border: 1px solid #2271b1; border-radius: 6px; background: #fff; color: #2271b1; font: inherit; font-size: 15px; line-height: 1.3; cursor: pointer; text-decoration: none; }
.ngm-bp-form .button:hover, .ngm-cfc-card .button:hover { background: #f0f6fc; }
.ngm-bp-form .button-primary, .ngm-cfc-card .button { background: #2271b1; color: #fff; }
.ngm-bp-form .button-primary:hover, .ngm-cfc-card .button:hover { background: #135e96; color: #fff; }
.ngm-bp-form .button:disabled { opacity: .6; cursor: wait; }
.ngm-cfc-author { padding-top: 40px; }
.ngm-cfc-author legend { position: absolute; top: 10px; left: 16px; padding: 0; }
