/* ==========================================================================
   Foto guida — strato dedicato alle schermate reali, agli avvisi wallet
   e alle schede dei dati del destinatario. Si stratifica su orbitale.css.
   ========================================================================== */

/* ---------- Sezione foto nel riquadro di riferimento ---------- */

.photo-guide {
  border: 1px solid #5f76ab;
  border-radius: 20px;
  padding: 20px;
  background:
    radial-gradient(ellipse at 100% 0%, #3d55a014, transparent 65%),
    linear-gradient(150deg, #1b2a4c, #121a33);
  box-shadow: 0 0 28px #6289dd1a, inset 0 1px 0 #8fa8ff0f;
}

.photo-heading {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: #c5e6ff;
  margin: 0 0 20px;
  text-transform: uppercase;
  background: #3b5aa82e;
  border: 1px solid #6f8fd059;
  border-radius: 999px;
  padding: 7px 15px;
}

.photo-card { margin: 0 0 26px; }
.photo-card:last-child { margin-bottom: 0; }

.photo-card figcaption {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
  margin: 0 0 14px;
  font-size: .95rem;
}

.photo-number {
  background: linear-gradient(140deg, #6b5bd0, #4a3f96);
  border: 1px solid #bcb1ff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  font-size: .8rem;
  box-shadow: 0 0 14px #8b7bf04d, inset 0 1px 0 #ffffff33;
}

/* Anteprima cliccabile: cornice luminosa con ingrandimento evidente */
.photo-zoom {
  display: block;
  width: 100%;
  border: 1px solid #8ab8ee;
  border-radius: 14px;
  background: #101a30;
  color: #ecf5ff;
  padding: 8px;
  box-shadow: 0 0 20px #70b4ff26, inset 0 1px 0 #9dc4ff12;
  cursor: zoom-in;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.photo-zoom:hover {
  border-color: #c2e0ff;
  box-shadow: 0 0 30px #79bbff4d, inset 0 1px 0 #b8d8ff1c;
  transform: translateY(-2px);
}
.photo-zoom:active { transform: translateY(0); }

.photo-frame {
  display: block;
  position: relative;
  line-height: 0;
  max-width: 100%;
  margin: auto;
}
.photo-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  border-radius: 8px;
}

/* Riquadro arancione che indica dove guardare: pulsa dolcemente */
.photo-focus {
  position: absolute;
  border: 3px solid #ff7a1a;
  border-radius: 9px;
  box-shadow: 0 0 0 2px #ffffff, 0 0 16px #ff8a3d73;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .photo-focus { animation: pulsa 2.4s ease-in-out infinite; }
  @keyframes pulsa {
    0%, 100% { box-shadow: 0 0 0 2px #ffffff, 0 0 14px #ff8a3d59; }
    50% { box-shadow: 0 0 0 2px #ffffff, 0 0 30px #ff8a3dc4; }
  }
}

.photo-enlarge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: .75rem;
  padding: 12px 4px 6px;
  font-weight: 650;
  letter-spacing: .01em;
}
.photo-zoom:hover .photo-enlarge { color: #ffffff; }

.photo-caption { font-size: .85rem; line-height: 1.6; margin: 14px 0 8px; color: #e1eafd; }
.photo-card small { font-size: .7rem; line-height: 1.5; display: block; color: #b6c5e0; }

.photo-inline { display: none; }

/* Foto aperta nella finestra modale */
.photo-dialog .photo-frame { max-width: 630px; }
.photo-dialog .photo-frame img { max-height: none !important; width: 100%; object-fit: initial !important; }
.photo-dialog > p { margin-top: 22px; }

.photo-guide + .hintcard { margin-top: 18px; }
.photo-guide details { margin-top: 12px; }
.workspace:has(.photo-guide) { grid-template-columns: minmax(0, 1.2fr) minmax(320px, 1fr); }

/* ---------- Avviso wallet esterno: il messaggio più importante ---------- */

.wallet-warning {
  background: linear-gradient(150deg, #ffe27a, #ffd24d);
  color: #241b02;
  border: 2px solid #fff3bd;
  border-radius: 16px;
  padding: 20px 22px;
  margin: 0 0 24px;
  box-shadow: 0 0 30px #ffcc4440, 0 12px 30px #00000040, inset 0 1px 0 #ffffff80;
  position: relative;
  overflow: hidden;
}
.wallet-warning::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, #ffffff2e 48%, transparent 62%);
  transform: translateX(-100%);
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .wallet-warning::after { animation: luccichio 3.6s ease-in-out infinite; }
  @keyframes luccichio { 0%, 55% { transform: translateX(-100%); } 85%, 100% { transform: translateX(100%); } }
}
.wallet-warning > strong { display: block; font-size: 1.02rem; line-height: 1.45; letter-spacing: .01em; }
.wallet-warning p { margin: 12px 0 0; font-size: .92rem; line-height: 1.6; }

/* ---------- Esempio dati del destinatario ---------- */

.recipient-example {
  border: 1px solid #8798c4;
  background: linear-gradient(155deg, #131d38, #0e1629);
  border-radius: 16px;
  padding: 22px;
  margin: 22px 0;
  box-shadow: 0 0 24px #5b7ae01c, inset 0 1px 0 #96b0ff10;
}

.example-tag { font-size: .7rem; color: #c7d4f2; letter-spacing: .05em; line-height: 1.5; text-transform: uppercase; }
.recipient-example h2 { font-size: 1.15rem; margin: 14px 0 20px; }

.recipient-field {
  display: flex;
  gap: 12px;
  margin: 16px 0;
  padding: 15px 14px;
  border: 1px solid #43557e;
  border-radius: 12px;
  background: #182140;
  transition: border-color .18s, box-shadow .18s;
}
.recipient-field:hover { border-color: #6f88bb; box-shadow: 0 0 16px #648fe02e; }
.recipient-field > div { flex: 1; min-width: 0; }
.recipient-field strong { font-size: .85rem; color: #e4edfd; }

.field-number {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(140deg, #3a4f80, #2c3a63);
  border: 1px solid #6f88bb;
  font-size: .8rem;
}

.field-example {
  margin-top: 10px;
  background: #0a1228;
  border: 1px dashed #8095be;
  border-radius: 8px;
  padding: 12px;
  color: #cbd7ef;
  font-size: .85rem;
  line-height: 1.5;
}

.recipient-field.is-current {
  border: 2px solid #ffdf68;
  background: #ffdf680f;
  box-shadow: 0 0 20px #ffd24d30;
}
.field-focus { color: #ffdf68; font-size: .8rem; margin: 12px 0 0; font-weight: 650; }
.example-foot { font-size: .8rem; line-height: 1.6; margin: 18px 0 0; color: #bdd6f3; }

/* ---------- Mobile ---------- */

@media (max-width: 760px) {
  .workspace:has(.photo-guide) { grid-template-columns: 1fr; }
  .photo-inline { display: block; margin: 22px -10px; }
  .has-photos #reference { display: none; }
  .photo-guide { padding: 16px 13px; border-radius: 15px; }
  .photo-card figcaption { font-size: .9rem; }
  .photo-caption { font-size: .9rem; }
  .photo-enlarge { font-size: .8rem; }
  .photo-card small { font-size: .7rem; }
  .photo-heading { font-size: .72rem; }
  .photo-inline video { width: 100%; }
  .photo-frame img { max-height: none; }
  .photo-dialog .photo-focus { border-width: 2px; }
  .wallet-warning { padding: 16px; }
  .recipient-example { padding: 16px 12px; }
  .recipient-field { gap: 8px; padding: 12px 8px; }
  .wallet-warning > strong { font-size: .95rem; }
}
