.ase-sapi-widget {
  margin: 16px 0;
}

.ase-sapi-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 8px 10px;
  border: 1px solid #323232;
  border-radius: 3px;
  background: #fff;
  color: #323232;
  font-family: "Roboto", Sans-serif;
  font-size: 15px !important;
  font-weight: 500;
  line-height: 1.2;
  white-space: normal;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.ase-sapi-button:hover,
.ase-sapi-button:focus {
  border-color: #6ec1e4;
  background: linear-gradient(180deg, #77c8ee 0%, #63b4df 100%);
  color: #fff;
  filter: none;
}

.ase-sapi-button[disabled] {
  cursor: default;
  opacity: 0.78;
}

.ase-sapi-button-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: 1px;
  font-size: 15px !important;
  line-height: 1;
}

.ase-sapi-button-icon i {
  display: block;
  font-size: 15px !important;
  line-height: 1;
}

.ase-sapi-button-text {
  display: inline-block;
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.2;
  font-size: 15px !important;
}

.ase-sapi-status {
  min-height: 20px;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.4;
}

.ase-sapi-status.is-info {
  color: #486581;
}

.ase-sapi-status.is-success {
  color: #1f7a1f;
}

.ase-sapi-status.is-error {
  color: #b42318;
}

.ase-sapi-note {
  padding: 12px 16px;
  border: 1px solid #d9e2ec;
  border-radius: 10px;
  background: #fff;
  color: #486581;
  font-size: 14px;
}

.ase-sapi-modal[hidden] {
  display: none !important;
}

.ase-sapi-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.ase-sapi-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(24, 36, 56, 0.62);
}

.ase-sapi-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 320px);
  margin: 0;
  padding: 36px 16px 14px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
}

.ase-sapi-modal__close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  color: #1f2937;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.ase-sapi-modal__title {
  margin: 0 0 12px;
  text-align: center;
  color: #4a4f57;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 500;
}

.ase-sapi-modal__field {
  display: block;
  margin-bottom: 10px;
}

.ase-sapi-modal__label {
  display: none;
}

.ase-sapi-modal__input {
  display: block;
  width: 100%;
  border: 1px solid #d6d6d6;
  background: #fff;
  color: #4a4f57;
  font-size: 15px;
  line-height: 1.4;
  padding: 10px 12px;
}

.ase-sapi-modal__input:focus {
  outline: 0;
  border-color: #8ecdea;
  box-shadow: 0 0 0 3px rgba(116, 194, 231, 0.18);
}

.ase-sapi-modal__submit {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 3px;
  background: linear-gradient(180deg, #77c8ee 0%, #63b4df 100%);
  color: #fff;
  font-size: 16px !important;
  font-weight: 500;
  line-height: 1.2;
  padding: 10px 12px;
  cursor: pointer;
}

.ase-sapi-modal__submit[disabled] {
  opacity: 0.78;
  cursor: default;
}

.ase-sapi-modal__status {
  min-height: 18px;
  margin-top: 10px;
  color: #4a4f57;
  font-size: 13px;
  line-height: 1.35;
}

.ase-sapi-modal__status.is-info {
  color: #486581;
}

.ase-sapi-modal__status.is-success {
  color: #1f7a1f;
}

.ase-sapi-modal__status.is-error {
  color: #b42318;
}

.ase-sapi-widget.is-loading .ase-sapi-button::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: 6px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ase-sapi-spin 0.8s linear infinite;
}

html.ase-sapi-modal-open {
  overflow: hidden;
}

@keyframes ase-sapi-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 767px) {
  .ase-sapi-button {
    justify-content: center;
    font-size: 15px !important;
    padding: 8px 10px;
    white-space: normal;
  }

  .ase-sapi-button-text {
    text-align: center;
  }

  .ase-sapi-modal__dialog {
    width: min(94vw, 320px);
    padding: 36px 14px 14px;
  }

  .ase-sapi-modal__title {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .ase-sapi-modal__submit {
    font-size: 16px !important;
    padding: 10px 12px;
  }
}
