/*
Theme Name: Mgnovenki V15 Stage
Theme URI: https://xn--b1abhmjiicg.xn--p1ai/
Description: Server-rendered Mgnovenki design. Child theme of zaim2.
Author: Mgnovenki
Template: zaim2
Version: 0.15.0-stage
Text Domain: mgnovenki-v15-stage
*/

/* Section catalogue icons are real SVG image assets in the server HTML.
 * Their geometry matches the approved JS design, but no inline SVG markup or
 * client-side replacement is required. */
.mgn-section-v2 .mgn-v2-offer .mgn-section-offer-icon,
.mgn-home-v2 .mgn-v2-offer .mgn-section-offer-icon {
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

.mgn-section-v2 .mgn-section-page-icon {
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

.mgn-design-preview .mgn-filter-group-image,
.mgn-design-preview .mgn-filter-option-image {
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}

/* Larger external SVG assets for the section filter and MFO related links.
 * The approved artwork stays unchanged; only its rendered size grows by 8px. */
.mgn-design-preview img.mgn-filter-group-image.mgn-filter-svg {
  width: 37px;
  height: 37px;
}

.mgn-design-preview img.mgn-filter-option-image.mgn-filter-option-svg {
  width: 27px;
  height: 27px;
}

.mgn-design-preview .mgn-section-filter-widget .mgn-filter-group span.mgn-filter-option-icon {
  width: 33px;
  min-width: 33px;
  height: 33px;
}

/* MFO cards have their own later stylesheet, so keep the increase explicit. */
.mgn-mfo-preview .mgn-mfo-related-card .multi-column-header img.mgn-filter-group-image.mgn-filter-svg.mgn-mfo-icon {
  width: 28px;
  height: 28px;
  max-width: none;
  flex: 0 0 28px;
}

.mgn-mfo-preview .mgn-mfo-related-card span.mgn-filter-option-icon {
  width: 35px;
  min-width: 35px;
  height: 35px;
}

.mgn-mfo-preview .mgn-mfo-related-card span.mgn-filter-option-icon img.mgn-filter-option-image.mgn-filter-option-svg.mgn-mfo-icon {
  width: 27px;
  height: 27px;
  max-width: none;
  flex: 0 0 27px;
}

.mgn-about-preview .mgn-about-page > .mgn-breadcrumbs-v2 + .mgn-about-hero {
  margin-top: 18px;
}

.mgn-v2-error-dialog {
  width: min(520px, calc(100% - 32px));
  padding: 28px;
  border: 1px solid #d8e6f6;
  border-radius: 22px;
  color: #10233f;
  background: #fff;
  box-shadow: 0 28px 80px rgba(16, 50, 93, .24);
}
.mgn-v2-error-dialog::backdrop { background: rgba(10, 31, 59, .62); }
.mgn-v2-dialog-close { position: absolute; top: 12px; right: 14px; border: 0; color: #526b88; background: transparent; font-size: 28px; }
.mgn-v2-error-dialog textarea { width: 100%; margin: 14px 0; }
#top-mfo-modal.mgn-v2-top-modal[open] { display: block; }
#top-mfo-modal.mgn-v2-top-modal::backdrop { background: rgba(10, 31, 59, .72); }

/* Server-rendered section phase. These are small compatibility additions to
 * the approved preview.css visual system; the layout itself is PHP/HTML. */
.mgn-section-v2 .mgn-section-offers { display: block; margin: 0; }
.mgn-section-v2 .mgn-section-offers > article { width: 100%; }
.mgn-section-v2 .mgn-section-week-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 18px;
}
.mgn-section-v2 .mgn-section-week-grid .mgn-v2-week-card:nth-child(n + 4) { display: none; }
.mgn-section-v2 .mgn-section-filter-widget .mgn-filter-option-icon .mgn-icon {
  width: 18px;
  height: 18px;
}
.mgn-section-v2 .mgn-filter-panel-body .widget-title { display: none; }
.mgn-section-v2 .mgn-filter-panel-body .wpc-filters-open-button-container,
.mgn-section-v2 .mgn-filter-panel-body .wpc-widget-close-container,
.mgn-section-v2 .mgn-filter-panel-body .wpc-filters-widget-top-container,
.mgn-section-v2 .mgn-filter-panel-body .wpc-filter-set-widget-title,
.mgn-section-v2 .mgn-filter-panel-body .wpc-posts-found { display: none; }
.mgn-section-v2 .mgn-filter-panel-body .wpc-filters-widget-wrapper { margin: 0; }
.mgn-section-v2 .mgn-section-reviews-carousel {
  position: relative;
  padding: 0 48px;
}
.mgn-section-v2 .mgn-section-reviews .commentlist:not(.slick-initialized) {
  display: grid;
  grid-template-columns: none;
  grid-auto-columns: calc((100% - 28px) / 3);
  grid-auto-flow: column;
  gap: 14px;
  width: 100% !important;
  padding: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
}
.mgn-section-v2 .mgn-section-reviews .commentlist:not(.slick-initialized)::-webkit-scrollbar { display: none; }
.mgn-section-v2 .mgn-section-reviews .commentlist:not(.slick-initialized) > li {
  width: 100% !important;
  padding: 0 !important;
  scroll-snap-align: start;
}
.mgn-section-v2 .mgn-section-reviews .commentlist:not(.slick-initialized) article.comment { width: 100% !important; }
.mgn-section-v2 .mgn-section-reviews-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #cbdced;
  border-radius: 50%;
  color: #0b6de0;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16, 50, 93, .12);
  transform: translateY(-50%);
}
.mgn-section-v2 .mgn-section-reviews-arrow .mgn-icon { width: 18px; height: 18px; }
.mgn-section-v2 .mgn-section-reviews-arrow.is-prev { left: 0; transform: translateY(-50%) rotate(90deg); }
.mgn-section-v2 .mgn-section-reviews-arrow.is-next { right: 0; transform: translateY(-50%) rotate(-90deg); }
.mgn-section-v2 .mgn-section-reviews-arrow:disabled { cursor: default; opacity: .35; }
.mgn-section-v2 .mgn-news-section { margin-top: 60px; }
.mgn-section-v2 .mgn-section-empty { padding: 28px; border: 1px solid #dce5f0; border-radius: 20px; background: #fff; }
.mgn-section-v2 .mgn-review-top--date-only { justify-content: flex-end; }

/* The home page reuses the approved section recommendation and review
 * components. Keep their server-rendered grids independent from Slick. */
.mgn-home-v2 .mgn-section-week-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0 0 18px;
}
.mgn-home-v2 .mgn-section-week-grid .mgn-v2-week-card:nth-child(n + 4) { display: none; }
.mgn-home-v2 .mgn-section-reviews-carousel {
  position: relative;
  padding: 0 48px;
}
.mgn-home-v2 .mgn-section-reviews .commentlist:not(.slick-initialized) {
  display: grid;
  grid-template-columns: none;
  grid-auto-columns: calc((100% - 28px) / 3);
  grid-auto-flow: column;
  gap: 14px;
  width: 100% !important;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
}
.mgn-home-v2 .mgn-section-reviews .commentlist:not(.slick-initialized)::-webkit-scrollbar { display: none; }
.mgn-home-v2 .mgn-section-reviews .commentlist:not(.slick-initialized) > li {
  width: 100% !important;
  padding: 0 !important;
  scroll-snap-align: start;
}
.mgn-home-v2 .mgn-section-reviews .commentlist:not(.slick-initialized) article.comment { width: 100% !important; }
.mgn-home-v2 .mgn-section-reviews-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #cbdced;
  border-radius: 50%;
  color: #0b6de0;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16, 50, 93, .12);
  transform: translateY(-50%);
}
.mgn-home-v2 .mgn-section-reviews-arrow .mgn-icon { width: 18px; height: 18px; }
.mgn-home-v2 .mgn-section-reviews-arrow.is-prev { left: 0; transform: translateY(-50%) rotate(90deg); }
.mgn-home-v2 .mgn-section-reviews-arrow.is-next { right: 0; transform: translateY(-50%) rotate(-90deg); }
.mgn-home-v2 .mgn-section-reviews-arrow:disabled { cursor: default; opacity: .35; }

/* Native server-rendered MFO reviews replace the incompatible parent-theme
 * callback while preserving the approved visual system. */
.mgn-mfo-v2 .mgn-mfo-reviews-carousel { position: relative; padding: 0 46px; }
.mgn-mfo-v2 .mgn-mfo-reviews-section .commentlist {
  display: grid;
  grid-template-columns: none;
  grid-auto-columns: calc((100% - 28px) / 3);
  grid-auto-flow: column;
  gap: 14px;
  width: 100% !important;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
}
.mgn-mfo-v2 .mgn-mfo-reviews-section .commentlist::-webkit-scrollbar { display: none; }
.mgn-mfo-v2 .mgn-mfo-reviews-section .commentlist > li {
  position: static;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  list-style: none;
  background: transparent !important;
  box-shadow: none !important;
  scroll-snap-align: start;
}
.mgn-mfo-v2 .mgn-mfo-reviews-section .commentlist > li::before,
.mgn-mfo-v2 .mgn-mfo-reviews-section .commentlist > li::after { content: none !important; }
.mgn-mfo-v2 .mgn-mfo-review-card { width: 100%; height: 100%; }
.mgn-mfo-v2 .mgn-mfo-review-card .mgn-review-top { margin-bottom: 18px; }
.mgn-mfo-v2 .mgn-mfo-review-card .comment-meta { margin-bottom: 14px; }
.mgn-mfo-v2 .mgn-mfo-review-card .comment-author {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
}
.mgn-mfo-v2 .mgn-mfo-review-card .comment-author .mgn-icon { width: 18px; height: 18px; color: #0877ef; }
.mgn-mfo-v2 .mgn-mfo-review-card .comment-author .fn { font-size: 17px; }
.mgn-mfo-v2 .mgn-mfo-review-card .mgn-review-content p { margin: 0; }
.mgn-mfo-v2 .mgn-mfo-review-card .reply { margin-top: 18px; }
.mgn-mfo-v2 .mgn-mfo-review-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #cbdced;
  border-radius: 50%;
  color: #0b6de0;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16, 50, 93, .12);
}
.mgn-mfo-v2 .mgn-mfo-review-arrow .mgn-icon { width: 18px; height: 18px; }
.mgn-mfo-v2 .mgn-mfo-review-arrow.is-prev { left: 0; transform: translateY(-50%) rotate(90deg); }
.mgn-mfo-v2 .mgn-mfo-review-arrow.is-next { right: 0; transform: translateY(-50%) rotate(-90deg); }
.mgn-mfo-v2 .mgn-mfo-review-arrow:disabled { cursor: default; opacity: .35; }

@media (max-width: 991px) {
  .mgn-section-v2 .mgn-section-week-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mgn-section-v2 .mgn-section-week-grid .mgn-v2-week-card:nth-child(3) { display: none; }
  .mgn-section-v2 .mgn-section-reviews .commentlist:not(.slick-initialized) { grid-auto-columns: calc((100% - 14px) / 2); }
  .mgn-home-v2 .mgn-section-week-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mgn-home-v2 .mgn-section-week-grid .mgn-v2-week-card:nth-child(3) { display: none; }
  .mgn-home-v2 .mgn-section-reviews .commentlist:not(.slick-initialized),
  .mgn-mfo-v2 .mgn-mfo-reviews-section .commentlist { grid-auto-columns: calc((100% - 14px) / 2); }
}

@media (max-width: 767px) {
  .mgn-section-v2 .mgn-section-week-grid { grid-template-columns: 1fr; }
  .mgn-section-v2 .mgn-section-week-grid .mgn-v2-week-card:nth-child(n + 2) { display: none; }
  .mgn-section-v2 .mgn-section-reviews-carousel { padding: 0; }
  .mgn-section-v2 .mgn-section-reviews .commentlist:not(.slick-initialized) { grid-auto-columns: 100%; }
  .mgn-section-v2 .mgn-section-reviews-arrow { width: 34px; height: 34px; }
  .mgn-section-v2 .mgn-section-reviews-arrow.is-prev { left: -10px; }
  .mgn-section-v2 .mgn-section-reviews-arrow.is-next { right: -10px; }
  .mgn-home-v2 .mgn-section-week-grid { grid-template-columns: 1fr; }
  .mgn-home-v2 .mgn-section-week-grid .mgn-v2-week-card:nth-child(n + 2) { display: none; }
  .mgn-home-v2 .mgn-section-reviews-carousel,
  .mgn-mfo-v2 .mgn-mfo-reviews-carousel { padding: 0; }
  .mgn-home-v2 .mgn-section-reviews .commentlist:not(.slick-initialized),
  .mgn-mfo-v2 .mgn-mfo-reviews-section .commentlist { grid-auto-columns: 100%; }
  .mgn-home-v2 .mgn-section-reviews-arrow,
  .mgn-mfo-v2 .mgn-mfo-review-arrow { width: 34px; height: 34px; }
  .mgn-home-v2 .mgn-section-reviews-arrow.is-prev,
  .mgn-mfo-v2 .mgn-mfo-review-arrow.is-prev { left: -10px; }
  .mgn-home-v2 .mgn-section-reviews-arrow.is-next,
  .mgn-mfo-v2 .mgn-mfo-review-arrow.is-next { right: -10px; }
}
