.nm-flyer-portal {
  border: 1px solid #ddd;
  padding: 16px;
  margin: 16px 0;
  background: #fff;
}

.nm-flyer-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nm-flyer-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 600;
  color: #c62828;
  text-decoration: none;
  line-height: 1;
  padding: 4px 8px;
}

.nm-flyer-clear:hover {
  color: #b71c1c;
}

.nm-flyer-clear[hidden] {
  display: none;
}

.nm-flyer-choose {
  margin: 16px 0 8px;
  font-size: 15px;
  color: #333;
  font-weight: 600;
}

.nm-flyer-choose[hidden] {
  display: none;
}

.nm-flyer-label {
  font-weight: 600;
}

.nm-flyer-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: 200px;
}

input[type=text].nm-flyer-postal {
  flex: 1;
  padding: calc(var(--wp--preset--spacing--30) - 1px) var(--wp--preset--spacing--50);
}

.entry-content button.nm-flyer-save {
	font-size: var(--wp--preset--font-size--normal);
  padding: calc(var(--wp--preset--spacing--30) - 1px) var(--wp--preset--spacing--50);
  cursor: pointer;
}

.nm-flyer-note {
  font-size: 13px;
  color: #555;
}

.nm-flyer-filters {
  margin-top: 8px;
}


.nm-flyer-status {
  margin-bottom: 16px;
  padding: 12px 16px 12px 44px;
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 6px;
  font-weight: 600;
  color: #2e7d32;
  position: relative;
  min-height: 20px;
}

.nm-flyer-status::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232e7d32'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.nm-flyer-status:empty {
  display: none;
}

.nm-flyer-status-text {
  opacity: 0;
  animation: nmFadeIn 0.3s ease forwards;
}

@keyframes nmFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.nm-flyer-viewer {
  margin-top: 16px;
}
.nm-flyer-viewer.is-hidden {
  display: none;
}

.nm-flyer-viewer-placeholder {
  padding: 16px;
  border: 1px dashed #ccc;
  color: #666;
  font-size: 14px;
}

.nm-flyer-pdf {
  border: 1px solid #ddd;
  padding: 12px;
  background: #fff;
}

.nm-flyer-pdf-toolbar {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.nm-flyer-pdf.has-pdf .nm-flyer-pdf-toolbar {
  display: flex;
}
.entry-content .nm-flyer-pdf-toolbar > *{
	  margin: 0;
}

.nm-flyer-pdf-toolbar button,
.nm-flyer-pdf-toolbar a {
  padding: 6px 10px;
  font-size: 14px;
}

.nm-flyer-pdf-toolbar [hidden] {
  display: none !important;
}

.nm-flyer-pdf-toolbar-bottom {
  margin-top: 12px;
}

.nm-flyer-pdf-canvas {
  overflow: visible;
  max-height: none;
}
.nm-flyer-pdf-canvas.is-zoomed {
  overflow: auto;
  max-height: 900px;
}

.nm-flyer-pdf-canvas canvas {
  width: var(--nm-pdf-width, 100%);
  height: var(--nm-pdf-height, auto);
  display: block;
}

.nm-pdf-page-wrap {
  position: relative;
}

.nm-flyer-pdf-canvas.is-scroll-mode .nm-pdf-page-wrap + .nm-pdf-page-wrap {
  margin-top: 16px;
}

.nm-flyer-pdf-canvas.is-scroll-mode {
  overflow-x: auto;
  max-height: none;
}

.nm-flyer-pdf-canvas.is-scroll-mode.is-zoomed {
  max-height: none;
}

.nm-flyer-pdf-message {
  margin-top: 8px;
  color: #666;
  font-size: 14px;
}

@media (max-width: 600px) {
  .nm-flyer-input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .nm-flyer-save {
    width: 100%;
  }
}
