@import url('https://fonts.googleapis.com/css2?family=El+Messiri:wght@500;600;700&family=Tenor+Sans&display=swap');

/* Токены объявлены и на контейнере, и на попапах — попапы рендерятся ВНЕ .justice-irka,
   поэтому иначе var(--accent) и т.д. не резолвятся внутри модалок. */
.justice-irka,
.justice-irka-pop,
.justice-irka-open {
  --text: #1f2430;
  --muted: #6b7280;
  --line: #e9ecef;
  --heading: #1f2430;
  --accent: #552F13;
  --accent-soft: rgba(85, 47, 19, .18);
  --green: #1f5a5f;
  --green-soft: rgba(31, 90, 95, .08);
  --soft: #fafafa;
}

.justice-irka {
  width: 100%;
  max-width: 100%;
  color: var(--text) !important;
  font-family: "Tenor Sans", Tahoma, Arial, sans-serif;
}
.justice-irka-pop {
  font-family: "Tenor Sans", Tahoma, Arial, sans-serif;
  color: var(--text);
}
.justice-irka-open {
  font-family: "Tenor Sans", Tahoma, Arial, sans-serif;
  color: var(--text);
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 22px;
  box-sizing: border-box;
}
.justice-irka * { box-sizing: border-box; }
.justice-irka-pop * { box-sizing: border-box; }
.justice-irka-open * { box-sizing: border-box; }

/* Заголовки — принудительно тёмные + El Messiri, как в эталоне yust-accplus */
.justice-irka h1,
.justice-irka h2,
.justice-irka h3,
.justice-irka h4,
.justice-irka h5,
.justice-irka h6,
.justice-irka-pop h1,
.justice-irka-pop h2,
.justice-irka-pop h3,
.justice-irka-pop h4,
.justice-irka-open h1,
.justice-irka-open h2,
.justice-irka-open h3,
.justice-irka-open h4 {
  color: var(--heading) !important;
  font-family: "EL Messiri", "El Messiri", serif !important;
}

.justice-irka__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}
@media (max-width: 980px) {
  .justice-irka__grid { grid-template-columns: 1fr; }
}

.justice-irka__card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.justice-irka__num {
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: #604827;
  font-family: "Tenor Sans", Tahoma, Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
}
.justice-irka__card h3 {
  font-family: "EL Messiri", "El Messiri", serif !important;
  font-weight: 600;
  font-size: 25px;
  line-height: 1.12;
  margin: 0;
  color: var(--heading) !important;
}
.justice-irka__price {
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #ffffff;
  font-family: "Tenor Sans", Tahoma, Arial, sans-serif;
  font-size: 14px;
  white-space: nowrap;
}
.justice-irka__text {
  font-family: "Tenor Sans", Tahoma, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.52;
  margin: 0;
  color: var(--muted);
}

/* Кнопки — !important, чтобы глобальный стиль темы/Elementor не перебивал */
.justice-irka__btn,
.justice-irka__btn--link,
.justice-irka__next {
  display: inline-flex;
  align-items: center; justify-content: center;
  margin-top: auto;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent) !important;
  border: 1px solid var(--accent) !important;
  color: #fff !important;
  font-family: "Tenor Sans", Tahoma, Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: .15s;
  text-decoration: none !important;
}
.justice-irka__btn:hover,
.justice-irka__btn--link:hover,
.justice-irka__next:hover { filter: brightness(1.1); }

.justice-irka-pay {
  margin: 12px 0 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--soft);
}
.justice-irka-pay__title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--heading);
}
.justice-irka-pay__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.justice-irka-pay__list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.justice-irka-pay__list li:last-child { border-bottom: 0; }
.justice-irka-pay__list span { color: var(--muted); }
.justice-irka-pay__list a { color: inherit; text-decoration: none; }

.justice-irka-quiz__lead,
.justice-irka-quiz__hint {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}
.justice-irka-bot-deadline,
.justice-irka-bot-fio,
.justice-irka-bot-address,
.justice-irka-bot-address-index {
  width: 100%;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  box-sizing: border-box;
}
.justice-irka-pop__box--wide { max-width: 520px; }

/* Popups */
.justice-irka-pop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 15, 15, .6);
}
.justice-irka-pop[hidden] { display: none; }
.justice-irka-pop__box {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 22px;
  max-height: 90vh;
  overflow-y: auto;
}
.justice-irka-pop__x {
  position: absolute;
  top: 10px; right: 12px;
  width: 30px; height: 30px;
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.justice-irka-pop__box h3 {
  margin: 0 0 8px;
  font-family: "EL Messiri", "El Messiri", serif !important;
  font-size: 25px;
  font-weight: 700;
  color: var(--heading) !important;
}
.justice-irka-pop__box > p {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--muted);
}
.justice-irka-open h3 {
  margin: 0 0 8px;
  font-family: "EL Messiri", "El Messiri", serif !important;
  font-size: 25px;
  font-weight: 700;
  color: var(--heading) !important;
}
.justice-irka-open > p {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--muted);
}

/* Form */
.justice-irka-form input,
.justice-irka-form textarea {
  width: 100%;
  margin: 0 0 10px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: "Tenor Sans", Tahoma, Arial, sans-serif;
  font-size: 15px;
  color: var(--text);
}
.justice-irka-form textarea { resize: none !important; overflow: auto !important; }
.justice-irka-form .justice-irka-form__row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto !important;
  gap: 10px !important;
  align-items: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 0 10px !important;
}
.justice-irka-form .justice-irka-form__row input {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  display: block !important;
  float: none !important;
  box-sizing: border-box !important;
}
.justice-irka-form .justice-irka-form__row .justice-irka__btn {
  margin: 0 !important;
  width: auto !important;
  white-space: nowrap !important;
  align-self: stretch !important;
}
.justice-irka-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
}
.justice-irka-form__ok {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--green);
  font-weight: 600;
}

/* Quiz — прогресс-точки + карточки-шаги */
.justice-irka-quiz__dots {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.justice-irka-quiz__dot {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: var(--line);
  transition: .2s;
}
.justice-irka-quiz__dot.is-active { background: var(--accent); }
.justice-irka-quiz__step { display: none; }
.justice-irka-quiz__step.is-active { display: block; }
.justice-irka-quiz__q {
  margin: 0 0 12px;
  font-family: "EL Messiri", "El Messiri", serif !important;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--heading) !important;
}
.justice-irka__opt {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  font-family: "Tenor Sans", Tahoma, Arial, sans-serif;
  font-size: 15px;
  color: var(--text) !important;
  cursor: pointer;
  transition: .15s;
}
.justice-irka__opt:hover { border-color: var(--accent); }
/* Выделение выбранного пункта — заметное */
.justice-irka__opt.is-selected {
  border-color: var(--accent) !important;
  background: var(--accent-soft) !important;
  box-shadow: inset 3px 0 0 var(--accent);
  color: var(--heading) !important;
  font-weight: 600;
}
.justice-irka__next { margin-top: 6px; }
.justice-irka__next:disabled { opacity: .55; cursor: not-allowed; }
