.p-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  z-index: 1001;
  background: rgba(0, 0, 0, 0.7);
}

.p-modal_min {
  display: flex;
  justify-content: center;
  overflow-y: auto;
  height: 100%;
}

.p-modal__container {
  min-width: 320px;
}

.p-modal__container_big {
  width: 100%;
  height: 100%;
}

.p-modal__container_min {
  min-width: 400px;
  max-width: 400px;
  margin: auto;
}

@media (max-width: 420px) {
  .p-modal__container_min {
    width: 100%;
  }
}

.p-modal__inner {
  position: relative;
  background: #fff;
}

@media (min-width: 576px) {
  .p-modal__inner_min {
    border-radius: 5px;
  }
}

.p-modal__inner_big {
  height: 100%;
}

.p-modal .p-modal-close {
  position: absolute;
  top: 18px;
  right: 21px;
}

.p-modal-body {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

@media (min-width: 0) {
  .p-modal-body__container {
    width: 100%;
    height: 100%;
    margin: 0 auto;
  }
}

@media (min-width: 576px) {
  .p-modal-body__container {
    max-width: 540px;
    min-width: 400px;
  }
}

@media (min-width: 768px) {
  .p-modal-body__container {
    max-width: 768px;
  }
}

@media (min-width: 1280px) {
  .p-modal-body__container {
    max-width: 1180px;
  }
}

.p-modal-body__inner {
  padding: 50px;
  min-height: 100%;
  padding: 30px;
}

@media (max-width: 575px) {
  .p-modal-body__inner {
    padding: 30px 15px 40px;
  }
}

.p-modal-body__column {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.p-modal__item + .p-modal__item {
  margin-top: 30px;
}

.p-modal__title {
  font-size: 20px;
  line-height: 28px;
  font-family: "Roboto-bold", sans-serif;
  margin-bottom: 23px;
}

.p-modal-form__field + .p-modal-form__field {
  margin-top: 20px;
}

.p-modal-form__lable {
  font-family: "Roboto-bold", sans-serif;
  margin-bottom: 5px;
}

.p-modal__action {
  display: flex;
  align-items: center;
  justify-content: end;
}

.p-modal__content {
  display: flex;
  flex-wrap: wrap;
}

.p-modal__content_element {
  margin: -15px;
}

/* element */
@media (min-width: 0) {
  .element {
    padding: 15px;
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (min-width: 768px) {
  .element {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (min-width: 1280px) {
  .element {
    flex: 0 0 33.33333%;
    max-width: 33.33333%;
  }
}

.element_active .element__inner {
  background: #000;
  color: #fff;
}

.element__inner {
  border: 1px solid #000;
  position: relative;
  padding: 20px;
  border-radius: 2px;
  height: 100%;
}

.element__inner__colum {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.element__tab,
.element__select {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  background: none;
  font-size: 0;
  border: none;
}

.element__item + .element__item {
  margin-top: 10px;
}

.p-modal button {
  cursor: pointer;
  background: none;
  border: none;
}

.p-modal .p-modal__button {
  display: block;
  color: #1585cf;
  border-bottom: 1px dashed #1585cf;
}

.p-modal .p-modal__button:hover {
  border-color: transparent;
}

/* */

.p4-legal-entity-status.status-block {
  display: flex;
  flex-wrap: nowrap;
  flex-direction: column;
  gap: 16px;
  margin: 20px 0;
}

.p4-legal-entity-status.status-block > .status-block__card.item {
  flex: 1 1 240px;
  min-width: 0;
  padding: 15px 10px;
  background: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  box-sizing: border-box;
}

.p4-legal-entity-status .status-block__heading {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  color: #000;
  margin-bottom: 4px;
}

.p4-legal-entity-status .status-block__debt-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0px 0;
}

.p4-legal-entity-status .status-block__tare-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  line-height: 1.5;
  color: #222;
}

.p4-legal-entity-status .status-block__tare-list li + li {
  margin-top: 6px;
}

.status-block__pay-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  margin: 0 0 6px;
  padding: 0;
  text-align: left;
  border: none;
  background: transparent;
  border-radius: 0;
  font: inherit;
  color: #000;
  cursor: pointer;
  transition: color 0.2s ease;
}

.status-block__pay-button .status-block__pay-button-text {
  flex: 0 1 auto;

  min-width: 0;
  font-size: 12px;
  line-height: 1.4;
}

.status-block__pay-button .status-block__pay-button-text b {
  font-weight: 700;
}

.status-block__pay-button-icon-wrap {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #000;
  transition: background-color 0.2s ease;
}

.status-block__pay-button-icon {
  color: #fff;
  font-weight: 400;
}

.status-block__pay-button-icon svg {
  width: 8px;
}

.status-block__pay-button:not(:disabled):not(.is-loading):hover,
.status-block__pay-button:not(:disabled):not(.is-loading):focus-visible {
  color: #58793c;
}

.status-block__pay-button:not(:disabled):not(.is-loading):hover
  .status-block__pay-button-icon-wrap,
.status-block__pay-button:not(:disabled):not(.is-loading):focus-visible
  .status-block__pay-button-icon-wrap {
  background: #58793c;
}

.status-block__pay-button[disabled] {
  cursor: default;
}

.status-block__pay-button[disabled]:not(.is-loading) {
  opacity: 0.55;
}

.status-block__pay-button-loader {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: p4DebtSpin 0.8s linear infinite;
}

.status-block__pay-button.is-loading .status-block__pay-button-icon {
  visibility: hidden;
}

.status-block__pay-button.is-loading .status-block__pay-button-loader {
  display: block;
}

.status-block__pay-message {
  margin-top: 10px;
  font-size: 13px;
}

.status-block__pay-message.is-error {
  color: #b21f1f;
}

.status-block__pay-message.is-success {
  color: #1f7d2e;
}

.sbp-modal__container_min {
  width: 426px;
  min-width: 426px;
  max-width: 426px;
}

@media (max-width: 426px) {
  .sbp-modal__container_min {
    width: 100%;
  }
}

.sbp-modal__inner_min {
  border-radius: 14px;
}

.sbp-modal__close {
  width: 22px;
  height: 22px;
  top: 15px !important;
  right: 18px !important;
  font-size: 0;
  border: 1px solid #cfcfcf !important;
  border-radius: 2px;
}

.sbp-modal__close::before {
  content: "×";
  display: block;
  font-size: 18px;
  line-height: 18px;
  color: #777;
}

.sbp-modal__title-main {
  margin-bottom: 12px;
  font-size: 25px;
  line-height: 45px;
  letter-spacing: 1.5px;
  text-align: center;
  text-transform: uppercase;
  font-family: "BazaART";
}

.sbp-modal__subtitle {
  margin: 0 0 16px;
  text-align: center;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 400;
  max-width: 348px;
  font-family: "Montserrat";
}

.sbp-modal__qr-block {
  min-height: 208px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sbp-modal__qr {
  display: block;
  width: 208px;
  max-width: 100%;
  margin: 0 auto;
}

.sbp-modal__link {
  display: block;
  margin-bottom: 20px;
  word-break: break-word;
}

.sbp-modal__actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.sbp-modal__pay-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 294px;
  min-height: 38px;
  border-radius: 19px;
  border: none;
  background: #000 !important;
  color: #fff !important;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.04em;
  font-family: "BazaART";
  text-transform: uppercase;
  cursor: pointer;
}

.sbp-modal__pay-button[disabled] {
  opacity: 0.7;
  cursor: default;
}

.sbp-modal__hint {
  margin: 10px 0 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.25;
}

.sbp-modal__success-title {
  margin: 10px 0;
  font-size: 25px;
  line-height: 45px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: "BazaART";
  text-align: center;
}

.sbp-modal__success-text {
  margin: 0 auto 18px;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.35;
  color: #191918;
  text-align: center;
  width: 248px;
  font-family: "Montserrat";
}

.sbp-modal__success-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.sbp-modal__success-icon svg {
  width: 134px;
  height: 132px;
  display: block;
  fill: #e1ecc9;
}

.sbp-modal__success-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 294px;
  min-height: 38px;
  border: 1px solid #000 !important;
  border-radius: 19px;
  background: #efefef !important;
  color: #000 !important;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: "BazaART";
}

.sbp-modal__loader-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 0 10px;
}

.sbp-modal__loader {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid #d8d8d8;
  border-top-color: #111;
  animation: p4DebtSpin 0.8s linear infinite;
  margin-bottom: 12px;
}

.sbp-modal__loader-text {
  margin: 0;
  text-align: center;
  font-size: 14px;
}

.sbp-modal__error-title {
  margin-bottom: 10px;
  font-size: 25px;
  line-height: 45px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: "BazaART";
  text-align: center;
}

.sbp-modal__error-text {
  margin: 0 0 30px;
  font-size: 16px;
  line-height: 1.35;
  width: 348px;
  text-align: center;
  color: #191918;
}

.sbp-modal__error-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.sbp-modal__error-icon svg {
  width: 134px;
  height: 132px;
  display: block;
}

.sbp-modal__error-retry-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 294px;
  min-height: 38px;
  border-radius: 19px;
  border: none !important;
  background: #000 !important;
  color: #fff !important;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: "BazaART";
}

.sbp-modal__actions_secondary {
  margin-top: 10px;
}

.sbp-modal__error-close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 294px;
  min-height: 38px;
  border: 1px solid #000 !important;
  border-radius: 19px;
  background: #efefef !important;
  color: #000 !important;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: "BazaART";
}

.sbp-modal__link_empty {
  margin-top: 10px;
}

@keyframes p4DebtSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Аккордеон задолженности по юрлицам */
.debt-accordion {
  margin: 4px 0 0;
}

.debt-accordion__item {
  border-top: 1px solid #ececec;
}

.debt-accordion__item:first-child {
  border-top: none;
}

.debt-accordion__header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 2px;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.debt-accordion__title {
  flex: 1 1 auto;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
}

.debt-accordion__chevron {
  flex: 0 0 auto;
  display: inline-flex;
  color: #9a9a9a;
  transition: transform 0.2s ease;
}

.debt-accordion__item.is-open .debt-accordion__chevron {
  transform: rotate(180deg);
}

.debt-accordion__body {
  display: none;
  padding: 0 0 12px;
}

.debt-accordion__item.is-open .debt-accordion__body {
  display: block;
}

.debt-accordion__empty {
  font-size: 13px;
  color: #8a8a8a;
  padding: 2px 2px 8px;
}

/* Внутренняя карточка с действиями по организации */
.debt-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 6px;
}

.debt-card__row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  background: none;
  border: none;
  border-radius: 8px;
  font: inherit;
  text-align: left;
  color: #1a1a1a;
  cursor: pointer;
  transition: background 0.15s ease;
}

.debt-card__row:hover {
  background: #f6f6f7;
}

.debt-card__row_static,
.debt-card__row_static:hover {
  cursor: default;
  background: none;
}

.debt-card__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #f4f4f6;
  color: #6b6b6b;
}

.debt-card__icon_plain {
  background: none;
}

.debt-accordion__chevron-icon {
  display: block;
  width: 16px;
  height: 16px;
}

.debt-card__sbp {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.debt-card__doc {
  display: block;
}

.debt-card__download img,
.status-block__download-all-icon img {
  display: block;
}

.debt-card__text {
  flex: 1 1 auto;
  min-width: 0;
}

.debt-card__title {
  display: block;
  font-size: 14px;
  line-height: 1.3;
  color: #1a1a1a;
}

.debt-card__sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #9a9a9a;
}

/* Квадратная кнопка скачивания счёта справа */
.debt-card__download {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  color: #4a4a4a;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}


/* Лоадер на строке «Показать QR-код СБП» (класс is-loading ставит debt.payment.js) */
.debt-card__row-loader {
  flex: 0 0 auto;
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.15);  
  border-radius: 50%;
  animation: p4DebtSpin 0.8s linear infinite;
}

.debt-card__row.is-loading {
  cursor: default;
}

.debt-card__row.is-loading .debt-card__row-loader {
  display: inline-block;
}

/* Нижняя ссылка «Скачать счета по задолженности» */
.status-block__download-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  padding: 6px 2px;
  border: none;
  background: none;
  font: inherit;
  font-size: 14px;
  color: #1a1a1a;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s ease;
}

.status-block__download-all-icon {
  flex: 0 0 auto;
  display: inline-flex;
  color: #6b6b6b;
  transition: color 0.15s ease;
}

