/* Solferino 3 — popup-manager. Copiare invariato accanto a popup-manager.js
   su ogni sito. Colori/dimensioni specifici del singolo popup arrivano da
   style inline (vedi popup-manager.js): questo file è solo la meccanica
   (overlay, centratura, pulsanti). */

.pm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 999999;
}

.pm-box {
  position: relative;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 8px;
  padding: 32px 24px 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

.pm-box--fullscreen {
  max-width: none;
  width: calc(100% - 32px);
  height: calc(100% - 32px);
  max-height: none;
}

.pm-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  opacity: 0.6;
}

.pm-close:hover {
  opacity: 1;
}

.pm-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 16px;
}

.pm-title {
  margin: 0 0 12px;
  font-size: 1.4em;
}

.pm-text {
  margin: 0 0 16px;
  white-space: pre-line;
  line-height: 1.5;
}

.pm-text a {
  color: inherit;
  text-decoration: underline;
}

.pm-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pm-btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.pm-btn--primary {
  background: #111;
  color: #fff;
}

.pm-btn--secondary {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
}
