.b24-form-wrapper.b24-form-border-bottom {
  border-bottom: none !important;
}

/* Remove all loading spinners for Bitrix24 forms */
.custom-form-loader,
.custom-form-spinner,
.b24-form-loader,
.b24-form-preloader,
.b24-form-spinner,
.b24-form-loader-icon {
  display: none !important;
}

.b24-form-wrapper {
  background-color: transparent !important;
}

.b24-form-btn {
  background-color: var(--color-red) !important;
  border: 1px solid var(--color-red) !important;
  border-radius: 0 !important;
  color: var(--color-white) !important;
  font-family: var(--font-family) !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  height: 3.25rem !important;
  min-height: 3.25rem !important;
  padding: 0.125rem 0.625rem !important;
  transition: all 0.3s ease !important;
  box-shadow: none !important;
}

.b24-form-btn:hover {
  background-color: transparent !important;
  color: var(--color-black) !important;
  border-color: var(--color-red) !important;
}

.b24-form-field-agreement .b24-form-field-agreement-link {
  color: var(--color-black) !important;
  text-decoration: underline !important;
}

.b24-form-control-list .b24-form-control,
.b24-form-control-select .field-item,
.b24-form-control-string .b24-form-control,
.b24-form-control-text .b24-form-control {
  background-color: var(--color-white) !important;
  background-image: none !important;
  border: 1px solid var(--color-border-input) !important;
  border-radius: 0 !important;
  color: var(--color-black) !important;
  font-size: 1rem !important;
  font-family: var(--font-family) !important;
  height: 3.25rem !important;
  padding: 1.0625rem 0.625rem 0 !important;
  width: 100% !important;
  letter-spacing: normal !important;
}

.b24-form-control-list .b24-form-control::placeholder,
.b24-form-control-select .field-item::placeholder,
.b24-form-control-string .b24-form-control::placeholder,
.b24-form-control-text .b24-form-control::placeholder {
  color: var(--color-placeholder-gray) !important;
}

.b24-form-control-file {
  background-color: var(--color-white) !important;
  border: 1px solid var(--color-border-input) !important;
  border-radius: 0 !important;
  font-size: 0.875rem !important;
  font-family: var(--font-family) !important;
  padding: 0.5625rem 0.625rem !important;
  width: 100% !important;
  letter-spacing: normal !important;
}

.b24-form-control-file .b24-form-control {
  background-color: var(--color-white) !important;
  border: 1px solid var(--color-border-input) !important;
  border-radius: 0 !important;
  color: var(--color-border-input) !important;
  font-size: 0.875rem !important;
  font-family: var(--font-family) !important;
  font-weight: 500 !important;
  padding: 0.5rem 0.625rem 0.5rem 1.875rem !important;
  margin: 0.125rem 0.5625rem 0 0 !important;
  opacity: 1 !important;
  display: inline-block !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  position: relative !important;
  transition: all 0.25s linear !important;
}

.b24-form-control-file .b24-form-control:after,
.b24-form-control-file .b24-form-control:before {
  content: "" !important;
  background-color: var(--color-border-input) !important;
  top: 50% !important;
  display: block !important;
  position: absolute !important;
  transition: all 0.25s linear !important;
}

.b24-form-padding-side {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.b24-form-content {
  padding: 0 !important;
}

.b24-form-sign {
  padding: 0.625rem 0 !important;
}

.custom-form-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: var(--spacing-220);
}

.custom-form-spinner {
  width: var(--spacing-40);
  height: var(--spacing-40);
  border: 3px solid var(--color-border-input);
  border-top-color: var(--color-red);
  border-radius: 0;
  animation: custom-spinner-rotate 0.8s linear infinite;
}

.b24-form-wrapper {
  display: none;
}

#checkoutFormWrapper .b24-form-wrapper,
#contactFormWrapper .b24-form-wrapper,
#footerFormWrapper .b24-form-wrapper {
  display: block;
}

#checkoutFormWrapper .b24-form-wrapper ~ .custom-form-loader,
#contactFormWrapper .b24-form-wrapper ~ .custom-form-loader,
#footerFormWrapper .b24-form-wrapper ~ .custom-form-loader {
  display: none;
}

@keyframes custom-spinner-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Footer Form Styles */
.footer-col .b24-form-header {
  padding: 0 !important;
  border-bottom: none !important;
  text-align: left !important;
}

.footer-col .b24-form-header-title {
  font-size: var(--font-size-18) !important;
  font-weight: 500 !important;
  line-height: 125% !important;
  color: var(--color-white) !important;
  font-family: var(--font-family) !important;
  margin-bottom: var(--spacing-24) !important;
}

.footer-col .b24-form-btn {
  background-color: transparent !important;
  border: 1px solid var(--color-red) !important;
  color: var(--color-red) !important;
  width: auto !important;
}

.footer-col .b24-form-btn:hover {
  background-color: var(--color-red) !important;
  color: var(--color-white) !important;
}

.footer-col .b24-form-field-agreement .b24-form-field-agreement-link {
  color: var(--color-white) !important;
}

.footer-col .b24-form a,
.footer-col .b24-form a:not([href]),
.footer-col .b24-form a:not([href]):not([tabindex]) {
  color: var(--color-white) !important;
}

#footerFormWrapper .b24-form-control-list .b24-form-control,
#footerFormWrapper .b24-form-control-select .field-item,
#footerFormWrapper .b24-form-control-string .b24-form-control,
#footerFormWrapper .b24-form-control-text .b24-form-control {
  background-color: transparent !important;
  border: none !important;
  border-bottom: 1px solid rgba(83, 131, 180, 1) !important;
  border-radius: 0 !important;
  color: var(--color-white) !important;
}

#footerFormWrapper .b24-form-control-list .b24-form-control::placeholder,
#footerFormWrapper .b24-form-control-select .field-item::placeholder,
#footerFormWrapper .b24-form-control-string .b24-form-control::placeholder,
#footerFormWrapper .b24-form-control-text .b24-form-control::placeholder {
  color: var(--color-white) !important;
}

#footerFormWrapper .b24-form-control-label,
#footerFormWrapper .b24-form-control-select-label {
  color: var(--color-white) !important;
}

#footerFormWrapper .b24-form-field-agreement .b24-form-field-agreement-link {
  color: var(--color-white) !important;
}

#footerFormWrapper .b24-form form > div:first-child {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: var(--spacing-20) !important;
}

#footerFormWrapper .b24-form-field-text {
  grid-column: 1 / -1 !important;
}

#footerFormWrapper .b24-form-control-list .b24-form-control:-webkit-autofill,
#footerFormWrapper .b24-form-control-select .field-item:-webkit-autofill,
#footerFormWrapper .b24-form-control-string .b24-form-control:-webkit-autofill,
#footerFormWrapper .b24-form-control-text .b24-form-control:-webkit-autofill {
  -webkit-box-shadow: inset 0 0 0 50px transparent !important;
  -webkit-text-fill-color: var(--color-white) !important;
  color: var(--color-white) !important;
}

@media (max-width: 1023px) {
  #footerFormWrapper .b24-form form > div:first-child {
    grid-template-columns: 1fr !important;
  }
}
