.fullscreen-preview-modal.ant-modal {
  top: 0;
  max-width: 100vw;
  margin: 0;
  padding: 0;
}

.fullscreen-preview-modal .ant-modal-content {
  display: flex;
  flex-direction: column;
  width: 100vw;
  min-height: 100dvh;
  height: 100dvh;
  padding: 0;
  overflow: hidden;
  border-radius: 0;
  background: #0b1220;
}

.fullscreen-preview-modal .ant-modal-header {
  margin: 0;
  padding: 0;
  border-bottom: 0;
  background: transparent;
}

.fullscreen-preview-modal .ant-modal-close {
  display: none;
}

.fullscreen-preview-modal .ant-modal-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.fullscreen-preview-modal__shell {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  background: #0b1220;
}

.fullscreen-preview-modal__header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: max(12px, env(safe-area-inset-top, 0px)) 14px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(11, 18, 32, 0.92);
  backdrop-filter: blur(16px);
}

.fullscreen-preview-modal__title-group {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 36px;
  gap: 2px;
  justify-content: center;
}

.fullscreen-preview-modal__title {
  display: block;
  overflow: hidden;
  color: #f8fafc;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fullscreen-preview-modal__meta {
  overflow: hidden;
  color: rgba(226, 232, 240, 0.82);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fullscreen-preview-modal__actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.fullscreen-preview-modal__icon-button.ant-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #f8fafc;
  background: rgba(30, 41, 59, 0.82);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.16);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-fill-color: currentColor;
  touch-action: manipulation;
  transition:
    color 140ms ease,
    background-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.fullscreen-preview-modal__minimize-button.ant-btn {
  flex: 0 0 auto;
}

.fullscreen-preview-modal__icon-button.ant-btn > span,
.fullscreen-preview-modal__icon-button.ant-btn .ant-btn-icon,
.fullscreen-preview-modal__icon-button.ant-btn .anticon,
.fullscreen-preview-modal__icon-button.ant-btn .anticon svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  vertical-align: middle;
}

.fullscreen-preview-modal__icon-button.ant-btn .ant-btn-icon,
.fullscreen-preview-modal__icon-button.ant-btn .anticon {
  color: inherit;
  font-size: 18px;
}

.fullscreen-preview-modal__icon-button.ant-btn .anticon svg {
  fill: currentColor;
  stroke: currentColor;
}

.fullscreen-preview-modal__minimize-button.ant-btn .anticon {
  font-size: 16px;
}

.fullscreen-preview-modal__close-button.ant-btn {
  flex: 0 0 auto;
}

.fullscreen-preview-modal__icon-button.ant-btn:hover,
.fullscreen-preview-modal__icon-button.ant-btn:focus,
.fullscreen-preview-modal__icon-button.ant-btn:focus-visible,
.fullscreen-preview-modal__icon-button.ant-btn:active,
.fullscreen-preview-modal__icon-button.ant-btn.ant-btn-text:not(:disabled):not(.ant-btn-disabled):active {
  color: #fff;
  background: rgba(51, 65, 85, 0.94);
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.24);
}

.fullscreen-preview-modal__icon-button.ant-btn:active,
.fullscreen-preview-modal__icon-button.ant-btn.ant-btn-text:not(:disabled):not(.ant-btn-disabled):active {
  transform: scale(0.97);
}

@media (max-width: 768px) {
  .fullscreen-preview-modal__header {
    gap: 10px;
    padding: max(10px, env(safe-area-inset-top, 0px)) 12px 10px;
  }

  .fullscreen-preview-modal__title-group {
    min-height: 34px;
    gap: 1px;
  }

  .fullscreen-preview-modal__title {
    font-size: 13px;
  }

  .fullscreen-preview-modal__meta {
    font-size: 11px;
  }

  .fullscreen-preview-modal__actions {
    gap: 4px;
  }

}

.fullscreen-preview-modal__content {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  background: #0b1220;
}

.fullscreen-preview-modal__content--fill > * {
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.zoomable-preview-surface {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.zoomable-preview-surface__toolbar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(11, 18, 32, 0.64);
  backdrop-filter: blur(16px);
}

.zoomable-preview-surface__value.ant-typography {
  min-width: 52px;
  margin: 0;
  color: #f8fafc;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.zoomable-preview-surface__stage {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
}

.zoomable-preview-surface__content {
  width: 100%;
  height: 100%;
  transform-origin: center center;
  will-change: transform;
}
