/* SPM Text Box Design Repair 2.0.0 — direct CSS styling, activated by WordPress body_class. */
body.spm-textbox-restyle-200,
body.spm-textbox-restyle-200 * { box-sizing: border-box; }
body.spm-textbox-restyle-200 { overflow-wrap: anywhere; }
body.spm-textbox-restyle-200 p,
body.spm-textbox-restyle-200 li { line-height: var(--spm-textbox-line-height, 1.7) !important; }
body.spm-textbox-restyle-200 h1,
body.spm-textbox-restyle-200 h2,
body.spm-textbox-restyle-200 h3,
body.spm-textbox-restyle-200 h4,
body.spm-textbox-restyle-200 h5,
body.spm-textbox-restyle-200 h6 { line-height: 1.25 !important; overflow-wrap: anywhere; }

/* Exact SPM Individual Course Pages panels. These rules deliberately use high specificity and !important
   because the screenshot showed the theme's rules collapsing the course panels' internal padding. */
body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-intro,
body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-audience,
body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-enquiry,
body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-module-grid > .spm-cdp-module,
body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-check-list > li,
body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-pathway-list > li,
body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-practical-grid > article,
body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-disclaimer {
  box-sizing: border-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
  padding: var(--spm-textbox-pad-desktop, 30px) !important;
  border-radius: 17px !important;
  overflow-wrap: anywhere !important;
}

/* Deliberately restyle the course page text panels so the change is obvious. */
body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-practical-grid > article {
  background: #f3f8fc !important;
  border: 1px solid #d6e4ef !important;
  border-left: 5px solid #159db0 !important;
  box-shadow: 0 8px 24px rgba(16,47,82,.07) !important;
}
body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-practical-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 22px !important;
}
body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-practical-grid > article .spm-cdp-eyebrow {
  display: inline-block !important;
  margin: 0 0 12px !important;
  color: #1769aa !important;
}
body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-practical-grid > article h2 {
  margin: 0 0 14px !important;
  color: #102f52 !important;
  font-size: clamp(21px, 2vw, 27px) !important;
  line-height: 1.3 !important;
}
body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-practical-grid > article p {
  margin: 0 !important;
  color: #506982 !important;
  font-size: 16px !important;
  line-height: 1.75 !important;
}

body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-intro {
  padding: var(--spm-textbox-pad-desktop, 30px) !important;
  gap: 28px !important;
}
body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-audience {
  background: #eef6fb !important;
  border: 1px solid #d8e8f2 !important;
  border-left: 5px solid #159db0 !important;
}
body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-module-grid > .spm-cdp-module,
body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-check-list > li,
body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-pathway-list > li {
  background: #f5f9fc !important;
  border: 1px solid #dbe7f0 !important;
  box-shadow: 0 5px 15px rgba(16,47,82,.045) !important;
}
body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-section-heading { margin-bottom: 22px !important; }
body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-section-heading h2 { margin: 10px 0 14px !important; }
body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-enquiry { padding: 30px !important; }
body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-disclaimer { background: #fff8ed !important; }

/* WordPress core panels and text-bearing blocks. */
body.spm-textbox-restyle-200 .wp-block-group.has-background,
body.spm-textbox-restyle-200 .wp-block-media-text__content,
body.spm-textbox-restyle-200 .wp-block-quote,
body.spm-textbox-restyle-200 .wp-block-pullquote,
body.spm-textbox-restyle-200 .wp-block-details,
body.spm-textbox-restyle-200 .wp-block-table,
body.spm-textbox-restyle-200 .wp-block-cover__inner-container > .wp-block-group {
  box-sizing: border-box !important;
  padding: var(--spm-textbox-pad-desktop, 30px) !important;
  border-radius: 16px !important;
  min-width: 0 !important;
}

/* Common builder and theme cards. */
body.spm-textbox-restyle-200 :is(
  .elementor-widget-icon-box .elementor-icon-box-wrapper,
  .elementor-widget-call-to-action .elementor-cta,
  .elementor-widget-testimonial .elementor-testimonial-wrapper,
  .elementor-post__card,
  .et_pb_blurb_content,
  .et_pb_promo_description,
  .kt-inside-inner-col,
  .wp-block-kadence-column .kt-inside-inner-col,
  .card, .card-body, .content-card, .info-card, .feature-card, .service-card,
  .course-card, .programme-card, .program-card, .text-card, .text-box, .content-box,
  .info-box, .notice-box, .callout-box, .panel-box
) {
  box-sizing: border-box !important;
  padding: var(--spm-textbox-pad-desktop, 30px) !important;
  min-width: 0 !important;
  border-radius: 16px !important;
  overflow-wrap: anywhere !important;
}

/* Automatic panel matches and optional administrator selectors. */
body.spm-textbox-restyle-200 .spm-textbox-restyled,
body.spm-textbox-restyle-200 .spm-textbox-restyled-force {
  box-sizing: border-box !important;
  padding: var(--spm-textbox-pad-desktop, 30px) !important;
  min-width: 0 !important;
  max-width: 100% !important;
  border: 1px solid #d9e5ef !important;
  border-left: 4px solid #159db0 !important;
  border-radius: 16px !important;
  background: #f4f8fc !important;
  box-shadow: 0 7px 20px rgba(16,47,82,.06) !important;
  overflow-wrap: anywhere !important;
}
body.spm-textbox-restyle-200 .spm-textbox-restyled > :first-child,
body.spm-textbox-restyle-200 .spm-textbox-restyled-force > :first-child { margin-top: 0 !important; }
body.spm-textbox-restyle-200 .spm-textbox-restyled > :last-child,
body.spm-textbox-restyle-200 .spm-textbox-restyled-force > :last-child { margin-bottom: 0 !important; }
body.spm-textbox-restyle-200 .spm-textbox-restyled p,
body.spm-textbox-restyle-200 .spm-textbox-restyled-force p { line-height: var(--spm-textbox-line-height, 1.7) !important; }

/* Style presets */
body.spm-textbox-style-white-teal .spm-textbox-restyled,
body.spm-textbox-style-white-teal .spm-textbox-restyled-force,
body.spm-textbox-style-white-teal .spm-cdp-practical-grid > article { background:#fff !important; }
body.spm-textbox-style-warm-neutral .spm-textbox-restyled,
body.spm-textbox-style-warm-neutral .spm-textbox-restyled-force,
body.spm-textbox-style-warm-neutral .spm-cdp-practical-grid > article { background:#fbf8f2 !important; border-color:#eadfce !important; border-left-color:#d58b32 !important; }

@media (min-width: 769px) and (max-width: 1100px) {
  body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-intro,
  body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-audience,
  body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-enquiry,
  body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-practical-grid > article,
  body.spm-textbox-restyle-200 :is(.wp-block-group.has-background,.wp-block-media-text__content,.wp-block-quote,.wp-block-pullquote,.card,.card-body,.content-card,.info-card,.feature-card,.service-card,.course-card,.programme-card,.text-card,.text-box,.content-box),
  body.spm-textbox-restyle-200 .spm-textbox-restyled,
  body.spm-textbox-restyle-200 .spm-textbox-restyled-force { padding: var(--spm-textbox-pad-tablet, 24px) !important; }
}
@media (max-width: 768px) {
  body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-practical-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
  body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-intro,
  body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-audience,
  body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-enquiry,
  body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-module-grid > .spm-cdp-module,
  body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-check-list > li,
  body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-pathway-list > li,
  body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-practical-grid > article,
  body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-disclaimer,
  body.spm-textbox-restyle-200 :is(.wp-block-group.has-background,.wp-block-media-text__content,.wp-block-quote,.wp-block-pullquote,.card,.card-body,.content-card,.info-card,.feature-card,.service-card,.course-card,.programme-card,.text-card,.text-box,.content-box),
  body.spm-textbox-restyle-200 .spm-textbox-restyled,
  body.spm-textbox-restyle-200 .spm-textbox-restyled-force { padding: var(--spm-textbox-pad-mobile, 18px) !important; }
  body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-practical-grid > article h2 { margin: 0 0 10px !important; font-size: 21px !important; }
  body.spm-textbox-restyle-200 .spm-cdp-page-content .spm-cdp-practical-grid > article p { font-size: 15px !important; line-height: 1.7 !important; }
}
