/* ==========================================================
   OVERLAY A TUTTO SCHERMO PER TESTI LUNGHI
   Ispirato al modal di secondhand.html: overlay fisso,
   testo scrollabile, tasto CHIUDI sempre visibile in basso.
   File isolato: non modifica style-compact.css
   ========================================================== */

/* Contenitore che ospita un'immagine + le sue aree cliccabili */
.outbound-img-wrap {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 10px auto;
}

.outbound-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Area rettangolare invisibile e cliccabile sopra l'immagine */
.clickable-area {
  position: absolute;
  cursor: pointer;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}

/* Overlay a tutto schermo */
.text-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #F5FBFC;
  z-index: 3000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 40px 24px 120px 24px;
}

.text-overlay.active {
  display: block;
}

.text-overlay-text {
  font-family: 'Spectral', serif;
  font-size: 1.1em;
  line-height: 1.6;
  color: #333;
  max-width: 500px;
  margin: 0 auto;
  text-align: left;
}

.text-overlay-text p {
  margin: 0 0 16px 0;
}

.text-overlay-text p:last-child {
  margin-bottom: 0;
}

.text-overlay-close {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3002;
  font-family: 'Passion One', cursive;
  font-weight: 400;
  font-size: 1.4em;
  padding: 10px 28px;
  background-color: #FF6022;
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.text-overlay-close:active {
  background-color: #666666;
}
