/* Modal chrome for the shared email-form embed. Drop this + email-form.js
   into each host site (archeoblog / tesinepronte / perdomani) alongside a
   trigger element: <button type="button" data-email-form="archeoblog">…</button>
   The key must match one of the site keys in email-form's config.php. */

.ef-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 9999;
}
.ef-overlay[hidden] { display: none; }

.ef-modal {
  position: relative;
  width: min(560px, 100%);
  height: min(640px, 90dvh);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  .ef-modal { background: #1c1c1e; }
}

.ef-modal iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.ef-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}
.ef-close:hover { background: rgba(0, 0, 0, 0.75); }

/* Small screens: go near-fullscreen for easier typing/scrolling. */
@media (max-width: 480px) {
  .ef-overlay { padding: 0; }
  .ef-modal {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
  }
}
