/*
 * Portale eventi ISORS - anteprima-relatore.css
 * L'anteprima di un relatore al passaggio del mouse (assets/js/anteprima-relatore.js): carta chiara con ombra tinta del
 * Blu ISORS, foto in un cerchio o iniziali bianche sul Blu ISORS. Nessun HEX: solo i ruoli di sito.css.
 * Ordine nel <head>: dopo sito.css e marchi.css.
 */

/* ------------------------------------------------------------------ il nome nel testo */

/* Il pulsante deve sembrare testo: stesso carattere, stesso colore, solo una sottolineatura a puntini che dice «c'è altro» */
.nome-rel {
  display: inline;
  appearance: none; -webkit-appearance: none;
  margin: 0; padding: 0; border: 0; border-radius: 3px; background: none;
  font: inherit; letter-spacing: inherit; color: inherit; text-align: inherit; text-transform: inherit;
  max-width: 100%; overflow-wrap: anywhere;
  text-decoration: underline dotted; text-decoration-thickness: 1px; text-underline-offset: 0.22em;
  cursor: help;
  -webkit-tap-highlight-color: transparent;
}
.nome-rel:hover { text-decoration-style: solid; }
/* Il nome che porta alla pagina della persona: collegamento (con l'anteprima se c'è il profilo pubblico) */
a.nome-rel { cursor: pointer; }
.nome-pagina {
  color: inherit; overflow-wrap: anywhere;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em;
}
.nome-pagina:hover { text-decoration-thickness: 2px; }

/* ------------------------------------------------------------------ l'anteprima */

.anteprima-rel {
  position: fixed; left: 0; top: 0; z-index: 400;
  width: min(22rem, calc(100vw - 16px));
  display: grid; gap: 12px;
  padding: 16px 18px 18px;
  border-radius: var(--raggio-carta);
  background: var(--superficie); color: var(--testo);
  box-shadow: var(--ombra-alta), 0 0 0 1px var(--linee);
  font-family: var(--font-testo-sito); font-size: var(--t-nota); line-height: 1.45; text-align: left;
  overflow-wrap: anywhere;
}
/* col mouse è un suggerimento: non prende il puntatore e non lo ostacola */
.anteprima-rel--puntatore { pointer-events: none; }

.anteprima-rel p { margin: 0; max-width: none; }
.anteprima-rel__testa { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; align-items: center; }
.anteprima-rel__foto {
  display: grid; place-items: center;
  width: 72px; height: 72px; border-radius: 50%; overflow: hidden;
  background: var(--ghiaccio);
}
.anteprima-rel__foto img { width: 100%; height: 100%; object-fit: cover; }
.anteprima-rel__foto--vuota {
  background: var(--blu); color: var(--bianco);
  font-family: var(--font); font-weight: var(--peso-titolo); font-size: 1.5rem; letter-spacing: 0.02em;
}
.anteprima-rel__chiHa { display: grid; gap: 2px; min-width: 0; }
.anteprima-rel__nome { font-family: var(--font); font-weight: var(--peso-titolo); font-size: 1.1875rem; line-height: 1.2; color: var(--titoli); }
.anteprima-rel__chi { color: var(--testo-2); }
.anteprima-rel__bio { color: var(--testo); }
.anteprima-rel__email { color: var(--testo-2); }
.anteprima-rel__email a { color: var(--link); }

/* telefono e touch: pannello in basso, a tutta larghezza fino a 28 rem */
.anteprima-rel--pannello {
  top: auto; bottom: 8px; left: 8px; right: 8px;
  width: auto; max-width: 28rem; margin-inline: auto;
  max-height: calc(100svh - 16px); overflow-y: auto;
  transform: none !important;
}
.anteprima-rel__chiudi {
  justify-self: end; min-height: 44px; padding: 0 20px;
  border: 1.5px solid var(--linee); border-radius: var(--pillola);
  background: var(--superficie); color: var(--titoli);
  font: inherit; font-weight: var(--peso-medio); cursor: pointer;
}
.anteprima-rel__chiudi:hover { border-color: var(--titoli); }

/* dissolvenza breve, solo opacità, solo se il movimento è gradito */
@media (prefers-reduced-motion: no-preference) {
  .anteprima-rel:not([hidden]) { animation: anteprima-rel-entra 140ms var(--curva) both; }
  .anteprima-rel--pannello:not([hidden]) { animation-duration: 200ms; }
}
@keyframes anteprima-rel-entra { from { opacity: 0; } to { opacity: 1; } }

@media print { .anteprima-rel { display: none !important; } .nome-rel, .nome-pagina { text-decoration: none; } }
