/* ==========================================================================
   /tools/maternity-bag — интерактивный чек-лист
   Базовые стили (hero, breadcrumb, author-block, pillar, FAQ) — наследуем
   ========================================================================== */
@import url("/assets/css/pregnancy-calculator.css");

/* ---------- HERO (переименовываем префикс с .calc- на .mb-) ---------- */
.mb-page {
  background: #f8fbfb;
  padding: 0 0 60px;
}

.mb-hero {
  position: relative;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.55) 0%,
      rgba(240, 246, 246, 0.78) 100%
    ),
    url("/assets/images/calc-pregnancy-hero.webp") center / cover no-repeat,
    linear-gradient(180deg, #ffffff 0%, #f0f6f6 100%);
  padding: 110px 0 56px !important;
  margin-bottom: 0 !important;
  border-bottom: 1px solid #e5ecec;
  overflow: hidden;
}

.mb-hero > * {
  position: relative;
  z-index: 1;
}

.mb-hero-inner {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.mb-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #fff;
  border: 1px solid #e5ecec;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark-text-color);
  margin-bottom: 20px;
}

.mb-hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-color);
  box-shadow: 0 0 0 4px rgba(189, 160, 0, 0.18);
  animation: tools-pulse 2s ease-in-out infinite;
}

.mb-hero-title {
  font-family: "Montserrat", sans-serif;
  font-size: clamp(30px, 4.6vw, 50px) !important;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--main-bg-color);
  margin: 0 0 18px !important;
}

.mb-hero-title span {
  display: inline-block;
  position: relative;
  color: var(--gold-color);
  font-style: italic;
}

.mb-hero-title span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 7px;
  background: linear-gradient(
    90deg,
    rgba(247, 203, 202, 0.7),
    rgba(189, 160, 0, 0.3)
  );
  border-radius: 999px;
  z-index: -1;
}

.mb-hero-lead {
  max-width: 640px;
  margin: 0 auto 24px !important;
  font-size: 17px;
  line-height: 1.55;
  color: var(--dark-text-color);
}

.mb-hero-meta {
  display: inline-flex;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.mb-hero-meta li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--main-bg-color);
}

.mb-hero-meta li svg {
  color: var(--gold-color);
  flex-shrink: 0;
}

.mb-page > #container {
  padding-top: 40px;
}

/* ==========================================================================
   ОБЩИЙ ПРОГРЕСС
   ========================================================================== */
.mb-overall {
  background: linear-gradient(135deg, #111 0%, #1f1f1f 100%);
  color: #fff;
  border-radius: 20px;
  padding: 24px 28px !important;
  margin: 0 0 32px !important;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(17, 17, 17, 0.12);
}

/* Компактный режим отключён — sticky без изменения размеров, чтобы не дёргалось.
   Если когда-нибудь захочется минимизировать вид при скролле — делать это через
   position: fixed отдельным элементом, не трогая sticky-размер. */

.mb-overall::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -15%;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(189, 160, 0, 0.2), transparent 65%);
  pointer-events: none;
}

.mb-overall-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 14px;
  position: relative;
}

.mb-overall-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 6px;
}

.mb-overall-count {
  font-family: "Montserrat", sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.mb-overall-count #mb-total-done {
  color: var(--gold-color);
  font-size: 28px;
  font-weight: 800;
}

.mb-overall-pct {
  font-family: "Montserrat", sans-serif;
  font-size: 34px;
  font-weight: 800;
  color: var(--gold-color);
  line-height: 1;
  letter-spacing: -0.02em;
}

.mb-overall-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
  position: relative;
}

/* ---------- Кастомный чекбокс «Только несобранные» ---------- */
.mb-filter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  user-select: none;
  transition: color 0.2s ease;
}

.mb-filter:hover {
  color: #fff;
}

.mb-filter input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mb-filter-box {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mb-filter:hover .mb-filter-box {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.12);
}

.mb-filter input:focus-visible + .mb-filter-box {
  outline: 3px solid var(--gold-color);
  outline-offset: 2px;
}

.mb-filter input:checked + .mb-filter-box {
  background: var(--gold-color);
  border-color: var(--gold-color);
  color: var(--main-bg-color);
  transform: scale(1.05);
}

.mb-filter input:checked + .mb-filter-box svg {
  animation: mb-check-pop 0.25s cubic-bezier(0.2, 0.8, 0.2, 1.2);
}

.mb-filter input:checked ~ .mb-filter-text {
  color: #fff;
  font-weight: 700;
}

.mb-reset {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.mb-reset:hover {
  background: rgba(220, 72, 72, 0.85);
  color: #fff;
  border-color: transparent;
}

/* ==========================================================================
   ПРОГРЕСС-БАР (общий компонент)
   ========================================================================== */
.mb-progress-bar {
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.mb-progress-bar-small {
  height: 6px;
  background: #ecf1f1;
  margin-top: 14px;
}

.mb-progress-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--pink-color) 0%,
    var(--gold-color) 100%
  );
  border-radius: 999px;
  width: 0;
  transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ==========================================================================
   КАРТОЧКА СУМКИ
   ========================================================================== */
.mb-bag {
  background: #fff;
  border: 1px solid #e8efef;
  border-radius: 20px;
  padding: 28px 32px !important;
  margin: 0 0 22px !important;
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.04);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.mb-bag.is-complete {
  border-color: rgba(84, 208, 127, 0.4);
  box-shadow: 0 8px 24px rgba(84, 208, 127, 0.12);
}

.mb-bag-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 4px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  border-radius: 12px;
  padding: 4px;
  margin: -4px -4px 0;
  transition: background 0.2s ease;
}

.mb-bag-head:hover {
  background: #fafcfc;
}
.mb-bag-head:focus-visible {
  outline: 3px solid var(--gold-color);
  outline-offset: 2px;
}

/* ------- Коллапс-анимация тела карточки ------- */
.mb-bag-body {
  max-height: 5000px;
  overflow: hidden;
  transition:
    max-height 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.25s ease,
    margin 0.4s ease;
  opacity: 1;
}

.mb-bag.is-collapsed .mb-bag-body {
  max-height: 0;
  opacity: 0;
  margin: 0;
}

.mb-bag.is-collapsed .mb-bag-head {
  margin-bottom: 0;
}

.mb-bag-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.mb-bag-emoji {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}

.mb-bag-title {
  font-family: "Montserrat", sans-serif;
  font-size: 22px !important;
  font-weight: 700;
  margin: 0 !important;
  color: var(--main-bg-color);
  letter-spacing: -0.02em;
}

.mb-bag-desc {
  margin: 2px 0 0 !important;
  font-size: 13.5px !important;
  color: var(--dark-text-color);
  line-height: 1.4;
}

.mb-bag-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.mb-bag-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--dark-text-color);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mb-bag-head:hover .mb-bag-chevron {
  background: #f0f6f6;
  color: var(--main-bg-color);
}

.mb-bag.is-collapsed .mb-bag-chevron {
  transform: rotate(-90deg);
}

.mb-bag-count {
  display: inline-block;
  padding: 6px 14px;
  background: #f0f6f6;
  border-radius: 999px;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--main-bg-color);
  letter-spacing: -0.01em;
}

.mb-bag.is-complete .mb-bag-count {
  background: rgba(84, 208, 127, 0.12);
  color: #1f6b3a;
}

.mb-bag-done {
  color: var(--gold-color);
  margin-right: 1px;
}

.mb-bag.is-complete .mb-bag-done {
  color: #1f6b3a;
}

/* ==========================================================================
   ГРУППЫ И ПУНКТЫ
   ========================================================================== */
.mb-group {
  margin-top: 22px;
}

.mb-group-title {
  font-family: "Montserrat", sans-serif;
  font-size: 14px !important;
  font-weight: 700;
  margin: 0 0 12px !important;
  color: var(--dark-text-color);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.mb-items {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mb-item {
  position: relative;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.mb-item:hover {
  background: #f7fafa;
}

.mb-item label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.4;
  color: var(--main-bg-color);
  transition: color 0.25s ease;
}

.mb-item .mb-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Кастомный чекбокс */
.mb-check-box {
  width: 22px;
  height: 22px;
  border: 2px solid #cdd7d7;
  border-radius: 6px;
  background: #fff;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mb-item label:hover .mb-check-box {
  border-color: var(--gold-color);
}

.mb-item .mb-check:focus-visible + .mb-check-box {
  outline: 3px solid var(--gold-color);
  outline-offset: 3px;
}

.mb-item .mb-check:checked + .mb-check-box {
  background: var(--gold-color);
  border-color: var(--gold-color);
  color: #fff;
  transform: scale(1.05);
}

.mb-item .mb-check:checked + .mb-check-box svg {
  animation: mb-check-pop 0.25s cubic-bezier(0.2, 0.8, 0.2, 1.2);
}

@keyframes mb-check-pop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.mb-item-label {
  flex: 1;
  transition:
    color 0.25s ease,
    text-decoration 0.25s ease;
}

.mb-item.is-done .mb-item-label {
  color: #a5b0b0;
  text-decoration: line-through;
  text-decoration-color: rgba(165, 176, 176, 0.5);
}

/* Кнопка удалить кастомный пункт */
.mb-item-remove {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: #a5b0b0;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition:
    opacity 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.mb-item-custom:hover .mb-item-remove {
  opacity: 1;
}

.mb-item-remove:hover {
  background: rgba(220, 72, 72, 0.12);
  color: #a02f2f;
}

.mb-item-custom .mb-item-label::before {
  content: "+ ";
  color: var(--gold-color);
  font-weight: 700;
}

/* Добавление своего пункта */
.mb-add-form {
  display: flex;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0 12px;
}

.mb-add-form input {
  flex: 1;
  padding: 9px 14px;
  border: 1.5px dashed #d3dcdc;
  border-radius: 10px;
  font-family: "Nunito", sans-serif;
  font-size: 14px;
  background: transparent;
  color: var(--main-bg-color);
  outline: none;
  min-height: 40px;
  transition:
    border-color 0.2s,
    background 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.mb-add-form input::placeholder {
  color: #b5c0c0;
  font-style: italic;
}

.mb-add-form input:focus {
  border-color: var(--gold-color);
  border-style: solid;
  background: #fff7d6;
}

.mb-add-form button {
  width: 40px;
  height: 40px;
  border: none;
  background: #f0f6f6;
  color: var(--main-bg-color);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.15s;
}

.mb-add-form button:hover {
  background: var(--gold-color);
  color: #fff;
  transform: scale(1.05);
}

/* ==========================================================================
   ФИЛЬТР «ТОЛЬКО НЕСОБРАННЫЕ»
   ========================================================================== */
body.mb-filter-active .mb-item.is-done {
  display: none;
}

/* ==========================================================================
   TIP-ПЛАШКА
   ========================================================================== */
.mb-tip {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  background: linear-gradient(
    135deg,
    rgba(247, 203, 202, 0.2) 0%,
    rgba(255, 246, 216, 0.4) 100%
  );
  border: 1px solid rgba(189, 160, 0, 0.18);
  border-radius: 16px;
  margin: 30px 0 24px;
}

.mb-tip-icon {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
}

.mb-tip div {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--main-bg-color);
}

.mb-tip strong {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 700px) {
  .mb-hero {
    padding: 90px 0 44px !important;
  }
  .mb-overall {
    padding: 20px 22px;
  }
  .mb-overall-head {
    align-items: center;
  }
  .mb-overall-count {
    font-size: 16px;
  }
  .mb-overall-count #mb-total-done {
    font-size: 22px;
  }
  .mb-overall-pct {
    font-size: 26px;
  }

  .mb-bag {
    padding: 22px 20px !important;
  }
  .mb-bag-head {
    flex-direction: column;
    align-items: stretch;
  }
  .mb-bag-stat {
    align-self: flex-start;
  }
  .mb-bag-title {
    font-size: 18px !important;
  }
  .mb-bag-emoji {
    font-size: 26px;
  }

  .mb-item label {
    padding: 12px 10px;
    font-size: 15px;
  }
  .mb-add-form {
    padding: 0 10px;
  }

  .mb-tip {
    flex-direction: column;
    gap: 10px;
    padding: 18px 20px;
  }
}

@media (max-width: 480px) {
  .mb-overall-controls {
    flex-direction: column;
    align-items: flex-start;
  }
  .mb-reset {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   МОДАЛКА ПОДТВЕРЖДЕНИЯ СБРОСА
   ========================================================================== */
.mb-modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.mb-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mb-modal[hidden] {
  display: none;
}

.mb-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.mb-modal-card {
  position: relative;
  max-width: 440px;
  width: 100%;
  background: #ffffff;
  border-radius: 22px;
  padding: 36px 32px 28px;
  text-align: center;
  box-shadow: 0 32px 64px rgba(17, 17, 17, 0.28);
  transform: translateY(16px) scale(0.96);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mb-modal.is-open .mb-modal-card {
  transform: translateY(0) scale(1);
}

.mb-modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    rgba(220, 72, 72, 0.12),
    rgba(220, 72, 72, 0.06)
  );
  color: #d64545;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mb-modal h2 {
  font-family: "Montserrat", sans-serif;
  font-size: 22px !important;
  font-weight: 800;
  color: var(--main-bg-color);
  margin: 0 0 10px !important;
  letter-spacing: -0.02em;
  text-transform: none;
}

.mb-modal p {
  font-size: 15px !important;
  line-height: 1.55;
  color: var(--dark-text-color);
  margin: 0 0 24px !important;
}

.mb-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.mb-modal-btn {
  padding: 12px 24px;
  font-family: "Montserrat", sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  border-radius: 12px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
  border: none;
  min-width: 120px;
}

.mb-modal-btn-ghost {
  background: #f0f6f6;
  color: var(--main-bg-color);
}

.mb-modal-btn-ghost:hover {
  background: #e4edec;
  transform: translateY(-1px);
}

.mb-modal-btn-danger {
  background: #d64545;
  color: #fff;
}

.mb-modal-btn-danger:hover {
  background: #b93737;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(214, 69, 69, 0.35);
}

.mb-modal-btn:focus-visible {
  outline: 3px solid var(--gold-color);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .mb-modal-card {
    padding: 28px 22px 22px;
  }
  .mb-modal-actions {
    flex-direction: column-reverse;
  }
  .mb-modal-btn {
    width: 100%;
  }
}

/* ==========================================================================
   SEO-СТАТЬЯ (текстовый контент под чек-листом)
   ========================================================================== */
.mb-seo {
  background: #ffffff;
  border: 1px solid #e8efef;
  border-radius: 20px;
  padding: 36px 40px !important;
  margin: 0 0 24px !important;
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.03);
}

.mb-seo h2 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  color: var(--main-bg-color);
  margin: 32px 0 14px !important;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-transform: none;
}

.mb-seo h2:first-child {
  margin-top: 0 !important;
}

.mb-seo p {
  line-height: 1.7;
  color: var(--dark-text-color);
  margin: 0 0 14px !important;
}

.mb-seo p strong {
  color: var(--main-bg-color);
  font-weight: 700;
}

.mb-seo ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px !important;
}

.mb-seo ul li {
  position: relative;
  padding: 8px 0 8px 28px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--dark-text-color);
  border-bottom: 1px dashed #eef2f2;
}

.mb-seo ul li:last-child {
  border-bottom: none;
}

.mb-seo ul li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-color);
}

.mb-seo ul li strong {
  color: var(--main-bg-color);
  font-weight: 700;
}

.mb-seo a {
  color: var(--gold-color);
  text-decoration: underline;
  text-decoration-color: rgba(189, 160, 0, 0.35);
  text-underline-offset: 3px;
  transition:
    color 0.2s ease,
    text-decoration-color 0.2s ease;
}

.mb-seo a:hover {
  color: var(--main-bg-color);
  text-decoration-color: currentColor;
}

@media (max-width: 600px) {
  .mb-seo {
    padding: 26px 22px !important;
  }
  .mb-seo h2 {
    font-size: 19px !important;
  }
  .mb-seo p,
  .mb-seo ul li {
    font-size: 14.5px !important;
  }
}

/* Отступ снизу у share-блока в контексте maternity-bag */
.mb-share {
  margin-bottom: 24px !important;
}
