.ast-container,
.ast-container-fluid {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}


/* wrap */
.ml-wrap { font-family: inherit; }

/* progress */
.ml-progress{
  display:flex; align-items:center; gap:12px;
  margin: 6px 0 14px;
}
.ml-bar{
  flex:1; height:14px; border-radius:999px;
  background:#e6e6ee; overflow:hidden;
}
.ml-bar-fill{
  height:100%;
  background:#39e75f;
}
.ml-pct{ font-weight:700; opacity:.8; min-width:48px; text-align:right; }

/* list items */
.ml-item{
  display:flex; align-items:center; gap:14px;
  padding:12px 14px;
  border-radius:14px;
  background:#f7f7fb;
  border:1px solid rgba(0,0,0,.08);
  margin:10px 0;
}
.ml-thumb{
  width:72px; height:48px;
  border-radius:10px;
  background-size:cover;
  background-position:center;
  flex: 0 0 auto;
}
.ml-title{ flex:1; font-size:18px; font-weight:700; }
.ml-title a{ text-decoration:none; color:#222; }
.ml-title a:hover{ text-decoration:underline; }

.ml-icon{
  width:44px; height:44px;
  display:flex; align-items:center; justify-content:center;
  border-radius:12px;
  font-size:20px;
  background:rgba(0,0,0,.04);
}

/* states */
.ml-done .ml-icon{ color:#20c05a; }
.ml-locked{ opacity:.6; }
.ml-locked .ml-title span{ color:#333; }

.ml-current{
  background: linear-gradient(90deg, rgba(140,90,255,.35), rgba(140,90,255,.12));
  border-color: rgba(140,90,255,.35);
}
.ml-current .ml-title a{ color:#1f1a2b; }
.ml-current .ml-icon{ color:#5b35ff; }


/* Жёстко перетираем любые стили темы */
body .msa-wrap .msa-table button.msa-reply-btn.msa-reply-edit{
  all: unset !important;
  box-sizing: border-box !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  padding: 10px 16px !important;
  min-width: 160px !important;
  height: auto !important;

  background: #e5e7eb !important;
  color: #111827 !important;

  border-radius: 999px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1 !important;

  cursor: pointer !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

/* На всякий случай отключаем псевдо-элементы, если тема делает из кнопки "тумблер" */
body .msa-wrap .msa-table button.msa-reply-btn.msa-reply-edit::before,
body .msa-wrap .msa-table button.msa-reply-btn.msa-reply-edit::after{
  content: none !important;
}

/* Если в ячейке тема включает weird layout */
body .msa-wrap .msa-table td{
  vertical-align: middle;
}



.ms-new-badge{
  background:#dcfce7;
  color:#166534;
  border:1px solid rgba(34,197,94,.35);
  padding:6px 10px;
  border-radius:999px;
  font-weight:900;
  font-size:12px;
  line-height:1;
  white-space:nowrap;
}

.ms-toast{
  position:fixed;
  right:16px;
  bottom:16px;
  z-index:999999;
  width:min(380px, calc(100vw - 32px));
  background:#0b1220;
  color:#fff;
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  padding:14px 14px 12px;
  box-shadow:0 20px 50px rgba(0,0,0,.35);
}

.ms-toast-btn{
  border:0;
  border-radius:999px;
  padding:10px 14px;
  font-weight:900;
  cursor:pointer;
}

.ms-toast-close{ background:#e5e7eb; color:#111827; }
.ms-toast-open{ background:#22c55e; color:#052e16; }
.ms-inbox{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,.12);
  text-decoration: none !important;
}

.ms-inbox-ico{
  width: 60px;
  height: 22px;
  fill: #ffffff;
  opacity: 1;
}

.ms-inbox:hover{ background: rgba(255,255,255,.18); }

.ms-inbox-badge{
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  background: #ef4444;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

.ms-inbox{
  width: 52px;   /* было 42 */
  height: 52px;
  border-radius: 14px;
}

/* Общий контейнер чата */
.ms-chat{
  display:flex;
  flex-direction:column;
  height: 72vh;
}

/* Уведомления */
.ms-toast{
  padding:10px 12px;
  border-radius:12px;
  margin-bottom:10px;
  font-weight:600;
  border:1px solid rgba(17,24,39,.12);
  background:#fff;
}
.ms-ok{ background:#ECFDF5; border-color:#A7F3D0; }
.ms-err{ background:#FEF2F2; border-color:#FECACA; }

/* История */
.ms-history{
  flex:1 1 auto;
  overflow:auto;
  padding:12px;
  border-radius:16px;
  border:1px solid #E5E7EB;
  background:#fff;
}

/* Пусто */
.ms-empty{
  color:#6B7280;
  padding:12px;
}

/* Bubble */
.ms-bubble{
  margin-bottom:12px;
}
.ms-bubble.ms-user{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
}

/* “Сообщение” пользователя */
.ms-user .ms-text,
.ms-user .ms-files{
  background:#F3F4F6;
  border:1px solid #E5E7EB;
  border-radius:14px;
  padding:10px 12px;
  max-width: 92%;
}

/* Метаданные */
.ms-meta{
  font-size:12px;
  color:#6B7280;
  margin-bottom:6px;
}

/* Файлы */
.ms-files{ margin-top:8px; display:flex; gap:8px; flex-wrap:wrap; }
.ms-file{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid #E5E7EB;
  background:#fff;
  text-decoration:none;
  color:#111827;
  font-weight:600;
}

/* Ответ наставника */
.ms-bubble.ms-admin{
  margin-top:10px;
  background:#F8FAFC;
  border:1px solid rgba(17,24,39,.12);
  border-radius:14px;
  padding:10px 12px;
  max-width: 92%;
}
.ms-admin-title{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.ms-new-badge{
  font-size:12px;
  font-weight:700;
  background:#FEF3C7;
  border:1px solid #FCD34D;
  color:#92400E;
  padding:4px 8px;
  border-radius:999px;
}

/* Composer снизу */
.ms-composer{
  position: sticky;
  bottom:0;
  margin-top:10px;
  padding:12px;
  border-radius:16px;
  border:1px solid #E5E7EB;
  background:#fff;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.06);
}

/* input */
.ms-input{
  width:100%;
  min-height:44px;
  max-height:140px;
  border-radius:14px;
  border:1px solid #E5E7EB;
  padding:10px 12px;
  resize:vertical;
  outline:none;
}

/* action row */
.ms-actions{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:10px;
  flex-wrap:wrap;
}

/* скрываем input file */
#ms-files{
  position:absolute;
  left:-9999px;
}

/* скрепка */
.ms-clip{
  width:42px;
  height:42px;
  border-radius:14px;
  border:1px solid #E5E7EB;
  background:#F9FAFB;
  cursor:pointer;
  font-size:18px;
}

/* список выбранных файлов */
.ms-picked{
  flex:1 1 auto;
  min-width:180px;
  color:#6B7280;
  font-size:13px;
  font-weight:600;
}

/* кнопка отправить */
.ms-send{
  padding:10px 16px;
  border-radius:14px;
  font-weight:800;
  cursor:pointer;
}

/* УБИРАЕМ общую прозрачность */
.ms-history,
.ms-bubble,
.ms-admin,
.ms-user {
  opacity: 1 !important;
}
/* Основной текст */
.ms-text,
.ms-comment,
.ms-history {
  color: #111827 !important; /* почти чёрный */
}

/* Дата/время */
.ms-time {
  color: #6B7280 !important; /* нормальный серый */
}

/* Заголовки */
.ms-admin-title,
.ms-admin-title b {
  color: #0F172A !important;
  font-weight: 700;
}
.ms-input {
  background: #FFFFFF !important;
  color: #111827 !important;
  border: 1px solid #D1D5DB;
}

.ms-input::placeholder {
  color: #9CA3AF;
  opacity: 1;
}
.ms-user .ms-text,
.ms-user .ms-files {
  background: #F9FAFB !important;
  border-color: #E5E7EB;
}

.ms-bubble.ms-admin {
  background: #EEF2FF !important; /* лёгкий фиолетовый */
}

.ms-chat-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  background: #fff;
}

.ms-input {
  flex: 1;
  border: none;
  resize: none;
  font-size: 15px;
  color: #111827;
  outline: none;
  max-height: 120px;
}

.ms-attach-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #F3F4F6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
}

.ms-attach-btn:hover {
  background: #E5E7EB;
}

.ms-send-btn {
  background: #F59E0B;
  color: #000;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
}

.ms-chat-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  background: #fff;
}

.ms-input {
  flex: 1;
  border: none;
  resize: none;
  outline: none;
  font-size: 15px;
}

.ms-clip {
  background: #F3F4F6;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  cursor: pointer;
  font-size: 18px;
}

.ms-send {
  background: #F59E0B;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
}

.ms-picked {
  margin-top: 6px;
  font-size: 13px;
  color: #374151;
}

.ms-file {
  display: inline-block;
  margin-right: 8px;
}

/* КНОПКА-СКРЕПКА */
.ms-clip {
  display: flex !important;
  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;
  min-width: 40px;

  border-radius: 50%;
  background: #F3F4F6;
  color: #111827;          /* <-- ВАЖНО */
  font-size: 18px;

  cursor: pointer;
  border: none;
  padding: 0;
  flex-shrink: 0;          /* <-- чтобы flex не сжимал */
}

.ms-clip:hover {
  background: #E5E7EB;
}


body.single-sfwd-lessons {
  background: #ffffff !important;
}

body.single-sfwd-lessons .site,
body.single-sfwd-lessons #page,
body.single-sfwd-lessons .learndash-wrapper {
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Убираем "рамку" вокруг страниц уроков */
body {
  background: #ffffff !important;
}

.site,
#page,
.learndash-wrapper {
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

body.single-sfwd-lessons .ast-container {
  padding-top: 0 !important;
}

/* Скрываем header только на страницах уроков LearnDash */
body.single-sfwd-lessons header.site-header {
  display: none !important;
}

/* Убираем возможный отступ сверху */
body.single-sfwd-lessons {
  padding-top: 0 !important;
}


/* 1) Кликабельная область = только сама кнопка (не весь блок) */
.elementor-widget-button .elementor-button {
  display: inline-flex !important;
  width: auto !important;
  max-width: max-content !important;
}

/* 2) Чтобы сам виджет не растягивал кнопку по ширине */
.elementor-widget-button {
  width: auto !important;
}

/* 3) На всякий: если кнопка внутри flex-контейнера */
.elementor-widget-button,
.elementor-widget-button .elementor-button-wrapper {
  display: inline-block !important;
}

/* ====== LEARNDASH: hide ALL native UI ====== */

/* Progress bar */
.learndash-wrapper .ld-progress,
.learndash-wrapper .ld-progress-wrap {
    display: none !important;
}

/* Mark Complete + Next / Previous container */
.learndash-wrapper .ld-content-actions,
.learndash-wrapper .ld-content-actions * {
    display: none !important;
}

/* Breadcrumbs */
.learndash-wrapper .ld-breadcrumbs {
    display: none !important;
}

/* Status blocks (lesson/course/topic status) */
.learndash-wrapper .ld-lesson-status,
.learndash-wrapper .ld-topic-status,
.learndash-wrapper .ld-course-status {
    display: none !important;
}

/* Any LearnDash buttons */
.learndash-wrapper .ld-button,
.learndash-wrapper .ld-course-step-back,
.learndash-wrapper .ld-course-step-forward {
    display: none !important;
}

/* Remove empty spacing left by LearnDash */
.learndash-wrapper .ld-content-actions {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}


.single-sfwd-lessons .learndash-wrapper .ld-progress,
.single-sfwd-lessons .learndash-wrapper .ld-content-actions,
.single-sfwd-lessons .learndash-wrapper .ld-breadcrumbs {
    display: none !important;
}



/* ===== Hide "Similar/Related posts" + post navigation ONLY on LearnDash lessons ===== */
.single-sfwd-lessons .jp-relatedposts,            /* Jetpack Related Posts */
.single-sfwd-lessons .yarpp-related,              /* YARPP */
.single-sfwd-lessons .related-posts,
.single-sfwd-lessons .related-post,
.single-sfwd-lessons .posts-related,
.single-sfwd-lessons .ast-related-posts-wrapper,  /* Astra related posts */
.single-sfwd-lessons .kadence-related-content,    /* Kadence related */
.single-sfwd-lessons .elementor-post-navigation,  /* Elementor Post Navigation widget */
.single-sfwd-lessons .post-navigation,            /* WP prev/next post nav */
.single-sfwd-lessons nav.navigation,
.single-sfwd-lessons .navigation.post-navigation,
.single-sfwd-lessons .posts-navigation,
.single-sfwd-lessons .nav-links {
  display: none !important;
}


.ms-hint{
  margin-top:10px;
  font-size:13px;
  opacity:.7;
  text-align:center;
	color:black;
}


/* Badge strip */
.ds-badges { margin-top: 14px; }
.ds-badges-row { display:flex; gap:14px; align-items:flex-start; flex-wrap:wrap; }

.ds-badge {
  width: 90px;
  text-align: center;
  font-size: 12px;
  line-height: 1.2;
}
.ds-badge-img img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  display:block;
  margin: 0 auto 6px;
}
.ds-badge-title { color:#111; font-weight:600; }

/* View more button */
.ds-badges-more {
  border: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(0,0,0,0.12);
  cursor:pointer;
  font-weight:700;
}

/* Modal */
.ds-modal { display:none; position:fixed; inset:0; z-index:9999; }
.ds-modal[aria-hidden="false"] { display:block; }
.ds-modal-backdrop { position:absolute; inset:0; background: rgba(0,0,0,0.55); }

.ds-modal-dialog {
  position: relative;
  width: min(900px, 92vw);
  max-height: 80vh;
  overflow: auto;
  margin: 8vh auto;
  background: #fff;
  border-radius: 18px;
  padding: 18px 18px 22px;
}

.ds-modal-title { margin: 0 0 14px; }
.ds-modal-close {
  position:absolute; top:10px; right:12px;
  width:40px; height:40px;
  border-radius:12px;
  border:0;
  background: rgba(0,0,0,0.08);
  font-size: 26px;
  cursor:pointer;
}

.ds-modal-grid {
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 16px;
}
.ds-badge--modal { width: 100%; }

/* Hide "Урок 7" Elementor widget ONLY on final lesson */
body.ld-final-lesson .lesson-line__word {
	display: none !important;
}

/* PREMIUM Certificate button */
a[href*="sfwd-certificates"]{
  display: inline-flex;
  align-items: center;
  gap: 12px;

  padding: 14px 22px;
  border-radius: 16px;

  background: linear-gradient(135deg, #f5a400, #ffcc33);
  color: #111 !important;

  font-size: 16px;
  font-weight: 700;
  letter-spacing: .2px;

  text-decoration: none !important;
  box-shadow: 0 14px 30px rgba(0,0,0,.18);

  transition:
    transform .18s ease,
    box-shadow .18s ease,
    filter .18s ease;
}

/* Hover */
a[href*="sfwd-certificates"]:hover{
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(0,0,0,.25);
  filter: brightness(1.04);
}

/* Active */
a[href*="sfwd-certificates"]:active{
  transform: translateY(0);
  box-shadow: 0 10px 20px rgba(0,0,0,.18);
}
/* Certificate icon */
a[href*="sfwd-certificates"]::before{
  content: "🏆";
  font-size: 20px;
  line-height: 1;
}

/* subtle pulse on final lesson */
body.ld-final-lesson a[href*="sfwd-certificates"]{
  animation: certPulse 2.2s ease-in-out infinite;
}

@keyframes certPulse{
  0%   { box-shadow: 0 0 0 0 rgba(255,204,51,.55); }
  70%  { box-shadow: 0 0 0 16px rgba(255,204,51,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,204,51,0); }
}

.mission-panel{
  border-radius: 18px;
  padding: 18px;
  background: #7b55ff;
  color: #fff;
}

.mission-panel__title{
  font-weight: 900;
  letter-spacing: .03em;
  font-size: 20px;
  text-transform: uppercase;
  border-bottom: 2px solid rgba(255,255,255,.3);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.mission-panel__list{
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mission-card{
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
}

.mission-card__img{
  display:block;
  width: 120px;
  height: 120px;
  background: rgba(0,0,0,.15);
}

.mission-card__img img{
  width: 120px;
  height: 120px;
  object-fit: cover;
  display: block;
}

.mission-card__img--placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:900;
  text-decoration:none;
  color:#fff;
  opacity:.9;
}

.mission-card__body{
  padding: 12px 12px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mission-card__name{
  font-weight: 900;
  font-size: 16px;
  line-height: 1.2;
}

.mission-card__progress-top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  font-size: 13px;
  opacity: .95;
}

.mission-card__bar{
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.25);
  overflow: hidden;
}

.mission-card__bar-fill{
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #00e5ff, #00ff85);
}

.mission-card__btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffe24a;
  color: #000;
  font-weight: 900;
  text-decoration: none;
  border-radius: 12px;
  padding: 10px 14px;
  width: fit-content;
  transition: transform .12s ease, filter .12s ease;
}

.mission-card__btn:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.mission-empty{
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
}

.mission-empty__text{
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 12px;
}

.mission-empty__btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: #ffe24a;
  color:#000;
  font-weight:900;
  text-decoration:none;
  border-radius: 14px;
  padding: 12px 16px;
  text-decoration:none;
}

/* Убираем фон/подложку вокруг аватара */
.ds-avatar-open,
.ds-avatar-open--avatar{
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
}

/* Если синий цвет — это не фон, а внешний контейнер (на всякий случай) */
.ds-ava-modal-wrap{
  background: transparent !important;
}

/* Круглый аватар */
.ds-avatar-img{
  border-radius: 999px !important;
  overflow: hidden !important;
  display: block;
}

/* Если где-то картинка не квадратная — обрежем красиво */
.ds-avatar-img{
  object-fit: cover;
}

.ds-ava-open-hint{
  display:none !important;
}


/* Делаем аватар относительным контейнером */
.ds-avatar-open{
  position: relative;
}

/* Иконка карандаша */
.ds-avatar-open::after{
  content: "✏️";
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 28px;
  height: 28px;
  background: #000;
  color: #fff;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  pointer-events: none; /* чтобы клик шел по аватару */
}

.ms-row{
  display:flex;
  gap:10px;
  align-items:flex-end;
}

.ms-left { justify-content:flex-start; }
.ms-right { justify-content:flex-end; }

.ms-avatar img{
  width:32px;
  height:32px;
  border-radius:999px;
  object-fit:cover;
  display:block;
}

.ms-avatar--right{
  order:2; /* puts avatar on right side of the bubble in ms-right layout */
}

.ms-right .ms-bubble{
  display:flex;
  gap:10px;
  align-items:flex-end;
}

.ms-right .ms-admin-title,
.ms-right .ms-text{
  flex:1;
}


/* Убираем левый блок Pay online / Free / Total */
.mepr-checkout-container .mepr-checkout-left,
.mp_wrapper .mepr-checkout-left,
.mepr_price_box,
.mepr-product-price-box {
  display: none !important;
}

/* Растягиваем саму форму */
.mepr-checkout-container .mepr-checkout-right,
.mp_wrapper .mepr-checkout-right {
  width: 100% !important;
  max-width: 650px;
  margin: 0 auto;
  float: none !important;
}

/* На случай, если контейнер двухколоночный */
.mepr-checkout-container,
.mp_wrapper {
  display: block !important;
}

/* Делаем форму аккуратнее */
.mepr-checkout-form,
.mp_wrapper form {
  max-width: 650px;
  margin: 0 auto;
}