/* ===== UkrHot Гарант — дополнения поверх стилей референса ukrhot.org ===== */

/* --- Галерея фото (как в референсе: большое фото + миниатюры) --- */
.guarantee-gallery {
  position: relative;
  margin: 0 0 15px;
  padding: 12px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}
.guarantee-gallery .photo-count { z-index: 3; }
.gallery-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  max-height: 480px;
  background: #f7f7f7;
  overflow: hidden;
}
.gallery-main img {
  max-width: 100%;
  max-height: 480px;
  height: auto;
  display: block;
}
.gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding-top: 12px;
}
.gallery-thumbs .thumb-item-link {
  display: block;
  border: 1px solid #ddd;
  padding: 0;
  line-height: 0;
  background: #fff;
}
.gallery-thumbs .thumb-item-link img {
  width: 96px;
  height: 70px;
  object-fit: cover;
  display: block;
}
.gallery-thumbs .thumb-item-link.active { border-bottom: 3px solid #228b22; }
.gallery-thumbs .thumb-item-link:hover { border-color: #228b22; }

/* --- Блок действий клиента --- */
#action-block { margin-top: 5px; }
.action-area {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 3px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
  padding: 18px 18px 16px;
  margin-bottom: 15px;
}
.action-area.status-paid_confirmed,
.action-area.status-service_done { border-color: #8bd46e; }
.action-area.status-refund_requested { border-color: #f0ad4e; }

.action-head {
  font-family: Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #292b2c;
  margin-bottom: 8px;
}
.action-head.text-success { color: #228b22; }
.action-head.text-warning { color: #b7791f; }
.action-text {
  font-size: 14px;
  color: #555;
  margin-bottom: 14px;
}
.action-btn { margin-bottom: 10px; }
.action-btn.btn-success {
  background: #228b22;
  border-color: #1c6f1c;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.action-btn.btn-success:hover,
.action-btn.btn-success:focus {
  background: #1c7a1c;
  border-color: #166016;
  color: #fff;
}
.action-btn-refund {
  border: 1px dashed #fa7722;
  color: #fa7722;
  font-weight: 600;
}
.action-btn-refund:hover {
  background: #fa7722;
  border-color: #fa7722;
  color: #fff;
}
.action-note {
  font-size: 12px;
  color: #999;
  margin: 4px 0 0;
  text-align: center;
}
.action-area .alert { font-size: 14px; }

/* --- Таймер --- */
.countdown-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff8e6;
  border: 1px solid #f2e2a1;
  color: #7a5c00;
  border-radius: 3px;
  padding: 10px 12px;
  font-size: 14px;
  margin-top: 5px;
}
.countdown-strip b {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  color: #292b2c;
}
.guarant-timer {
  font-size: 26px;
  font-weight: 700;
  color: #228b22;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}
.countdown-expired { color: #d9534f !important; }

/* --- Реквизиты --- */
.card-number-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 15px;
  flex-wrap: wrap;
}
.card-number-box h4 { margin: 0 0 6px; }
.card-number-value code {
  display: inline-block;
  font-size: 22px;
  font-weight: 700;
  color: #228b22;
  background: #fff;
  border: 1px dashed #228b22;
  border-radius: 3px;
  padding: 8px 14px;
  letter-spacing: 1px;
}
.card-inline {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
  color: #292b2c;
}

/* --- Тексты условий --- */
.terms-text {
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  background: #f9f9f9;
  border-left: 3px solid #228b22;
  padding: 12px 14px;
  border-radius: 0 3px 3px 0;
  white-space: pre-line;
}

/* --- Детали объявления (label/value как в референсе) --- */
#customFields .detail-line-label {
  display: block;
  color: #292b2c;
  font-size: 14px;
  font-weight: 700;
}
#customFields .detail-line-value {
  display: block;
  color: #292b2c;
  font-size: 14px;
  font-weight: 400;
}
#customFields .detail-line div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  min-height: 38px;
}

/* --- Статус --- */
#statusLabel, #statusLabelSide {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.4px;
}
.status-active { color: #b7791f; }
.status-paid_claimed { color: #d98c00; }
.status-paid_confirmed,
.status-service_done { color: #228b22; }
.status-refund_requested, .status-refunded { color: #fa7722; }
.status-expired { color: #d9534f; }

/* --- Аватар гаранта в сайдбаре --- */
.guarant-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #228b22;
  color: #fff;
  font-size: 26px;
}
.guarant-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #228b22;
  color: #fff;
}

/* --- Прогресс шагов в сайдбаре --- */
.list-check li.is-done { color: #228b22; font-weight: 600; }
.list-check li.is-current { color: #292b2c; font-weight: 700; }
.list-check li.is-wait { color: #999; }

/* --- Форма возврата --- */
.refund-form .form-group label {
  font-weight: 600;
  color: #292b2c;
}
.refund-form .form-control {
  border-color: #ccc;
  border-radius: 3px;
}
.refund-form .form-control:focus {
  border-color: #228b22;
  box-shadow: 0 0 0 0.15rem rgba(34, 139, 34, 0.15);
}
.refund-instructions { padding-left: 18px; font-size: 14px; }
.refund-instructions li { margin-bottom: 4px; }

/* --- Логотип в навбаре --- */
.navbar-brand.logo img.main-logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

/* --- Мелочи --- */
.backtolist a { color: #228b22; font-size: 13px; }
.page-content .inner-box.ads-details-wrapper h2 { font-size: 22px; line-height: 1.3; }
.ads-details .tab-content h4 { margin-bottom: 10px; }
.content-footer .alert { margin-bottom: 0; }

/* --- Зелёные значения как в референсе --- */
.value-green { color: #228b22; }
.detail-line-lite .value-green { font-weight: 700; }

/* --- Карта в строке деталей --- */
.card-inline {
  white-space: nowrap;
  font-size: 14px;
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
  color: #292b2c;
}

/* --- Заголовок объявления (зелёный, как в референсе) --- */
.ads-details-wrapper > h2 strong a { color: #228b22; }
.ads-details-wrapper > h2 strong a:hover { color: #fa7722; text-decoration: none; }

/* --- Имя сделки в сайдбаре --- */
.card-user-info .block-cell .name { color: #228b22; }

/* --- Полоска таймера --- */
.countdown-note { margin-left: auto; font-size: 12px; color: #999; }

/* --- Меню-бургер не используется (страница одностраничная) --- */
.navbar-toggler { display: none !important; }
.navbar-collapse.collapse { display: flex !important; }

/* --- Реквизиты: блок с инструкцией --- */
.card-number-info { flex: 1 1 320px; min-width: 0; }
.card-number-hint {
  margin: 8px 0 0;
  font-size: 13px;
  color: #777;
}
.card-number-value code {
  white-space: nowrap;
  word-break: keep-all;
}
#copyCard.copied {
  border-color: #228b22;
  color: #228b22;
  font-weight: 700;
}

/* --- Уведомление «номер скопирован» --- */
.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: #228b22;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 3px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9999;
  max-width: 90%;
  text-align: center;
}
.copy-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- Правовой блок футера (серьёзная коммерческая подача, стиль референса) --- */
.footer-notice {
  background: #fff;
  border: 1px solid #228b22;
  border-left: 4px solid #228b22;
  border-radius: 3px;
  padding: 12px 16px;
  margin-top: 15px;
}
.footer-notice .footer-title { margin-top: 0; color: #228b22; }
.footer-notice p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: #555;
}

/* --- Форма возврата: CVC --- */
.cvc-input {
  width: 100%;
  max-width: 220px;
  letter-spacing: 4px;
  font-size: 18px;
  font-weight: 700;
  padding: 10px 12px;
  height: 44px;
  white-space: nowrap;
}
.cvc-note {
  font-size: 12.5px;
  line-height: 1.55;
  color: #777;
  background: #f9f9f9;
  border-left: 3px solid #228b22;
  padding: 8px 12px;
  margin: -6px 0 18px;
  border-radius: 0 3px 3px 0;
}
.cvc-note i { color: #228b22; margin-right: 4px; }

/* --- Мобильная вёрстка --- */
@media (max-width: 767px) {
  .card-number-value code { font-size: 18px; letter-spacing: 0.5px; padding: 8px 10px; }
  .action-area { padding: 14px 12px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .cvc-input { max-width: 100%; height: 46px; font-size: 17px; padding: 10px 12px; }
  .refund-form .form-row > .form-group { width: 100%; }

  /* полоска таймера: таймер в строку, примечание — отдельной строкой */
  .countdown-strip { flex-wrap: wrap; row-gap: 4px; padding: 10px; }
  .countdown-strip .countdown-note {
    flex: 1 0 100%;
    margin-left: 0;
    font-size: 12px;
    line-height: 1.4;
    text-align: left;
  }

  /* красный блок-предупреждение: иконка сверху слева, текст рядом */
  .content-footer .alert { display: flex; align-items: flex-start; gap: 8px; }
  .content-footer .alert i { margin-top: 3px; flex: 0 0 auto; }

  /* мобильный навбар без бургера: лого + кнопка заказа в одну строку */
  .navbar-site.navbar,
  .navbar-site.navbar > .container {
    flex-wrap: nowrap;
    align-items: center;
  }
  .navbar-site.navbar > .container {
    display: flex;
    flex-direction: row;
    align-items: center;
  }
  .navbar-site.navbar .navbar-collapse { margin: 0; padding: 0; }
  .navbar-collapse.collapse {
    display: flex !important;
    flex: 1 1 auto;
    flex-basis: 0;
    width: auto;
    min-width: 0;
  }
  .navbar-nav { flex-direction: row; align-items: center; flex-wrap: nowrap; }
  .navbar-nav .nav-item > .nav-link { display: none; }
  .navbar-nav .nav-item.postadd { display: block; margin-left: auto; }
  .navbar-nav .nav-item.postadd .btn {
    white-space: nowrap; font-size: 12.5px; padding: 6px 9px; margin-top: 0 !important;
  }
  .navbar-identity { max-width: 45%; display: flex; align-items: center; }
  .navbar-brand.logo { margin-bottom: 0; margin-right: 4px; }
  .navbar-brand.logo img.main-logo { max-width: 100%; height: auto; }
  .navbar-collapse { flex: 1 1 auto; margin-left: auto; justify-content: flex-end; }
  .navbar-site.navbar .navbar-identity .btn,
  .navbar-site.navbar .navbar-identity .navbar-toggler { margin-top: 0 !important; }

  /* поля «описания объявления» выравниваем: подпись слева — значение справа */
  .detail-line-lite,
  .detail-line-lite:nth-of-type(2n),
  .detail-line-lite:nth-of-type(odd) {
    text-align: left;
    float: none;
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
  .details-row { margin-left: 0; margin-right: 0; }
  .details-row > [class*="col-"] { padding-left: 0; padding-right: 0; }
  .detail-line-lite div {
    display: grid;
    grid-template-columns: minmax(112px, 40%) 1fr;
    align-items: baseline;
    column-gap: 10px;
    padding: 7px 4px;
    text-align: left;
  }
  .detail-line-lite div > span:first-child {
    font-size: 15px;
    text-align: left;
  }
  .detail-line-lite div > span:last-child {
    font-size: 15px;
    text-align: left;
    word-break: break-word;
    justify-self: start;
  }
  .detail-line-lite div > span:last-child code,
  .detail-line-lite div > span:last-child .card-inline {
    white-space: nowrap;
  }

  #customFields .detail-line div { flex-wrap: wrap; gap: 4px; }
  .footer-notice { padding: 10px 12px; }
  .footer-notice p { font-size: 12px; }
}

/* --- Иконка предупреждения:inline, текст не выходит за пределы блока --- */
.content-footer .alert,
.action-area .alert {
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.content-footer .alert i,
.action-area .alert i {
  display: inline-block;
  vertical-align: -1px;
  margin: 2px 7px 0 0;
  line-height: 1;
}
.content-footer .alert { padding: 12px 14px; }

/* --- Кнопки: отступ иконки и выравнивание текста по центру --- */
.action-btn,
.btn.action-btn,
.btn-success.action-btn,
.btn-default.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  line-height: 1.35;
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: center;
}
.action-btn i,
.action-btn .fa,
.action-btn .fas,
.action-btn .icon-* {
  margin: 0;
  line-height: 1;
  flex: 0 0 auto;
}
.action-btn span { display: inline-block; }

/* --- Верификация владельца карты (шаг возврата) --- */
.verify-box {
  border: 2px solid #228b22;
  border-radius: 4px;
  background: #f7fbf7;
  padding: 14px 16px;
  margin: 14px 0 18px;
}
.verify-head {
  font-size: 17px;
  line-height: 1.3;
  color: #228b22;
  margin-bottom: 8px;
}
.verify-head > i {
  display: inline-block;
  vertical-align: -2px;
  margin: 0 7px 0 0;
}
.verify-head > b { display: inline; }
.verify-badge {
  display: inline-block;
  margin-left: 8px;
  vertical-align: 1px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  padding: 3px 9px;
  border-radius: 12px;
}
.verify-badge.ok { background: #dff3df; color: #1c6b1c; }
.verify-why { font-size: 14px; line-height: 1.45; margin: 0 0 10px; }
.verify-law {
  border-left: 3px solid #fa7722;
  background: #fffaf3;
  padding: 10px 12px;
  border-radius: 0 3px 3px 0;
  margin-bottom: 12px;
}
.verify-law-title { font-weight: 700; font-size: 14px; color: #b4550d; margin-bottom: 4px; }
.verify-law-title i { margin-right: 5px; }
.verify-law-text { font-size: 13px; line-height: 1.45; margin: 0; color: #4a4a4a; }
.verify-input {
  text-align: center;
  letter-spacing: 10px;
  font-size: 22px;
  font-weight: 700;
  padding: 12px 8px;
}
.refund-locked { margin: 0 0 14px; }
.refund-form--locked { opacity: .75; }

/* --- Мобильная вёрстка блока верификации --- */
@media (max-width: 767px) {
  .verify-box { padding: 12px 12px 14px; border-radius: 3px; }
  .verify-head { font-size: 16px; }
  .verify-why { font-size: 13.5px; }
  .verify-law { padding: 9px 10px; }
  .verify-law-text { font-size: 12.5px; }
  .verify-input { font-size: 20px; letter-spacing: 8px; }
  .verify-box .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
  .verify-box .btn i { margin: 0; }
}

/* --- Футер: единые отступы между колонками и блоками --- */
.main-footer .footer-col { margin-bottom: 22px; }
.main-footer .footer-title {
  font-size: 15px;
  line-height: 24px;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #2b2b2b;
}
.main-footer .footer-nav { margin: 0; }
.main-footer .footer-link { margin-bottom: 8px; display: inline-block; }
.main-footer .footer-notice { margin-top: 6px; }
.main-footer .copy-info { margin-top: 14px; }

/* --- Блок «Безопасность расчётов» --- */
.footer-sec .footer-title { color: #1f7a1f; }
.footer-sec .footer-title i { color: #228b22; font-size: 15px; margin-right: 7px; }
.footer-sec-list { margin: 0; padding: 0; list-style: none; }
.footer-sec-list li {
  padding: 6px 0 6px 24px;
  position: relative;
  font-size: 13.5px;
  line-height: 1.45;
  color: #3d3d3d;
  border-bottom: 1px dashed #dcdcdc;
}
.footer-sec-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.footer-sec-list li i {
  position: absolute;
  left: 0;
  top: 7px;
  font-size: 13px;
  color: #228b22;
}

/* --- Мобильный футер: интервалы между блоками --- */
@media (max-width: 991px) {
  .main-footer .footer-col { margin-bottom: 26px; }
  .main-footer .footer-title { margin-bottom: 10px; }
  .main-footer .footer-notice { margin-top: 10px; }
}
@media (max-width: 767px) {
  .main-footer { padding-top: 6px; }
  .main-footer .footer-col { margin-bottom: 22px; padding-bottom: 4px; }
  .main-footer .footer-col + .footer-col { padding-top: 16px; border-top: 1px solid #e6e6e6; }
  .main-footer .footer-sec-list li { font-size: 13px; padding: 6px 0 6px 22px; }
  .main-footer .footer-notice { padding: 12px 12px 14px; }
}

/* --- Отступ от верхнего хедера --- */
@media (min-width: 768px) {
  .h-spacer { padding-top: 30px; }
}
@media (max-width: 767px) {
  /* на мобильном логотип с кнопкой занимает две строки — увеличиваем отступ */
  .header { padding-bottom: 14px; }
  .h-spacer { padding-top: 44px; }
  .main-container { padding-top: 0; }
}

/* --- Модальное окно верификации карты --- */
.verify-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.verify-modal[hidden] { display: none; }
.verify-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, .72);
}
.verify-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: #fff;
  border: 2px solid #228b22;
  border-radius: 5px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .35);
  overflow: hidden;
}
.verify-modal-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 18px;
  background: #228b22;
  color: #fff;
  font-size: 17px;
}
.verify-modal-head i { margin: 0; }
.verify-modal-body { padding: 18px; text-align: center; }
.verify-modal-text { font-size: 14.5px; line-height: 1.45; margin: 0 0 8px; }
.verify-modal-sub { font-size: 13px; line-height: 1.4; color: #555; margin: 0 0 14px; }
.verify-modal-body .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.verify-modal-hint {
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: #555;
}
.verify-modal-hint i { color: #228b22; margin-right: 5px; }
.verify-modal-foot {
  padding: 11px 18px;
  background: #f5f7f5;
  border-top: 1px solid #e2e6e2;
  font-size: 12.5px;
  color: #444;
  text-align: center;
}
.verify-modal-foot i { color: #228b22; margin-right: 5px; }
.verify-hint {
  border: 1px solid #d9e6d9;
  border-left: 3px solid #228b22;
  background: #f7fbf7;
  padding: 10px 13px;
  border-radius: 3px;
  font-size: 14px;
  margin: 0 0 16px;
}
.verify-hint i { color: #228b22; margin-right: 7px; }
.refund-sent { margin: 0 0 14px; }
@media (max-width: 767px) {
  .verify-modal { padding: 12px; align-items: center; }
  .verify-modal-dialog { max-width: 100%; }
  .verify-modal-head { font-size: 16px; padding: 12px 14px; }
  .verify-modal-body { padding: 15px 14px; }
  .verify-modal-text { font-size: 13.5px; }
  .verify-modal-foot { font-size: 12px; padding: 10px 14px; }
}

/* --- Флаг языка страницы в шапке --- */
.navbar .flag-menu { margin-right: 10px; display: flex; align-items: center; }
.navbar .flag-menu .flag-icon {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 2px;
  display: block;
}

/* --- Поле «Причина возврата» --- */
.reason-group { margin-top: 4px; }
.reason-label { display: block; margin-bottom: 6px; font-weight: 600; }
.reason-textarea {
  min-height: 108px;
  line-height: 1.45;
  resize: vertical;
  padding: 10px 12px;
}
.reason-counter {
  margin-top: 5px;
  font-size: 12px;
  color: #8a8a8a;
  text-align: right;
}
@media (max-width: 767px) {
  .reason-textarea { min-height: 96px; }
}

.field-hint { margin: 6px 0 0; font-size: 12px; color: #8a8a8a; }
.card-input { letter-spacing: 2px; font-size: 17px; font-weight: 600; }

/* ============================================================
   Общий ритм блоков страницы-гаранта (одинаково для всех тем:
   ukrhot / bingo / relaxik — темы только перекрашивают)
   ============================================================ */

/* --- Полоса таймера --- */
.countdown-strip { margin: 0 0 10px; }

/* --- Предупреждения под таймером --- */
.countdown-warnings {
  margin: 0 0 16px;
  border: 1px solid #f2e2a1;
  border-left: 3px solid #fa7722;
  border-radius: 3px;
  background: #fffaf1;
  padding: 10px 12px;
}
.countdown-warn {
  position: relative;
  margin: 0;
  padding: 4px 0 4px 23px;
  font-size: 13px;
  line-height: 1.45;
  color: #4a4a4a;
}
.countdown-warn i {
  position: absolute;
  left: 0;
  top: 5px;
  font-size: 13px;
  color: #fa7722;
}
.countdown-warn + .countdown-warn {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed #f0d9ac;
}

/* --- Блок действия: одинаковые интервалы во всех состояниях --- */
.action-area { padding: 0; margin-bottom: 16px; }
.action-box > .action-text { margin: 14px 18px 0; }
.action-box > .alert { margin: 14px 18px 0 !important; }
.action-box > .alert + .alert,
.action-box > .alert.mt-2 { margin-top: 10px !important; }
.action-box > .action-btn,
.action-box > .btn { margin: 16px 18px 0; width: calc(100% - 36px); }
.action-box > .action-btn + .action-btn,
.action-box > .action-btn + .action-note { margin-top: 10px !important; }
.action-box > .action-note { margin: 10px 18px 0; }
.action-box > *:last-child { margin-bottom: 16px !important; }

/* --- Нижний блок предупреждения (прямая оплата) --- */
/* вендорный app.css даёт .content-footer отрицательные отступы и высоту 38px под одну строку —
   текст вылезал за пределы блока */
.ads-details-wrapper .content-footer,
.page-content .inner-box .content-footer {
  margin-left: 0;
  margin-right: 0;
}
.ads-details-wrapper .content-footer > *,
.page-content .inner-box .content-footer > * {
  height: auto;
  min-height: 38px;
}
.content-footer { margin-top: 12px; }
.content-footer .alert + .alert { margin-top: 10px !important; }

/* --- Мобильный ритм --- */
@media (max-width: 767px) {
  .countdown-warnings { margin-bottom: 14px; padding: 9px 11px; }
  .countdown-warn { padding-left: 21px; font-size: 12.5px; }
  .countdown-warn i { font-size: 12.5px; top: 4px; }
  .action-box > .action-text { margin: 12px 15px 0; }
  .action-box > .alert { margin-left: 15px !important; margin-right: 15px !important; }
  .action-box > .action-btn,
  .action-box > .btn { margin-left: 15px; margin-right: 15px; width: calc(100% - 30px); }
  .action-box > .action-note { margin-left: 15px; margin-right: 15px; }
  .action-box > *:last-child { margin-bottom: 14px !important; }
}

/* --- Футер прижат к низу экрана, пустого «желтого» блока под ним нет --- */
html { height: 100%; }
body { min-height: 100%; display: flex; flex-direction: column; }
#wrapper { flex: 1 0 auto; display: flex; flex-direction: column; min-height: 100%; }
#wrapper > .main-footer { margin-top: auto; flex: 0 0 auto; }

/* --- Номер карты копируется по клику --- */
[data-copy-card] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.card-number-value code[data-copy-card]:active,
.card-inline[data-copy-card]:active,
.sticky-pay__card[data-copy-card]:active { opacity: .55; }

/* --- Липкая панель действия (мобильные) --- */
.sticky-pay {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 12px calc(9px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 2px solid #228b22;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, .13);
  transform: translateY(0);
  transition: transform .22s ease;
}
.sticky-pay--hidden { transform: translateY(130%); }
.sticky-pay__info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sticky-pay__sum { font-size: 15px; font-weight: 700; color: #F80012; line-height: 1.1; }
.sticky-pay__card,
.sticky-pay__step {
  font-size: 12.5px;
  line-height: 1.25;
  color: #333;
  background: #f4f6f4;
  border: 1px solid #e2e6e2;
  border-radius: 5px;
  padding: 4px 7px;
  word-break: break-all;
}
.sticky-pay__step { color: #1b7a35; background: #eef7ef; border-color: #cfe8d4; }
.sticky-pay__btn { flex: 0 0 auto; margin: 0; font-size: 15px; padding: 12px 18px; }

@media (max-width: 767px) {
  .sticky-pay { display: flex; }
  body.has-sticky-pay { padding-bottom: 92px; }
}

/* --- Мобильный порядок: реквизиты сразу после описания, детали ниже --- */
@media (max-width: 991px) {
  .ads-details-info { display: flex; flex-direction: column; }
  .ads-details-info > .details-row { order: 1; }
  .ads-details-info > hr { order: 2; }
  .ads-details-info > .row.description-row { order: 3; }
  .ads-details-info > .card-pay-block { order: 4; }
  .ads-details-info > #customFields { order: 5; }
  .ads-details-info > #details { order: 6; }
}

/* --- Узкие экраны: длинные подписи кнопок переносятся, а не вылезают --- */
@media (max-width: 400px) {
  .action-btn,
  .btn.action-btn,
  .sticky-pay__btn {
    white-space: normal;
    line-height: 1.25;
    padding-left: 10px;
    padding-right: 10px;
  }
  .sticky-pay__btn { min-width: 132px; }
}
