/* =====================================================
   UI ADDON
   модалки прайса и сертификатов
   плавающая плашка сертификатов
   темы по датам
   ===================================================== */

html.modal-open,
html.modal-open body{
  overflow: hidden !important;
}

/* ---------- overlays ---------- */

#mod_price,
#mod_certs{
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9999;
  padding: 2vh 3vw;
}

#mod_price.is-open,
#mod_certs.is-open{
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal{
  width: min(980px, 94vw);
  max-height: 92vh;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
}

.modal-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  color: #fff;
  background: linear-gradient(90deg, #104675 0%, #1c66a5 75%, #1e73b9 93%);
}

body.holiday-feb23 .modal-head{
  background: linear-gradient(90deg, #1f7f46 0%, #2aa85e 70%, #1b6f3f 100%);
}

body.holiday-mar8 .modal-head{
  background: linear-gradient(90deg, #a43a82 0%, #d055ad 70%, #7a2c61 100%);
}

body.holiday-newyear .modal-head{
  background: linear-gradient(90deg, #0c5b88 0%, #0e7aa7 60%, #18a7d0 100%);
}

.modal-title{
  font-family: Roboto, sans-serif;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: .4px;
}

.modal-close{
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  background: rgba(255,255,255,.18);
  color: #fff;
}

.modal-close:hover{
  background: rgba(255,255,255,.28);
}

.modal-body{
  padding: 14px 14px 18px 14px;
  overflow: auto;
}

/* ---------- PRICE ---------- */

.price-list{
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.price-item{
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  border: 1px solid rgba(16,70,117,.12);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.price-item-main{ min-width: 0; }

.price-item-title{
  font-family: Roboto, sans-serif;
  font-weight: 900;
  font-size: 14px;
  color: #0b2f44;
}

.price-item-desc{
  margin-top: 6px;
  font-family: Roboto, sans-serif;
  font-weight: 400;
  font-size: 13px;
  color: #355c73;
  line-height: 1.25;
}

.price-item-price{
  font-family: Roboto, sans-serif;
  font-weight: 900;
  font-size: 14px;
  color: #104675;
  white-space: nowrap;
}

.price-empty{
  font-family: Roboto, sans-serif;
  color: #355c73;
  padding: 10px 2px;
}

/* ---------- CERTS ---------- */

.cert-wrap{
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 14px;
}

.cert-poster{
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
  background: #f4f8fb;
}

.cert-poster-inner{
  padding: 16px;
  color: #fff;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(135deg, rgba(0,0,0,.25), rgba(0,0,0,.55)),
    var(--cert-poster, radial-gradient(1200px 500px at 30% 10%, rgba(255,255,255,.18), rgba(255,255,255,0))),
    linear-gradient(135deg, rgba(16,70,117,.92), rgba(8,30,55,.98));
  background-size: cover;
  background-position: center;
}

body.holiday-feb23 .cert-poster-inner{
  background:
    linear-gradient(135deg, rgba(0,0,0,.22), rgba(0,0,0,.55)),
    var(--cert-poster, radial-gradient(1200px 500px at 30% 10%, rgba(255,255,255,.16), rgba(255,255,255,0))),
    linear-gradient(135deg, rgba(36,120,64,.92), rgba(12,40,26,.98));
  background-size: cover;
  background-position: center;
}

body.holiday-mar8 .cert-poster-inner{
  background:
    linear-gradient(135deg, rgba(0,0,0,.22), rgba(0,0,0,.55)),
    var(--cert-poster, radial-gradient(1200px 500px at 30% 10%, rgba(255,255,255,.16), rgba(255,255,255,0))),
    linear-gradient(135deg, rgba(180,60,130,.92), rgba(70,20,55,.98));
  background-size: cover;
  background-position: center;
}

body.holiday-newyear .cert-poster-inner{
  background:
    linear-gradient(135deg, rgba(0,0,0,.22), rgba(0,0,0,.55)),
    var(--cert-poster, radial-gradient(1200px 500px at 30% 10%, rgba(255,255,255,.18), rgba(255,255,255,0))),
    linear-gradient(135deg, rgba(10,110,120,.92), rgba(8,40,80,.98));
  background-size: cover;
  background-position: center;
}

.cert-poster-badge{
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: Roboto, sans-serif;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .6px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.14);
  width: fit-content;
}

.cert-poster-title{
  margin-top: 12px;
  font-family: Roboto, sans-serif;
  font-weight: 900;
  font-size: 22px;
  line-height: 1.05;
}

.cert-poster-sub{
  margin-top: 8px;
  font-family: Roboto, sans-serif;
  font-weight: 500;
  font-size: 14px;
  opacity: .92;
  line-height: 1.2;
}

.cert-side{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cert-card{
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  padding: 14px;
}

.cert-card h3{
  margin: 0 0 10px 0;
  font-family: Roboto, sans-serif;
  font-weight: 900;
  font-size: 15px;
  color: #08314a;
}

.cert-amounts{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cert-chip{
  border: 1px solid rgba(16,70,117,.22);
  background: rgba(16,70,117,.06);
  color: #104675;
  border-radius: 999px;
  padding: 10px 12px;
  cursor: pointer;
  font-family: Roboto, sans-serif;
  font-weight: 900;
  font-size: 13px;
}

.cert-chip.is-active{
  background: rgba(57,210,125,.18);
  border-color: rgba(57,210,125,.55);
  color: #126b4a;
}

.cert-mock{
  margin-top: 12px;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.10);
  overflow: hidden;
  background:
    radial-gradient(900px 300px at 10% 0%, rgba(255,255,255,.22), rgba(255,255,255,0)),
    linear-gradient(135deg, var(--cert-a, #0e7aa7), var(--cert-b, #0b2f44));
  color: #fff;
}

.cert-mock-inner{ padding: 14px; }

.cert-mock-top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cert-mock-logo{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Roboto, sans-serif;
  font-weight: 900;
  letter-spacing: .6px;
}

.cert-mock-code{
  font-family: Roboto, sans-serif;
  font-weight: 900;
  font-size: 12px;
  opacity: .92;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.14);
}

.cert-mock-title{
  margin-top: 10px;
  font-family: Roboto, sans-serif;
  font-weight: 900;
  font-size: 16px;
}

.cert-mock-amount{
  margin-top: 8px;
  font-family: Roboto, sans-serif;
  font-weight: 900;
  font-size: 22px;
}

.cert-mock-note{
  margin-top: 10px;
  font-family: Roboto, sans-serif;
  font-weight: 500;
  font-size: 13px;
  opacity: .92;
  line-height: 1.25;
}

.cert-info{
  margin-top: 12px;
  font-family: Roboto, sans-serif;
  font-size: 13px;
  line-height: 1.35;
  color: #2b556f;
}

.cert-cta{
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 14px;
  border-radius: 14px;
  background: #39d27d;
  color: #063d4a;
  text-decoration: none;
  font-family: Roboto, sans-serif;
  font-weight: 900;
  font-size: 14px;
  box-shadow: 0 14px 30px rgba(57,210,125,.28);
}

.cert-phones{
  margin-top: 10px;
  display: grid;
  gap: 6px;
}

.cert-phones a{
  text-decoration: none;
  font-family: Roboto, sans-serif;
  font-weight: 900;
  color: #104675;
}

/* ---------- FLOAT ---------- */

.cert-float{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9998;
  width: min(340px, 92vw);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  background:
    radial-gradient(900px 280px at 20% 0%, rgba(255,255,255,.18), rgba(255,255,255,0)),
    linear-gradient(135deg, rgba(16,70,117,.94), rgba(8,30,55,.98));
  color: #fff;
}

body.holiday-feb23 .cert-float{
  background:
    radial-gradient(900px 280px at 20% 0%, rgba(255,255,255,.16), rgba(255,255,255,0)),
    linear-gradient(135deg, rgba(36,120,64,.94), rgba(12,40,26,.98));
}

body.holiday-mar8 .cert-float{
  background:
    radial-gradient(900px 280px at 20% 0%, rgba(255,255,255,.16), rgba(255,255,255,0)),
    linear-gradient(135deg, rgba(180,60,130,.92), rgba(70,20,55,.98));
}

body.holiday-newyear .cert-float{
  background:
    radial-gradient(900px 280px at 20% 0%, rgba(255,255,255,.18), rgba(255,255,255,0)),
    linear-gradient(135deg, rgba(10,110,120,.92), rgba(8,40,80,.98));
}

.cert-float-close{
  position: absolute;
  top: 8px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: #fff;
  background: rgba(255,255,255,.18);
  z-index: 2;
}

.cert-float-body{
  cursor: pointer;
  padding: 14px;
}

.cert-float-badge{
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: Roboto, sans-serif;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: .6px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.14);
}

.cert-float-title{
  margin-top: 10px;
  font-family: Roboto, sans-serif;
  font-weight: 900;
  font-size: 18px;
}

.cert-float-sub{
  margin-top: 4px;
  font-family: Roboto, sans-serif;
  font-weight: 500;
  font-size: 13px;
  opacity: .92;
}

.cert-float-mini{
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cert-mini{
  padding: 6px 10px;
  border-radius: 12px;
  font-family: Roboto, sans-serif;
  font-weight: 900;
  font-size: 13px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.22);
}

/* ---------- hero buttons ---------- */

.hero-actions{
  display: flex;
  gap: 12px;
  margin-left: 0.781vw;
  margin-top: 0.781vmax;
  position: relative;
  z-index: 10;
}

.hero-btn{
  border: 0;
  cursor: pointer;
  padding: 14px 18px;
  border-radius: 14px;
  font-family: Roboto, sans-serif;
  font-weight: 900;
  font-size: 14px;
  background: #39d27d;
  color: #063d4a;
  box-shadow: 0 14px 30px rgba(57,210,125,.28);
}

.hero-btn-secondary{
  background: rgba(255,255,255,.18);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: none;
}

/* ---------- mobile ---------- */

@media (max-width: 640px){
  #mod_price,
  #mod_certs{ padding: 1.6vh 2.8vw; }

  .modal{ width: 96vw; max-height: 94vh; }

  .price-item{ flex-direction: column; }
  .price-item-price{ align-self: flex-end; }

  .cert-wrap{ grid-template-columns: 1fr; }

  .cert-float{
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
  }

  .hero-actions{
    margin-left: 3vw;
    margin-right: 3vw;
    flex-direction: column;
  }

  .hero-btn{ width: 100%; }
}

/* =====================================================
   LEGACY OVERRIDES ONLY FOR OLD index.css RULES
   важно только mod_price потому что там есть старые правила
   ===================================================== */

/* index.css задает #mod_price position absolute и z-index 99 */
#mod_price{
  position: fixed !important;
  inset: 0 !important;
  left: 0 !important;
  top: 0 !important;
  z-index: 9999 !important;
}

/* index.css задает #mod_price button position absolute */
#mod_price .modal-close{
  position: static !important;
  top: auto !important;
  right: auto !important;
  width: 36px !important;
  height: 36px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,.18) !important;
  color: #fff !important;
  text-shadow: none !important;
}

#mod_price .modal-close:hover{
  background: rgba(255,255,255,.28) !important;
}