:is(#course-ai-automation, :is(#course-data-science, #course-ds-genai-ml)) .ml-module-dialog {
  width: min(680px, calc(100vw - 32px));
  max-width: none;
  max-height: min(820px, calc(100dvh - 40px));
  padding: 0;
  margin: auto;
  border: 1px solid #dec1d3;
  border-radius: 18px;
  background: #fbf4f8;
  color: #3c2032;
  box-shadow: 0 24px 80px #24152540;
  overflow: hidden;
}
:is(#course-ai-automation, :is(#course-data-science, #course-ds-genai-ml)) .ml-module-dialog[open] { display: flex; flex-direction: column; }
:is(#course-ai-automation, :is(#course-data-science, #course-ds-genai-ml)) .ml-module-dialog::backdrop { background: #24152599; }
:is(#course-ai-automation, :is(#course-data-science, #course-ds-genai-ml)) .ml-module-dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  background: #241525;
  color: white;
  flex-shrink: 0;
}
:is(#course-ai-automation, :is(#course-data-science, #course-ds-genai-ml)) .ml-module-dialog-heading h2 { color: white; font-size: 22px; line-height: 1.35; margin: 6px 0 0; }
:is(#course-ai-automation, :is(#course-data-science, #course-ds-genai-ml)) .ml-module-dialog-meta { color: white; font-size: 10px; font-weight: 700; letter-spacing: 1px; margin: 0; }
:is(#course-ai-automation, :is(#course-data-science, #course-ds-genai-ml)) .ml-module-dialog-close { flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid #ffffff50; border-radius: 10px; color: white; background: #ffffff12; cursor: pointer; font-size: 26px; }
:is(#course-ai-automation, :is(#course-data-science, #course-ds-genai-ml)) .ml-module-dialog-content { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
:is(#course-ai-automation, :is(#course-data-science, #course-ds-genai-ml)) .ml-module-dialog .ml-module-part h4 {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--ml-prep-accent);
  color: #fff;
  overflow-wrap: anywhere;
}
:is(#course-ai-automation, :is(#course-data-science, #course-ds-genai-ml)) .ml-module-dialog .ml-module-part h4 > span { color: #fff; }
:is(#course-ai-automation, :is(#course-data-science, #course-ds-genai-ml)) .ml-module-dialog-action { padding: 16px 22px; border-top: 1px solid #dec1d3; flex-shrink: 0; }
:is(#course-ai-automation, :is(#course-data-science, #course-ds-genai-ml)) .ml-module-dialog-action button { width: 100%; min-height: 48px; padding: 12px 16px; border: 0; border-radius: 10px; background: #241525; color: white; font: inherit; font-weight: 750; cursor: pointer; }
:is(#course-ai-automation, :is(#course-data-science, #course-ds-genai-ml)) .ml-module-dialog-action button:hover { background: #4c2344; }
:is(#course-ai-automation, :is(#course-data-science, #course-ds-genai-ml)) .ml-module-dialog button:focus-visible { outline: 3px solid #b40982; outline-offset: 2px; }
@media (max-width: 480px) {
  :is(#course-ai-automation, :is(#course-data-science, #course-ds-genai-ml)) .ml-module-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 24px); border-radius: 14px; }
  :is(#course-ai-automation, :is(#course-data-science, #course-ds-genai-ml)) .ml-module-dialog-heading { padding: 16px; gap: 10px; }
  :is(#course-ai-automation, :is(#course-data-science, #course-ds-genai-ml)) .ml-module-dialog-heading h2 { font-size: 18px; }
  :is(#course-ai-automation, :is(#course-data-science, #course-ds-genai-ml)) .ml-module-dialog-action { padding: 12px 16px; }
}

/* Centre the seventh ML module while preserving the two-column card width. */
@container ml-preparation (min-width: 801px) {
  #course-ai-automation .ml-module-grid > .ml-module-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - 22px) / 2);
  }
}
