.saib-crm-popup-source,
.alert:has(.saib-crm-popup-source) {
  display: none !important;
}

.saib-crm-popup-overlay {
  background-color: rgba(26, 28, 30, 0.7);
}

.spb-popup-main-wrapper:has(.saib-crm-result-popup) {
  background: url("/themes/custom/saib/images/bg-default.png");
  background-color: #ffffff;
  background-size: cover;
  border: 0;
  border-radius: 40px;
  box-shadow: none;
  max-width: 520px;
  overflow: hidden;
  padding: 0;
  width: min(520px, calc(100% - 32px)) !important;
}

.spb-popup-main-wrapper:has(.saib-crm-result-popup) .spb-controls {
  inset-inline-end: 24px;
  top: 24px;
}

.spb-popup-main-wrapper:has(.saib-crm-result-popup) .spb_close {
  background: url("/themes/custom/saib/images/icons/close-menus.svg") center / 32px 32px no-repeat;
  border: 0;
  height: 32px;
  width: 32px;
}

.spb-popup-main-wrapper:has(.saib-crm-result-popup) .spb-popup-content {
  padding: 0;
}

.saib-crm-result-popup {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 40px;
  position: relative;
  text-align: center;
}

.saib-crm-result-popup__status {
  background: url("/themes/custom/saib/images/icons/form-popup-success.svg") center / 64px 64px no-repeat;
  display: block;
  height: 64px;
  width: 64px;
}

.saib-crm-result-popup--warning .saib-crm-result-popup__status {
  background-image: url("/themes/custom/saib/images/icons/form-popup-error.svg");
}

.saib-crm-result-popup__content {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.saib-crm-result-popup__title {
  font-family: "Jokker", sans-serif;
  line-height: 28px;
  margin: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.saib-crm-result-popup__reference {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  line-height: 24px;
  min-width: 0;
  width: 100%;
}

.saib-crm-result-popup__reference strong {
  font-weight: 500;
}

.saib-crm-result-popup__copy {
  align-items: center;
  background: url("/themes/custom/saib/images/icons/form-popup-copy.svg") center / 32px 32px no-repeat;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  padding: 0;
  width: 32px;
}

.saib-crm-result-popup__copy.is-copied {
  opacity: 0.72;
}

.saib-crm-result-popup__details {
  display: grid;
  gap: 12px;
  margin: 8px 0 0;
  text-align: start;
  width: 100%;
}

.saib-crm-result-popup__detail {
  border-top: 1px solid rgba(26, 28, 30, 0.12);
  display: grid;
  gap: 4px;
  padding-top: 12px;
}

.saib-crm-result-popup__detail dt {
  color: #5d646b;
  font-size: 14px;
  margin: 0;
}

.saib-crm-result-popup__detail dd {
  color: #1a1c1e;
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  overflow-wrap: anywhere;
}

.saib-crm-result-popup__print {
  margin-top: 8px;
}

.alert:has(.saib-crm-document-status) {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: inherit;
  margin: 16px 0;
  padding: 0;
}

.alert:has(.saib-crm-document-status) .btn-close {
  display: none;
}

.saib-crm-document-status {
  align-items: flex-start;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  margin: 0;
  padding: 16px;
  text-align: start;
  width: 100%;
}

.form-actions > .saib-crm-document-status {
  margin-block-end: 16px;
}

.saib-crm-document-status.is-success {
  background: #f1f9ef;
  width: 100%;
}

.saib-crm-document-status.is-error {
  background: #fde9e6;
}

.saib-crm-document-status__copy {
  color: #707070;
  overflow-wrap: anywhere;
  width: 100%;
}

.saib-crm-document-status__message {
  margin: 0;
}

.saib-crm-document-status__details {
  color: #1a1c1e;
  margin: 4px 0 0;
  padding-inline-start: 21px;
}

.saib-crm-document-status__detail {
  margin: 0;
}

.saib-crm-document-status__print {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e8e2db;
  border-radius: 10px;
  color: #1a1c1e;
  display: inline-flex;
  font-weight: 500;
  gap: 8px;
  min-height: 40px;
  min-width: 96px;
  padding-block: 8px;
  padding-inline-end: 16px;
  padding-inline-start: 12px;
  text-decoration: none;
}

.saib-crm-document-status__print:hover,
.saib-crm-document-status__print:focus-visible {
  border-color: #a44f17;
  color: #1a1c1e;
}

.saib-crm-document-status__print-icon {
  height: 20px;
  width: 20px;
}

@media (max-width: 62rem) {
  .spb-popup-main-wrapper:has(.saib-crm-result-popup) {
    border-radius: 40px;
    bottom: auto;
    max-width: calc(100% - 32px);
    position: relative;
    width: calc(100% - 32px) !important;
  }

  .saib-crm-result-popup {
    padding: 40px 24px;
  }
}
