.stable-pdf-viewer {
  width: 100%;
  margin: 1rem 0;
}

.stable-pdf-viewer__frame-wrap {
  width: 100%;
  border: 1px solid #dcdcde;
  border-radius: 12px;
  overflow: hidden;
  background: #f6f7f7;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.stable-pdf-viewer__frame-wrap {
  position: relative;
}

.stable-pdf-viewer__overlay-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(29,35,39,.92);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,.24);
  backdrop-filter: blur(6px);
  transition: transform .15s ease, background .15s ease, opacity .15s ease;
}

.stable-pdf-viewer__overlay-button:hover {
  background: rgba(0,0,0,.96);
  transform: translateY(-1px);
}

.stable-pdf-viewer__overlay-button:focus-visible {
  outline: 2px solid #72aee6;
  outline-offset: 2px;
}

.stable-pdf-viewer__overlay-icon {
  font-size: 16px;
  line-height: 1;
}

.stable-pdf-viewer__overlay-text {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}


.stable-pdf-viewer__frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
}

.stable-pdf-viewer__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.stable-pdf-viewer__button,
.stable-pdf-viewer__button:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid #2271b1;
  color: #fff;
  background: #2271b1;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
}

.stable-pdf-viewer__button:hover {
  color: #fff;
  background: #135e96;
  border-color: #135e96;
}

.stable-pdf-viewer__button--secondary,
.stable-pdf-viewer__button--secondary:visited {
  background: #fff;
  color: #2271b1;
}

.stable-pdf-viewer__button--secondary:hover {
  color: #135e96;
  background: #f0f6fc;
  border-color: #135e96;
}

.stable-pdf-viewer__button--fullscreen {
  background: #1d2327;
  border-color: #1d2327;
}

.stable-pdf-viewer__button--fullscreen:hover {
  background: #000;
  border-color: #000;
}

.stable-pdf-viewer--error {
  padding: 12px 14px;
  border: 1px solid #d63638;
  background: #fcf0f1;
  color: #8a2424;
  border-radius: 8px;
}

.spv-modal[hidden] {
  display: none;
}

.spv-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
}

.spv-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
}

.spv-modal__dialog {
  position: relative;
  width: min(96vw, 1600px);
  height: min(92vh, 1100px);
  margin: 2.5vh auto;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
}

.spv-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: #1d2327;
  color: #fff;
}

.spv-modal__title {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spv-modal__close {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.spv-modal__body {
  flex: 1;
  min-height: 0;
  background: #e5e5e5;
}

.spv-modal__frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
}

body.spv-modal-open {
  overflow: hidden;
}

@media (max-width: 782px) {
  .stable-pdf-viewer__overlay-button {
    top: 10px;
    right: 10px;
    padding: 9px 12px;
  }

  .stable-pdf-viewer__overlay-text {
    font-size: 13px;
  }

  .spv-modal__dialog {
    width: 100vw;
    height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .stable-pdf-viewer__actions {
    flex-direction: column;
  }

  .stable-pdf-viewer__button,
  .stable-pdf-viewer__button:visited {
    width: 100%;
  }
}
