/* MvM Pagebuilder — shared style variants for PostX + core blocks */

.is-style-mvm-card.ultp-block-wrapper,
.is-style-mvm-card .ultp-block-item,
.is-style-mvm-card .ultp-post-item,
.wp-block-ultimate-post-post-grid-1.is-style-mvm-card,
.wp-block-ultimate-post-post-grid-2.is-style-mvm-card,
.wp-block-ultimate-post-post-grid-3.is-style-mvm-card,
.wp-block-ultimate-post-post-grid-4.is-style-mvm-card,
.wp-block-ultimate-post-post-grid-5.is-style-mvm-card,
.wp-block-ultimate-post-post-grid-6.is-style-mvm-card,
.wp-block-ultimate-post-post-grid-7.is-style-mvm-card {
  overflow: clip;
  border: 1px solid var(--mvm-border, #dce6ef);
  border-radius: 18px;
  background: var(--mvm-surface, #fff);
  box-shadow: var(--mvm-shadow-soft, 0 8px 26px rgba(23,33,43,.07));
}

.is-style-mvm-flat.ultp-block-wrapper,
.is-style-mvm-flat .ultp-block-item,
.is-style-mvm-flat .ultp-post-item {
  border-radius: 16px;
  border-color: transparent;
  box-shadow: none;
}

.is-style-mvm-accent.ultp-block-wrapper,
.is-style-mvm-accent .ultp-block-item,
.is-style-mvm-accent .ultp-post-item {
  border-top: 4px solid var(--mvm-blue, #1966AE);
  border-radius: 18px;
}

.wp-block-ultimate-post-heading.is-style-mvm-section-title,
.is-style-mvm-section-title.ultp-block-wrapper {
  margin-bottom: 20px;
}

.wp-block-ultimate-post-heading.is-style-mvm-section-title .ultp-heading-wrap,
.is-style-mvm-section-title .ultp-heading-wrap {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  border: 0 !important;
}

.wp-block-ultimate-post-heading.is-style-mvm-section-title .ultp-heading-text,
.is-style-mvm-section-title .ultp-heading-text {
  color: var(--mvm-ink, #17212b) !important;
  font-family: inherit !important;
  font-weight: 850 !important;
  letter-spacing: -.02em;
}

.mvm-builder-template-note {
  padding: 12px 14px;
  border: 1px solid var(--mvm-border, #dce6ef);
  border-radius: 12px;
  background: var(--mvm-blue-050, #eef6fc);
  color: var(--mvm-ink, #17212b);
  font-size: .9rem;
}

body[data-mvm-theme="dark"] .is-style-mvm-card.ultp-block-wrapper,
body[data-mvm-theme="dark"] .is-style-mvm-card .ultp-block-item,
body[data-mvm-theme="dark"] .is-style-mvm-card .ultp-post-item {
  border-color: #30404e;
  background: #18222c;
  box-shadow: none;
}

body[data-mvm-theme="dark"] .wp-block-ultimate-post-heading.is-style-mvm-section-title .ultp-heading-text,
body[data-mvm-theme="dark"] .is-style-mvm-section-title .ultp-heading-text {
  color: #f5f7fa !important;
}

/* MvM Saved Templates supply their own section heading in Elementor. Hide the
 * generic PostX default title such as "Post Grid #3" or "Post Module #1". */
.mvm-builder-postx--headline > .ultp-block-wrapper > .ultp-heading-filter,
.mvm-builder-postx--grid > .ultp-block-wrapper > .ultp-heading-filter,
.mvm-builder-postx--compact > .ultp-block-wrapper > .ultp-heading-filter,
.mvm-builder-postx--slider > .ultp-block-wrapper > .ultp-heading-filter {
  display: none !important;
}

.mvm-postx-block .mvm-category-badge,
[class*="mvm-builder-postx--"] .ultp-category-in a,
.mvm-elementor-postx .ultp-category-in a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0 6px 6px 0;
  padding: 5px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .01em;
  text-decoration: none;
}

.mvm-builder-postx--headline .ultp-block-meta,
.mvm-builder-postx--grid .ultp-block-meta,
.mvm-builder-postx--compact .ultp-block-meta,
.mvm-builder-postx--slider .ultp-block-meta {
  display: none !important;
}

.mvm-postx-block .ultp-block-meta {
  gap: 8px;
  font-size: .78rem;
  line-height: 1.35;
}

.mvm-postx-block .ultp-block-meta svg {
  width: 14px;
  height: 14px;
}

@media (max-width: 640px) {
  .is-style-mvm-card.ultp-block-wrapper,
  .is-style-mvm-card .ultp-block-item,
  .is-style-mvm-card .ultp-post-item,
  .is-style-mvm-accent.ultp-block-wrapper,
  .is-style-mvm-accent .ultp-block-item,
  .is-style-mvm-accent .ultp-post-item {
    border-radius: 16px;
  }
}
