/* Scoped tender form for akbarsstroi.ru (from tender.akbarsstroi.ru) */
.abs-tf {
  --abs-purple: #5100c1;
  --abs-purple-light: #7124d9;
  --abs-pink: #ff2262;
  --abs-error: #ff4e4e;
  --abs-text: #29272c;
  --abs-placeholder: #b2b2b2;
  --abs-bg-soft: #f1f3f8;
  --abs-yellow: #ffcd23;
  box-sizing: border-box;
  font-family: "Manrope", "Open Sans", system-ui, sans-serif;
  color: var(--abs-text);
  max-width: 720px;
  margin: 0 auto;
}
.abs-tf *,
.abs-tf *::before,
.abs-tf *::after {
  box-sizing: border-box;
}
.abs-tf__card {
  background: var(--abs-bg-soft);
  border-radius: 16px;
  padding: 28px 24px 24px;
}
.abs-tf__title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
}
.abs-tf__intro {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: #3f3e41;
}
.abs-tf__form.form {
  position: relative;
  margin: 0;
  text-align: left;
}
.abs-tf__form.form.is-submitting {
  pointer-events: none;
}
.abs-tf .form__loading {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  border-radius: 16px;
  background: rgba(241, 243, 248, 0.78);
  backdrop-filter: blur(2px);
}
.abs-tf .form__loading[hidden] {
  display: none;
}
.abs-tf .form__loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(114, 50, 168, 0.2);
  border-top-color: var(--abs-purple);
  border-radius: 50%;
  animation: abs-tf-spin 0.7s linear infinite;
}
@keyframes abs-tf-spin {
  to {
    transform: rotate(360deg);
  }
}
.abs-tf .form__loading-text {
  font-size: 14px;
  font-weight: 600;
}
.abs-tf .form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 16px;
}
.abs-tf .form__row--submit {
  align-items: center;
  margin-top: 8px;
  margin-bottom: 0;
}
.abs-tf .form__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.abs-tf .form__label {
  font-size: 13px;
}
.abs-tf .form__req {
  color: var(--abs-pink);
  margin-left: 2px;
}
.abs-tf .form__field input[type="text"],
.abs-tf .form__field input[type="tel"] {
  width: 100%;
  height: 52px;
  padding: 12px 20px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #fff;
  color: var(--abs-text);
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.abs-tf .form__field input:focus {
  outline: none;
  border-color: var(--abs-purple);
  box-shadow: 0 0 0 3px rgba(156, 39, 176, 0.1);
}
.abs-tf .form__field.is-error input {
  border-color: var(--abs-error);
}
.abs-tf .form__field input::placeholder {
  color: var(--abs-placeholder);
}
.abs-tf .form__error {
  min-height: 0;
  font-size: 11px;
  line-height: 1.3;
  color: var(--abs-pink);
}
.abs-tf .form__field.is-error .form__error:not(:empty),
.abs-tf .form__section.is-error .form__error:not(:empty),
.abs-tf .form__checkbox.is-error .form__error:not(:empty) {
  display: block;
  min-height: 14px;
  margin-top: 6px;
}
.abs-tf .form__error--global:not(:empty) {
  display: block;
  margin: 8px 0 0;
}
.abs-tf .form__section {
  margin: 8px 0 16px;
}
.abs-tf .form__section-title {
  margin: 0 0 10px;
}
.abs-tf .form__section.is-error .directions-select__header {
  border: 2px solid var(--abs-error);
}
.abs-tf .file-upload {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  min-height: 52px;
  border-radius: 12px;
  padding: 10px 12px 10px 20px;
}
.abs-tf .file-upload__preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: #999;
  min-width: 0;
}
.abs-tf .file-upload--has-file .file-upload__preview {
  color: var(--abs-text);
}
.abs-tf .file-upload__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.abs-tf .file-upload__remove {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  color: var(--abs-purple);
}
.abs-tf .file-upload--has-file .file-upload__remove {
  display: flex;
}
.abs-tf .file-upload__remove:hover {
  color: var(--abs-pink);
}
.abs-tf .file-upload__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--abs-purple);
  flex-shrink: 0;
  overflow: hidden;
}
/* Allcorp3 often overrides [hidden] on file inputs — visually hide, label still opens dialog */
.abs-tf .file-upload__btn input[type="file"],
.abs-tf .file-upload input.file-upload__input[type="file"],
.abs-tf .file-upload input[type="file"] {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  z-index: -1 !important;
}
.abs-tf .file-upload__btn svg {
  display: block;
  pointer-events: none;
}
.abs-tf .file-upload__btn:hover {
  color: var(--abs-pink);
}
.abs-tf .directions-select {
  border-radius: 12px;
  background: #fff;
  position: relative;
  z-index: 9;
}
.abs-tf .directions-select__header {
  width: 100%;
  padding: 14px 20px;
  background: #fff;
  border: 2px solid transparent;
  border-radius: 12px;
  color: var(--abs-text);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
}
.abs-tf .directions-select__header-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.abs-tf .directions-select__arrow {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--abs-purple);
  border-bottom: 2px solid var(--abs-purple);
  transform: rotate(45deg);
  flex-shrink: 0;
  margin-left: 12px;
  transition: transform 0.3s ease;
}
.abs-tf .directions-select--open .directions-select__arrow {
  transform: rotate(-135deg);
}
.abs-tf .directions-select__list {
  display: grid;
  gap: 12px;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 0;
  overflow: hidden;
  padding: 0;
  /* no max-height animation — it expands layout / flashes scrollbars */
  transition: none;
  background: #fff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.abs-tf .directions-select--open .directions-select__list {
  max-height: 280px;
  padding: 20px;
  overflow-y: auto;
}
.abs-tf .directions-select--open .directions-select__header {
  border-radius: 12px 12px 0 0;
}
/*
 * Modal: list is ALWAYS position:fixed (open and closed).
 * Never animate height here — otherwise closing drops back to absolute/static
 * mid-transition and stretches the dialog (scrollbar / content jump).
 */
.abs-tf-modal .directions-select__list {
  position: fixed !important;
  z-index: 1000001; /* above #popup_toggle_btn (999999) */
  top: 0;
  left: 0;
  right: auto;
  width: 1px;
  max-height: 0; /* no !important — open state sets inline max-height for scroll */
  padding: 0 !important;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  box-shadow: none;
  transition: none;
}
.abs-tf-modal .directions-select--open .directions-select__list {
  /* max-height MUST come from JS inline — never !important here or scroll breaks */
  padding: 20px !important;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  touch-action: pan-y;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  border-radius: 12px;
}
.abs-tf .abs-tf__empty-dirs {
  margin: 0;
  font-size: 13px;
  color: #666;
}
.abs-tf .form__checkbox {
  display: grid;
  grid-template-columns: 20px 1fr;
  column-gap: 8px;
  row-gap: 6px;
  align-items: start;
  font-size: 13px;
  line-height: 1.5;
  position: relative;
  cursor: pointer;
}
.abs-tf .form__checkbox input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.abs-tf .form__checkbox span.input {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin: 3px 0 0;
  border-radius: 4px;
  border: 2px solid #c8ccd6;
  background: #fff no-repeat center/12px 12px;
  box-sizing: border-box;
  grid-column: 1;
  flex-shrink: 0;
}
.abs-tf .form__checkbox > span:not(.input):not(.form__error) {
  grid-column: 2;
  min-width: 0;
}
.abs-tf .form__checkbox input:checked ~ span.input {
  border-color: var(--abs-purple);
  background-color: var(--abs-purple);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.5' d='M5 10l3 3 7-7'/%3E%3C/svg%3E");
}
.abs-tf .form__checkbox.is-error > span.input {
  box-shadow: 0 0 0 2px var(--abs-error);
}
.abs-tf .form__checkbox .form__error {
  grid-column: 1 / -1;
}
.abs-tf .form__checkbox a {
  color: var(--abs-purple);
  text-decoration: underline;
}
.abs-tf .form__checkbox a:hover {
  color: var(--abs-pink);
}
.abs-tf .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border: none;
  border-radius: 12px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.abs-tf .btn--primary {
  background: var(--abs-yellow);
  color: var(--abs-text);
}
.abs-tf .btn--primary:hover {
  filter: brightness(0.97);
}
.abs-tf .btn.is-loading,
.abs-tf .btn:disabled {
  cursor: wait;
  opacity: 0.85;
}
.abs-tf__thanks {
  text-align: center;
  padding: 24px 8px;
}
.abs-tf__thanks[hidden] {
  display: none !important;
}
.abs-tf__thanks-title {
  margin: 0 0 8px;
  font-size: 22px;
}
.abs-tf__thanks-text {
  margin: 0;
  font-size: 14px;
  color: #3f3e41;
}
.abs-tf.is-success .abs-tf__form {
  display: none;
}
.abs-tf.is-success .abs-tf__title,
.abs-tf.is-success .abs-tf__intro {
  display: none;
}
.abs-tf-modal:has(.form.is-submitting) .abs-tf-modal__title,
.abs-tf-modal:has(.form.is-submitting) .abs-tf-modal__text,
.abs-tf-modal:has(.abs-tf.is-success) .abs-tf-modal__title,
.abs-tf-modal:has(.abs-tf.is-success) .abs-tf-modal__text {
  display: none;
}
@media (max-width: 768px) {
  .abs-tf .form__row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .abs-tf .form__row--submit {
    grid-template-columns: 1fr;
  }
  .abs-tf .btn--submit {
    width: 100%;
  }
  .abs-tf .directions-select__list {
    position: static;
  }
  /* keep fixed in modal on mobile — static would push form height + scrollbar */
  .abs-tf-modal .directions-select__list {
    position: fixed !important;
  }
}

.abs-tf-modal__dialog {
  overflow-x: hidden;
}

/* Embedded (inside modal): no nested card chrome */
.abs-tf__card--bare {
  background: transparent;
  padding: 0;
  border-radius: 0;
  max-width: none;
}
.abs-tf--embedded {
  max-width: none;
  margin: 0;
}

/* Launch button */
.abs-tf-launch {
  margin: 24px 0;
}
.abs-tf-launch__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border: none;
  border-radius: 12px;
  background: var(--abs-yellow, #ffcd23);
  color: var(--abs-text, #29272c);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.abs-tf-launch__btn:hover {
  filter: brightness(0.97);
}

/* Modal */
html.abs-tf-modal-open {
  overflow: hidden;
}
.abs-tf-modal {
  --abs-purple: #5100c1;
  --abs-pink: #ff2262;
  --abs-text: #29272c;
  --abs-yellow: #ffcd23;
  --abs-bg-soft: #f1f3f8;
  /* fallback before JS pins to visualViewport */
  --abs-vv-height: 100dvh;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  height: var(--abs-vv-height, 100dvh);
  z-index: 1000000; /* above site #popup_toggle_btn (z-index: 999999) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  font-family: "Manrope", "Open Sans", system-ui, sans-serif;
  color: var(--abs-text);
  overflow: hidden;
}
.abs-tf-modal[hidden] {
  display: none !important;
}
.abs-tf-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 0, 31, 0.6);
  cursor: pointer;
}
.abs-tf-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(900px, calc(var(--abs-vv-height, 100dvh) - 32px));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: var(--abs-bg-soft);
  border-radius: 16px;
  padding: 40px 32px 28px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
}
.abs-tf-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  padding: 0;
}
.abs-tf-modal__close span {
  position: absolute;
  left: 9px;
  right: 9px;
  top: 50%;
  height: 2px;
  background: var(--abs-purple);
  border-radius: 1px;
}
.abs-tf-modal__close span:first-child {
  transform: translateY(-50%) rotate(45deg);
}
.abs-tf-modal__close span:last-child {
  transform: translateY(-50%) rotate(-45deg);
}
.abs-tf-modal__close:hover span {
  background: var(--abs-pink);
}
.abs-tf-modal__title {
  margin: 0 0 8px;
  padding-right: 40px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
}
.abs-tf-modal__text {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: #3f3e41;
}
@media (max-width: 768px) {
  .abs-tf-modal {
    padding: 8px 12px 12px;
    align-items: flex-end;
  }
  .abs-tf-modal__dialog {
    padding: 32px 20px 20px;
    width: 100%;
    max-height: calc(var(--abs-vv-height, 100dvh) - 20px);
    border-radius: 16px 16px 0 0;
  }
}
