html.ift-fmodal-open {
  overflow: hidden;
}

.ift-fmodal {
  width: min(880px, calc(100vw - 48px));
  height: min(760px, calc(100vh - 48px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.25);
  overflow: hidden;
}

.ift-fmodal::backdrop {
  background: rgba(15, 23, 42, 0.55);
}

.ift-fmodal__panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ift-fmodal__head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px 14px 24px;
  border-bottom: 1px solid #e2e8f0;
}

.ift-fmodal__title {
  flex: 1;
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  text-transform: none;
}

.ift-fmodal__newtab {
  font-size: 0.8125rem;
  color: #64748b;
  text-decoration: underline;
}

.ift-fmodal__newtab:hover {
  color: #c75012;
}

.ift-fmodal__close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.ift-fmodal__close:hover {
  background: #f1f5f9;
}

.ift-fmodal__body {
  position: relative;
  flex: 1;
  min-height: 0;
}

.ift-fmodal__body.is-loading::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 3px solid #e2e8f0;
  border-top-color: #e56a1a;
  border-radius: 50%;
  animation: ift-fmodal-spin 0.8s linear infinite;
}

.ift-fmodal__body.is-loading .ift-fmodal__frame {
  visibility: hidden;
}

.ift-fmodal__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

@keyframes ift-fmodal-spin {
  to { transform: rotate(360deg); }
}
