/* Small, scoped defaults. Source-specific CSS is separately saved as post meta. */
.wp-block-table.hgi-import-table { overflow-x:auto; margin:1.5em 0; }
.wp-block-table.hgi-import-table > table { border-collapse:separate; border-spacing:0; width:100%; border:1px solid #dce5ed; border-radius:10px; overflow:hidden; }
.wp-block-table.hgi-import-table th { background:#173b58; color:#fff; padding:13px 15px; font-weight:700; border:0; text-align:left; }
.wp-block-table.hgi-import-table td { padding:12px 15px; border:0; border-bottom:1px solid #e2e8ee; vertical-align:top; }
.wp-block-table.hgi-import-table tbody tr:nth-child(even) td { background:#f3f7fa; }
.wp-block-table.hgi-import-table tbody tr:last-child td { border-bottom:0; }
.wp-block-details.hgi-faq-item { border:1px solid #d9e5ed; border-radius:9px; background:#fff; padding:15px 18px; margin:12px 0; }
.wp-block-details.hgi-faq-item summary { font-weight:700; color:#183a55; cursor:pointer; }
.wp-block-details.hgi-faq-item > :not(summary) { margin-top:12px; }
.wp-block-group.hgi-references { background:#f5f8fa; padding:18px 22px; border-left:4px solid #377a9e; border-radius:8px; margin:24px 0; }
.wp-block-group.hgi-box { padding:18px 22px; border:1px solid #dfe7ef; border-radius:10px; margin:20px 0; }
.wp-block-group.hgi-box > :first-child { margin-top:0; }
.wp-block-group.hgi-box > :last-child { margin-bottom:0; }

/* In the block editor, FAQ groups can inherit full-bleed alignment from imported
   markup / theme styles while neighbouring headings use the content column.
   Center the FAQ *within the editor only*, including legacy imports without
   .hgi-faq-wrap, and leave the public frontend styles unchanged. */
.editor-styles-wrapper .wp-block-group.hgi-faq-wrap,
.editor-styles-wrapper .wp-block-details.hgi-faq-item,
.editor-styles-wrapper .block-editor-block-list__block.wp-block-details.hgi-faq-item,
.block-editor-writing-flow .wp-block-details.hgi-faq-item {
    box-sizing:border-box;
    width:100%;
    max-width:var(--wp--style--global--content-size, 780px);
    margin-left:auto !important;
    margin-right:auto !important;
}
/* Gutenberg sometimes puts width/margin on the block editor wrapper, not on
   the <details> element itself; this also handles those instances. */
.editor-styles-wrapper .block-editor-block-list__block:has(> .wp-block-details.hgi-faq-item),
.editor-styles-wrapper .block-editor-block-list__block:has(> .wp-block-group.hgi-faq-wrap) {
    box-sizing:border-box;
    max-width:var(--wp--style--global--content-size, 780px);
    margin-left:auto !important;
    margin-right:auto !important;
}

/* A coloured informational box imported from a mixed-inline <div> has exactly
   one rich-text paragraph rather than separate paragraphs for each <strong>.
   Keep it compact without changing normal multi-paragraph Groups. */
.wp-block-group.hgi-callout { box-sizing:border-box; }
.wp-block-group.hgi-callout > .wp-block-paragraph:first-child,
.wp-block-group.hgi-callout > p:first-child { margin-top:0; }
.wp-block-group.hgi-callout > .wp-block-paragraph:last-child,
.wp-block-group.hgi-callout > p:last-child { margin-bottom:0; }

/* 1.4.0 | Editorial mode adapted to the active WordPress theme.
   SmartMag supplies --c-main; fallback matches MagazynMiasta.pl.
   Only blocks imported in SITE mode get these classes; SOURCE mode stays intact. */
.wp-block-table.hgi-site-table { max-width:100%;margin:20px 0 24px; }
.wp-block-table.hgi-site-table > table {
  border:1px solid #e1e8ee !important;border-radius:9px !important;
  border-spacing:0 !important;border-collapse:separate !important;
  overflow:hidden;background:#fff !important;font-family:inherit;
  font-size:clamp(12.5px,0.86em,14px);line-height:1.5;
}
.wp-block-table.hgi-site-table thead th,
.wp-block-table.hgi-site-table th {
  color:#fff !important;background:var(--c-main,var(--wp--preset--color--primary,#0282dc)) !important;
  font-weight:700 !important;font-size:0.95em !important;padding:11px 13px !important;
  border:0 !important;text-align:left;
}
.wp-block-table.hgi-site-table td {
  color:#293745 !important;background:transparent !important;
  border:0 !important;border-bottom:1px solid #e7edf2 !important;
  padding:10px 13px !important;vertical-align:top;
}
.wp-block-table.hgi-site-table tbody tr:nth-child(even) {background:#f5f8fa !important;}
.wp-block-table.hgi-site-table tbody tr:last-child td {border-bottom:0 !important;}
.wp-block-details.hgi-site-faq {
  box-sizing:border-box;margin:9px 0 !important;padding:0 !important;
  border:1px solid #e2eaf0 !important;border-radius:9px !important;
  overflow:hidden;background:#fff !important;
}
.wp-block-details.hgi-site-faq summary {
  position:relative;min-height:44px;box-sizing:border-box;padding:13px 38px 13px 15px !important;
  font-weight:650 !important;font-size:0.96em !important;line-height:1.5 !important;
  color:#1d2e3c !important;background:#f8fafc !important;
}
.wp-block-details.hgi-site-faq[open] summary {border-bottom:1px solid #e8edf2 !important;}
.wp-block-details.hgi-site-faq > :not(summary) {
  margin:0 !important;padding:12px 15px 14px !important;
  font-size:0.95em !important;line-height:1.65 !important;
  color:#344556 !important;background:#fff !important;
}
.wp-block-group.hgi-site-box.hgi-callout {
  border:1px solid #dce8f1 !important;border-left:3px solid var(--c-main,var(--wp--preset--color--primary,#0282dc)) !important;
  background:#f7fafc !important;border-radius:7px !important;
  margin:20px 0 !important;padding:13px 16px !important;
}
.wp-block-group.hgi-site-box.hgi-callout p {margin:0 !important;line-height:1.6;}

/* Small, human-readable bibliography. Default: collapsed, one discreet row.
   All references remain native Gutenberg paragraphs/lists, edited normally. */
.wp-block-group.hgi-bibliography {
  --hgi-accent:var(--c-main,var(--wp--preset--color--primary,#0282dc));
  box-sizing:border-box;
  max-width:100%;margin:25px 0 23px !important;padding:0 !important;
  color:#273848 !important;background:transparent !important;
  border:0 !important;box-shadow:none !important;
}
.wp-block-group.hgi-bibliography .hgi-bibliography-heading,
.wp-block-group.hgi-bibliography h2.hgi-bibliography-heading {
  margin:0 0 9px !important;padding:0 !important;
  font-family:var(--h-font,inherit);font-weight:700 !important;
  font-size:clamp(16px,1.05em,18px) !important;
  line-height:1.34 !important;letter-spacing:-.012em;
  color:#1b2936 !important;background:transparent !important;
  border:0 !important;text-shadow:none !important;
}
.wp-block-details.hgi-bibliography-fold {
  display:block;box-sizing:border-box;max-width:100%;
  margin:0 !important;padding:0 !important;
  border:1px solid #dde6ee !important;
  border-radius:9px !important;overflow:hidden;
  background:#fbfcfe !important;box-shadow:0 1px 4px rgba(21,45,68,.035);
}
.wp-block-details.hgi-bibliography-fold > summary {
  display:list-item;cursor:pointer;list-style-position:inside;
  margin:0 !important;padding:11px 15px !important;
  font-size:12.7px !important;line-height:1.45 !important;
  font-weight:650 !important;color:#176299 !important;
  border:0 !important;background:#f7fafc !important;
}
.wp-block-details.hgi-bibliography-fold > summary:hover {
  color:#005b9f !important;background:#eef6fc !important;
}
.wp-block-details.hgi-bibliography-fold[open] > summary {border-bottom:1px solid #e5edf3 !important;}
.wp-block-details.hgi-bibliography-fold > .wp-block-paragraph,
.wp-block-details.hgi-bibliography-fold > p,
.wp-block-details.hgi-bibliography-fold > .wp-block-list,
.wp-block-details.hgi-bibliography-fold > ol,
.wp-block-details.hgi-bibliography-fold > ul {
  box-sizing:border-box;max-width:100%;
  font-family:var(--body-font,inherit);font-size:12.5px !important;
  line-height:1.48 !important;color:#354555 !important;
}
.wp-block-details.hgi-bibliography-fold > .wp-block-paragraph,
.wp-block-details.hgi-bibliography-fold > p {
  padding:7px 15px !important;margin:0 !important;background:#fff !important;
  border:0 !important;border-bottom:1px solid #edf0f4 !important;
}
.wp-block-details.hgi-bibliography-fold > .wp-block-paragraph:last-child,
.wp-block-details.hgi-bibliography-fold > p:last-child {border-bottom:0 !important;padding-bottom:10px !important;}
.wp-block-details.hgi-bibliography-fold > ol,
.wp-block-details.hgi-bibliography-fold > ul {margin:0 !important;padding:9px 20px 10px 30px !important;background:#fff !important;}
.wp-block-details.hgi-bibliography-fold li {margin:0 !important;padding:5px 0 !important;line-height:1.48 !important;}
.wp-block-details.hgi-bibliography-fold strong {color:#273848 !important;font-size:inherit !important;font-weight:650 !important;}
.wp-block-details.hgi-bibliography-fold a {color:var(--c-main,var(--wp--preset--color--primary,#0282dc)) !important;text-decoration:none !important;text-underline-offset:3px !important;overflow-wrap:anywhere;}
.wp-block-details.hgi-bibliography-fold a:hover {text-decoration:underline !important;}
.wp-block-details.hgi-bibliography-fold small {font-size:11.5px !important;line-height:1.45 !important;color:#647486 !important;}
@media(max-width:600px) {
  .wp-block-details.hgi-bibliography-fold > summary {padding:11px 12px !important;}
  .wp-block-details.hgi-bibliography-fold > p,
  .wp-block-details.hgi-bibliography-fold > .wp-block-paragraph {padding:8px 12px !important;}
  .wp-block-table.hgi-site-table th,
  .wp-block-table.hgi-site-table td {padding:9px 10px !important;}
}
