/* Стили для мобильного меню header - обновление от 26.01.2025 */
/* Эти стили применяются ТОЛЬКО для мобильных устройств (максимальная ширина 991.98px) */

/* Переменные (подключаются здесь, т.к. на фронте грузится main.min.css) */
:root {
  --accent: #73c280;
  --ayat-day-inner-bg: #f7f7f7;
  --ayat-day-inner-border: 1px solid #f2f2f2;
  --ayat-day-label-color: #8b898e;
  --ayat-day-pill-bg: #f2f2f2;
  --ayat-day-card-radius: 30px;
  --ayat-day-inner-radius: 26px;
  --ayat-day-head-radius: 26px;
  --ayat-day-pill-radius: 32px;
  --ayat-day-label-fz: 20px;
  --ayat-day-pill-fz: 20px;
  --ayat-day-arabic-fz: 24px;
  --ayat-day-russian-fz: 20px;
  --ayat-day-russian-lh: 30px;
}

html:has(body.theme-dark) {
  --accent: #73c280;
  --ayat-day-inner-bg: #0b0b0b;
  --ayat-day-inner-border: none;
  --ayat-day-label-color: #bebebe;
  --ayat-day-pill-bg: #1c1c1e;
}

@media screen and (max-width: 991.98px) {
  /* Мобильное меню */
  .header-mobile {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 49;
    height: 122px;
    padding: 10px 16px 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--header-mobile-glow);
    backdrop-filter: blur(4.05px);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 100%);
  }

  .header-mobile__container {
    width: 100%;
  }

  .header-mobile__menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 58px;
    background: white;
    border-radius: 34px;
    border: 1px solid #efefef;
    padding: 3px;
    width: 100%;
  }

  html:has(body.theme-dark) .header-mobile__menu {
    background: #1c1c1e;
    border: none;
  }

  .header-mobile__menu-item {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 9px 13px;
    border-radius: 79px;
    background-color: transparent;
    color: var(--header-mobile-item-color);
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    transition:
      background-color 0.2s ease,
      color 0.2s ease;
    position: relative;
    text-decoration: none;
  }

  /* Иконки через CSS для мобильных устройств */
  .header-mobile__menu-item::before {
    content: '';
    width: 20px;
    height: 20px;
    display: block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
  }

  .header-mobile__menu-item.header-mobile__menu-icon--home::before {
    background-image: url('../icons/navigation/home.svg');
  }

  .header-mobile__menu-item.header-mobile__menu-icon--sun::before {
    background-image: url('../icons/navigation/sun.svg');
    width: 33px;
    height: 20px;
  }

  .header-mobile__menu-item.header-mobile__menu-icon--moon::before {
    background-image: url('../icons/navigation/moon.svg');
  }

  .header-mobile__menu-item.header-mobile__menu-item--settings::before {
    background-image: url('../icons/navigation/settings.svg');
  }

  /* Активный пункт меню — светлая тема */
  .header-mobile__menu-item--active {
    background: #f9f9f9;
    border-radius: 80px;
    padding: 10px 13px;
    gap: 4px;
    flex-shrink: 0;
    color: #93bd9a;
  }

  /* Активные иконки — светлая тема */
  .header-mobile__menu-item--active.header-mobile__menu-icon--home::before {
    background-image: url('../icons/navigation/home-light-green.svg');
  }

  .header-mobile__menu-item--active.header-mobile__menu-icon--sun::before {
    background-image: url('../icons/navigation/sun-light-green.svg');
  }

  .header-mobile__menu-item--active.header-mobile__menu-icon--moon::before {
    background-image: url('../icons/navigation/moon-light-green.svg');
  }

  .header-mobile__menu-item--active.header-mobile__menu-item--settings::before {
    background-image: url('../icons/navigation/settings-light-green.svg');
  }

  /* Активный пункт меню — тёмная тема */
  html:has(body.theme-dark) .header-mobile__menu-item--active {
    background: #2b2b2b;
    color: #73c280;
  }

  /* Активные иконки — тёмная тема */
  html:has(body.theme-dark)
    .header-mobile__menu-item--active.header-mobile__menu-icon--home::before {
    background-image: url('../icons/navigation/home-dark-green.svg');
  }

  html:has(body.theme-dark)
    .header-mobile__menu-item--active.header-mobile__menu-icon--sun::before {
    background-image: url('../icons/navigation/sun-dark-green.svg');
  }

  html:has(body.theme-dark)
    .header-mobile__menu-item--active.header-mobile__menu-icon--moon::before {
    background-image: url('../icons/navigation/moon-dark-green.svg');
  }

  html:has(body.theme-dark)
    .header-mobile__menu-item--active.header-mobile__menu-item--settings::before {
    background-image: url('../icons/navigation/settings-dark-green.svg');
  }

  /* Скрываем пункт "Вопросы" в мобильном меню */
  .header-mobile__menu-item[href='/faq/'] {
    display: none;
  }

  .header-mobile__menu-text {
    display: block;
  }

  /* Скрываем десктопное меню на мобильных */
  .header {
    display: none;
  }
}

/* Блок «Аят дня» (.bfront__right) */
.ayat-day {
  background: var(--card-bg);
  border-radius: var(--ayat-day-card-radius);
  padding: 4px;
  display: flex;
  flex-direction: column;
}

.ayat-day__inner {
  background: var(--ayat-day-inner-bg);
  border: var(--ayat-day-inner-border);
  border-radius: var(--ayat-day-inner-radius);
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.ayat-day__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  border-radius: var(--ayat-day-head-radius);
  border: 1px solid var(--ayat-day-pill-bg);
  background: var(--ayat-day-inner-bg);
  padding: 17px;
}

html:has(body.theme-dark) .ayat-day__head {
  background: #0b0b0b;
  border-color: #0b0b0b;
}

.ayat-day__label-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.ayat-day__label {
  font-size: var(--ayat-day-label-fz);
  line-height: 1.2;
  color: var(--ayat-day-label-color);
  font-weight: 400;
}

.ayat-day__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 21px;
  background: var(--ayat-day-pill-bg);
  border-radius: var(--ayat-day-pill-radius);
  font-size: var(--ayat-day-pill-fz);
  line-height: 1.2;
  color: var(--ayat-day-label-color);
  font-weight: 400;
  min-width: 85px;
}

.ayat-day__arabic {
  font-family: var(--ff-sec);
  font-size: var(--ayat-day-arabic-fz);
  line-height: 1.77;
  text-align: right;
  color: var(--text-color);
  flex: 1;
  min-width: 0;
  word-wrap: break-word;
}

.ayat-day__arabic p {
  margin: 0;
}

.ayat-day__russian {
  padding: 11px 22px 22px;
  color: var(--text-color);
  font-size: var(--ayat-day-russian-fz);
  line-height: var(--ayat-day-russian-lh);
  font-weight: 400;
  word-wrap: break-word;
}

.ayat-day__russian p {
  margin: 0;
}

/* Мобильная версия блока «Аят дня» — радиусы и типографика по макету */
@media (max-width: 992px) {
  :root {
    --ayat-day-card-radius: 20px;
    --ayat-day-inner-radius: 18px;
    --ayat-day-head-radius: 18px;
    --ayat-day-pill-radius: 18px;
    --ayat-day-label-fz: 12px;
    --ayat-day-pill-fz: 12px;
    --ayat-day-arabic-fz: 18px;
    --ayat-day-russian-fz: 14px;
    --ayat-day-russian-lh: 22.85px;
  }

  .ayat-day {
    margin-top: 14px;
    order: 1;
  }
  .bfront__left {
    border-radius: 24px;
    background: #e7e7e7;
  }
}

html:has(body.theme-dark) .bfront__left {
  background: #050505;
}

/* Блок выбора сложности (.bfront__level) — мобильная версия */
.bfront__level {
  border-radius: 94px;
}

html:has(body.theme-dark) .bfront__level {
  background: #1c1c1e;
}

.bfront__level-btn {
  border-radius: 32px;
  background: #f2f2f2;
  display: flex;
  width: 47.263px;
  min-width: 47.263px;
  height: 31px;
  padding: 13px 21px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

html:has(body.theme-dark) .bfront__level-btn {
  background: #2b2b2b;
  color: #7f7f85;
}

.bfront__level-btn.active {
  background: var(--accent);
  color: #fff;
}

html:has(body.theme-dark) .bfront__level-btn.active {
  background: var(--accent);
  color: #000;
}

html:has(body.theme-dark) .bfront__level-content {
  color: #7f7f85;
}

/* Блок выбора сложности — десктоп (размеры и скругления по макету, в светлой и тёмной одинаковые) */
@media (min-width: 992px) {
  .header-mobile {
    display: none;
  }
  .bfront__level {
    border-radius: 64px;
  }

  .bfront__level-btn {
    border-radius: 61px;
    height: 56px;
    padding: 25px 41px;
    font-size: 24px;
    width: auto;
    min-width: 91px;
  }

  .bfront__level-content {
    font-size: 24px;
  }
  html:has(body.theme-dark) {
    background: #050505;
  }

  html:has(body.theme-dark) .bfront__level {
    background: #1c1c1e;
  }

  html:has(body.theme-dark) .bfront__level-btn {
    background: #0b0b0b;
    color: #7f7f85;
  }

  html:has(body.theme-dark) .bfront__level-btn.active {
    background: var(--accent);
    color: #000;
  }

  html:has(body.theme-dark) .bfront__level-content {
    color: #7f7f85;
  }
}

/* Ссылки в правой колонке (.bfront__link — Важность чтения азкаров, Ответы на вопросы) */
.bfront__link {
  border-radius: 50px;
}

/* Акцентный зелёный везде переопределён через --accent: #73c280 выше */
.time-namaz__item--active {
  background-color: var(--accent);
}
