
.smv-text-advanced .smv-rich-content { overflow-wrap: anywhere; }
.smv-text-advanced .smv-rich-content p { margin-top: 0; margin-bottom: 1em; }
.smv-text-advanced .smv-rich-content p:last-child { margin-bottom: 0; }

.smv-section { border: 1px solid #e3e8ef; margin: 0 0 20px; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
.smv-section .smv-section-heading { box-sizing: border-box; background: #194979; color: #fff; font-size: 17px; line-height: 1.3; font-weight: 700; padding: 13px 16px; margin: 0; }
.smv-section.smv-section-verde .smv-section-heading { background: linear-gradient(180deg,#b6dba2,#398448); }
.smv-section.smv-section-simple .smv-section-heading { background: #f7f9fc; color: #194979; }
.smv-section-body > :first-child { margin-top: 0; }
.smv-section-body > :last-child { margin-bottom: 0; }
.smv-block-container-title { color: #194979; font-weight: 700; }

.smv-visual-editor {
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}
.smv-visual-editor-bar {
  padding: 16px 18px 14px;
  background: #ffffff;
  border-bottom: 1px solid #e7edf3;
}
.smv-editor-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  color: #163a5f;
}
.smv-editor-brand strong { font-size: 16px; font-weight: 700; }
.smv-editor-brand span { font-size: 12px; color: #6b7c8f; }
.smv-visual-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.smv-visual-actions .components-button {
  min-height: 34px;
  height: auto;
  white-space: nowrap;
  font-size: 12px;
  border-radius: 999px;
  padding: 6px 12px;
  box-shadow: none;
}
.smv-visual-actions .components-button.is-secondary {
  border: 1px solid #d8e1ea;
  background: #f8fafc;
  color: #173d64;
}
.smv-visual-actions .components-button.is-secondary:hover {
  background: #eef4f9;
  border-color: #c7d4e1;
  color: #163a5f;
}
.smv-visual-actions .components-button.is-primary {
  border: 1px solid #2b67a0;
  background: #2d6aa5;
  color: #fff;
}
.smv-visual-actions .components-button.is-primary:hover {
  background: #245a8e;
  border-color: #245a8e;
  color: #fff;
}
.smv-visual-toolbar-help {
  font-size: 11px;
  margin: 12px 0 0;
  color: #6a7d90;
  line-height: 1.5;
}
.smv-visual-canvas {
  min-height: 160px;
  padding: 24px;
  background: #fcfdff;
}
.smv-visual-canvas > .block-editor-inner-blocks { min-height: 100px; }
.smv-visual-canvas .block-list-appender { position: relative; }

.smv-rich-help {
  font-size: 11px;
  color: #6a7b8f;
  background: transparent;
  padding: 8px 10px;
  margin-bottom: 12px;
  border-left: 3px solid #d6e1ec;
}

.smv-file-picker,
.smv-shortcode-placeholder {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 18px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  color: #183b61;
}
.smv-file-picker strong,
.smv-shortcode-placeholder strong {
  display: block;
  font-size: 17px;
  line-height: 1.3;
  color: #183b61;
  margin-bottom: 10px;
}
.smv-file-search-row { display: flex; align-items: flex-end; gap: 8px; }
.smv-file-search-row > div { flex: 1; }
.smv-file-results {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  max-height: 210px;
  overflow: auto;
  border: 1px solid #e1e7ee;
  border-radius: 8px;
  padding: 8px;
  background: #fafcfe;
}
.smv-file-results .components-button {
  justify-content: flex-start;
  border-radius: 8px;
  padding: 6px 10px;
}
.smv-file-upload-label { display: block; padding: 10px 0; font-weight: 600; color: #183b61; }
.smv-file-upload-label input { display: block; margin-top: 7px; }
.smv-file-help, .smv-file-status, .smv-shortcode-placeholder small {
  font-size: 12px;
  color: #6b7d8e;
  line-height: 1.5;
}
.smv-file-selected { font-weight: 600; color: #194979; }
.smv-editor-file-link { display: inline-flex; align-items: center; gap: 8px; color: #194979; text-decoration: underline; }
.smv-editor-file-icon { font-size: 10px; background: #e8eef5; border: 1px solid #a8bacd; border-radius: 2px; padding: 3px 5px; font-weight: 700; }
.smv-file-pdf .smv-editor-file-icon { color: #b42318; }
.smv-file-xls .smv-editor-file-icon,.smv-file-xlsx .smv-editor-file-icon,.smv-file-csv .smv-editor-file-icon { color: #08783a; }

@media (max-width:650px) {
  .smv-visual-actions .components-button { flex: 1 1 42%; justify-content: center; }
  .smv-visual-canvas { padding: 14px; }
  .smv-file-search-row { flex-direction: column; align-items: stretch; }
}

/* v1.5.2 toolbar sizing / editable area */
.smv-visual-actions .components-button { border-radius: 8px; min-height: 38px; padding: 8px 12px; }
.smv-visual-editor-bar { background: #fff; }
.smv-visual-toolbar-help { font-size: 12px; }

/* 1.7.0: marco solo del editor, sin cajas decorativas en la publicación. */
.smv-visual-editor.wp-block-smv-editor-editor-visual:not(.block-editor-block-list__block) {
    border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
    padding: 0 !important; margin: 0 !important; background: transparent !important;
    overflow: visible !important;
}
.smv-visual-editor.wp-block-smv-editor-editor-visual:not(.block-editor-block-list__block) > :first-child { margin-top: 0; }
.smv-visual-editor.wp-block-smv-editor-editor-visual:not(.block-editor-block-list__block) > :last-child { margin-bottom: 0; }
.smv-file-breadcrumbs {display:flex;align-items:center;gap:3px;flex-wrap:wrap;padding:6px 8px;background:#f3f7fb;border:1px solid #dee7f0;border-radius:6px;margin:7px 0 9px;}
.smv-file-breadcrumbs .components-button {height:28px;min-height:28px;}
.smv-dir-label{font-size:11px;font-weight:700;color:#53697f;margin-top:12px;}
.smv-file-folder-controls{display:flex;align-items:center;gap:6px;margin:8px 0;}
.smv-file-create-folder{display:flex;align-items:flex-end;gap:8px;padding:10px;border-radius:6px;background:#f4f8fc;}
.smv-file-create-folder>div{flex:1;}
.smv-file-folder-list{display:flex;flex-direction:column;align-items:stretch;gap:4px;max-height:220px;overflow:auto;padding:8px;border:1px solid #e0e6ed;border-radius:6px;margin:8px 0 14px;}
.smv-file-folder-list .components-button{justify-content:flex-start;gap:8px;white-space:normal;text-align:left;height:auto;min-height:30px;}
.smv-file-folder-list .smv-fa-svg{flex:0 0 15px;}

/* 1.9: enlaces sin etiqueta redundante de formato. */
.smv-editor-file-link { text-decoration:underline; }

/* Un solo icono PDF al insertar dentro del texto. */
.smv-editor-inline-document {display:inline-flex;align-items:center;gap:5px;vertical-align:baseline;}
.smv-editor-inline-pdf-icon {width:17px;height:22px;flex:0 0 17px;vertical-align:middle;display:inline-block;}
.smv-editor-inline-document .smv-editor-file-icon {display:none!important;}

/* Divisor suave; visible de la misma forma en editor y publicación. */
.smv-soft-divider{box-sizing:border-box;width:100%;clear:both;margin:0!important;}
.smv-soft-divider-line{display:block;max-width:100%;margin:0 auto;border:0;box-sizing:border-box;}

/* Divisor insertado DENTRO del RichText, con margenes propios, no como bloque nuevo. */
.smv-text-advanced .smv-rich-content .smv-inline-text-divider,
.editor-styles-wrapper .smv-text-advanced .smv-rich-content .smv-inline-text-divider {
  display: block !important;
  box-sizing: border-box;
  width: 100%;
  padding: 18px 0;
  margin: 0;
  height: auto;
  min-height: 37px;
  font-size: 0;
  line-height: 0;
  text-align: center;
  clear: both;
}
.smv-text-advanced .smv-rich-content .smv-inline-text-divider::before,
.editor-styles-wrapper .smv-text-advanced .smv-rich-content .smv-inline-text-divider::before {
  content: "";
  display: block;
  width: 88%;
  height: 0;
  margin: 0 auto;
  border-top: 1px solid #d9dfe5;
}

/* En movil el divisor interior es mas compacto. */
@media (max-width: 767px) {
  .smv-text-advanced .smv-rich-content .smv-inline-text-divider,
  .editor-styles-wrapper .smv-text-advanced .smv-rich-content .smv-inline-text-divider {
    padding: 12px 0;
    min-height: 25px;
  }
  .smv-text-advanced .smv-rich-content .smv-inline-text-divider::before,
  .editor-styles-wrapper .smv-text-advanced .smv-rich-content .smv-inline-text-divider::before {
    width: 82%;
  }
}

/* SMV Design System typography: only default-sized text; editor custom sizes retain precedence. */
.smv-text-advanced .smv-rich-content[style*="font-size: 16px"],
.smv-text-advanced .smv-rich-content[style*="font-size:16px"]{
 font-size:var(--smv-ds-content-body-size,16px)!important;
 line-height:var(--smv-ds-content-line-height,1.6)!important;
}
.smv-section .smv-section-body > :is(p,.wp-block-paragraph){
 font-size:var(--smv-ds-content-body-size,16px);
 line-height:var(--smv-ds-content-line-height,1.6);
}
@media(max-width:767px){
 .smv-text-advanced .smv-rich-content[style*="font-size: 16px"],
 .smv-text-advanced .smv-rich-content[style*="font-size:16px"]{font-size:var(--smv-ds-content-mobile-size,16px)!important;}
 .smv-section .smv-section-body > :is(p,.wp-block-paragraph){font-size:var(--smv-ds-content-mobile-size,16px);}
}

/* 2.0.16: Justify long prose, but never stretch short copy, headings or PDF link rows. */
.smv-text-advanced .smv-rich-content[style*="justify"] p.smv-editor-no-justify,
.smv-text-advanced .smv-rich-content[style*="justify"] p:has(> a.smv-editor-file-link),
.smv-text-advanced .smv-rich-content[style*="justify"] p:has(> a.smv-editor-inline-document) {
  text-align: left !important;
  text-align-last: left !important;
}
.smv-text-advanced .smv-rich-content p > a.smv-editor-file-link,
.smv-text-advanced .smv-rich-content p > a.smv-editor-inline-document {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}
@media (max-width:767px) {
  .smv-text-advanced .smv-rich-content[style*="justify"] p.smv-editor-no-justify {
    word-spacing: normal;
  }
}
