.wpfbm {
  background: var(--wpfbm-bg, #f3f0e8);
  border: 1px solid rgba(20, 20, 20, 0.12);
  color: #171717;
  margin: 24px 0;
  max-width: 100%;
  padding: 12px;
}

.wpfbm-toolbar {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}

.wpfbm-button {
  align-items: center;
  background: #ffffff;
  border: 1px solid rgba(20, 20, 20, 0.15);
  border-radius: 6px;
  box-shadow: none;
  color: #171717;
  cursor: pointer;
  display: inline-flex;
  font-size: 18px;
  font-weight: 700;
  height: 36px;
  justify-content: center;
  line-height: 1;
  min-width: 36px;
  padding: 0 10px;
  text-decoration: none;
}

.wpfbm-button:hover,
.wpfbm-button:focus {
  border-color: var(--wpfbm-accent, #2563eb);
  color: var(--wpfbm-accent, #2563eb);
  outline: none;
}

.wpfbm-download {
  font-size: 13px;
}

.wpfbm-counter {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(20, 20, 20, 0.1);
  border-radius: 6px;
  font-size: 13px;
  min-width: 72px;
  padding: 8px 10px;
  text-align: center;
}

.wpfbm-stage {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 360px;
  overflow: hidden;
  position: relative;
}

.wpfbm-book {
  opacity: 0;
  transition: opacity 180ms ease;
  width: 100%;
}

.wpfbm.is-ready .wpfbm-book {
  opacity: 1;
}

.wpfbm-status {
  color: #404040;
  font-size: 14px;
  left: 50%;
  max-width: min(520px, calc(100% - 32px));
  position: absolute;
  text-align: center;
  top: 50%;
  transform: translate(-50%, -50%);
}

.wpfbm-status.is-error {
  background: #ffffff;
  border-left: 4px solid #b91c1c;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  color: #7f1d1d;
  padding: 12px 14px;
  text-align: left;
}

.wpfbm.is-ready .wpfbm-status {
  display: none;
}

.wpfbm-error {
  border-left: 4px solid #b91c1c;
  padding-left: 12px;
}

.wpfbm:fullscreen {
  box-sizing: border-box;
  height: 100vh;
  margin: 0;
  padding: 18px;
}

.wpfbm:fullscreen .wpfbm-stage {
  height: calc(100vh - 76px);
}

@media (max-width: 640px) {
  .wpfbm {
    padding: 8px;
  }

  .wpfbm-toolbar {
    flex-wrap: wrap;
  }

  .wpfbm-stage {
    min-height: 300px;
  }
}
