/* T1 Hover Hint — pill hint con auto-dismiss (JS: data-hint-dismissed) */

.notes-panel-header__actions,
.notes-panel-header__share-pair {
  overflow: visible;
}

[data-t1-hint] {
  position: relative;
  overflow: visible;
}

[data-t1-hint] > .t1-hover-hint {
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  z-index: 220;
  white-space: nowrap;
  width: max-content;
  max-width: min(240px, 42vw);
  margin: 0;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.25;
  text-transform: uppercase;
  color: rgba(224, 247, 250, 0.94);
  background:
    linear-gradient(
      160deg,
      rgba(232, 240, 250, 0.07) 0%,
      rgba(10, 14, 22, 0.78) 52%,
      rgba(6, 8, 14, 0.9) 100%
    );
  border: 1px solid color-mix(in srgb, var(--t1-cyan, #00e5ff) 24%, rgba(255, 255, 255, 0.07));
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.46),
    0 0 16px color-mix(in srgb, var(--t1-cyan, #00e5ff) 14%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-50%) translateX(6px);
  transition:
    opacity 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.2s,
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-t1-hint]:hover:not([data-hint-dismissed]) > .t1-hover-hint,
[data-t1-hint]:focus-visible:not([data-hint-dismissed]) > .t1-hover-hint {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
}

[data-t1-hint][data-hint-dismissed]:hover > .t1-hover-hint,
[data-t1-hint][data-hint-dismissed]:focus-visible > .t1-hover-hint {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) translateX(6px);
}

/* Impostazioni — trigger ? (Studio + Centro di controllo) */
.settings-detail__hint-trigger {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 2px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--t1-cyan, #00e5ff) 28%, rgba(255, 255, 255, 0.12));
  background: rgba(0, 0, 0, 0.28);
  color: var(--t1-helm-frost-muted, rgba(232, 240, 250, 0.75));
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

.settings-detail__hint-host[data-t1-hint] > .t1-hover-hint {
  white-space: normal;
  text-transform: none;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.35;
  max-width: min(260px, 52vw);
}

/* Wrappers hint Palco con position:absolute/fixed — override [data-t1-hint]{position:relative} */
.gateway-guide-hint-host[data-t1-hint] {
  position: absolute;
}

.gateway-fs-hint-host[data-t1-hint] {
  position: fixed;
}

/* Hint "below" — guida testata (centrato sul wrapper) */
.gateway-guide-hint-host[data-t1-hint='below'] > .t1-hover-hint {
  right: auto;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  z-index: 10030;
}

.gateway-guide-hint-host[data-t1-hint='below']:hover:not([data-hint-dismissed]) > .t1-hover-hint,
.gateway-guide-hint-host[data-t1-hint='below']:focus-within:not([data-hint-dismissed]) > .t1-hover-hint {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.gateway-guide-hint-host[data-t1-hint='below'][data-hint-dismissed]:hover > .t1-hover-hint,
.gateway-guide-hint-host[data-t1-hint='below'][data-hint-dismissed]:focus-within > .t1-hover-hint {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(4px);
}

/* Hint "below" — fullscreen (ancorato a destra, evita taglio viewport) */
.gateway-fs-hint-host[data-t1-hint='below'] > .t1-hover-hint {
  left: auto;
  right: 0;
  top: calc(100% + 8px);
  transform: translateY(4px);
  z-index: 10030;
}

.gateway-fs-hint-host[data-t1-hint='below']:hover:not([data-hint-dismissed]) > .t1-hover-hint,
.gateway-fs-hint-host[data-t1-hint='below']:focus-within:not([data-hint-dismissed]) > .t1-hover-hint {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.gateway-fs-hint-host[data-t1-hint='below'][data-hint-dismissed]:hover > .t1-hover-hint,
.gateway-fs-hint-host[data-t1-hint='below'][data-hint-dismissed]:focus-within > .t1-hover-hint {
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
}

/* Cockpit cluster alto dx — wrapper fixed (override position:relative) */
.cockpit-cluster-hint-host[data-t1-hint] {
  position: fixed;
}

.cockpit-cluster-hint-host[data-t1-hint] > .t1-hover-hint {
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 9px;
  font-weight: 600;
  padding: 4px 8px;
  max-width: none;
  z-index: 20130;
}

/* ? e Zen — centrati sotto la gemma */
.cockpit-cluster-hint-host--guide[data-t1-hint='below'] > .t1-hover-hint,
.cockpit-cluster-hint-host--zen[data-t1-hint='below'] > .t1-hover-hint {
  left: 50%;
  right: auto;
  top: calc(100% + 6px);
  transform: translateX(-50%) translateY(4px);
}

.cockpit-cluster-hint-host--guide[data-t1-hint='below']:hover:not([data-hint-dismissed]) > .t1-hover-hint,
.cockpit-cluster-hint-host--guide[data-t1-hint='below']:focus-within:not([data-hint-dismissed]) > .t1-hover-hint,
.cockpit-cluster-hint-host--zen[data-t1-hint='below']:hover:not([data-hint-dismissed]) > .t1-hover-hint,
.cockpit-cluster-hint-host--zen[data-t1-hint='below']:focus-within:not([data-hint-dismissed]) > .t1-hover-hint {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.cockpit-cluster-hint-host--guide[data-t1-hint='below'][data-hint-dismissed]:hover > .t1-hover-hint,
.cockpit-cluster-hint-host--guide[data-t1-hint='below'][data-hint-dismissed]:focus-within > .t1-hover-hint,
.cockpit-cluster-hint-host--zen[data-t1-hint='below'][data-hint-dismissed]:hover > .t1-hover-hint,
.cockpit-cluster-hint-host--zen[data-t1-hint='below'][data-hint-dismissed]:focus-within > .t1-hover-hint {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(4px);
}

/* FS — ancorato a destra (bordo viewport, testo lungo) */
.cockpit-cluster-hint-host--fs[data-t1-hint='below'] > .t1-hover-hint {
  left: auto;
  right: 0;
  top: calc(100% + 6px);
  transform: translateY(4px);
}

.cockpit-cluster-hint-host--fs[data-t1-hint='below']:hover:not([data-hint-dismissed]) > .t1-hover-hint,
.cockpit-cluster-hint-host--fs[data-t1-hint='below']:focus-within:not([data-hint-dismissed]) > .t1-hover-hint {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cockpit-cluster-hint-host--fs[data-t1-hint='below'][data-hint-dismissed]:hover > .t1-hover-hint,
.cockpit-cluster-hint-host--fs[data-t1-hint='below'][data-hint-dismissed]:focus-within > .t1-hover-hint {
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
}

.cockpit-cluster-hint-host[data-t1-hint='below']:hover,
.cockpit-cluster-hint-host[data-t1-hint='below']:focus-within {
  z-index: 20125;
}

/* Palco Centro di controllo — pannello hint (riferimento: plancia Inviti) */
.gateway-shell--palco [data-t1-hint] > .t1-hover-hint {
  white-space: normal;
  text-align: center;
  text-transform: none;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.45;
  padding: 9px 15px;
  min-width: 8.5rem;
  max-width: min(300px, 78vw);
  width: auto;
  color: rgba(248, 252, 255, 0.96);
  border-color: color-mix(in srgb, var(--t1-palco-sessions-frost-bright, #c8daf0) 32%, rgba(255, 255, 255, 0.1));
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.52),
    0 0 18px color-mix(in srgb, var(--t1-palco-sessions-frost-bright, #c8daf0) 16%, transparent);
}

.gateway-shell--palco .settings-detail__hint-host[data-t1-hint] > .t1-hover-hint {
  font-size: 0.76rem;
  line-height: 1.45;
  max-width: min(300px, 78vw);
}

/* Icone riga nota (Modifica / Elimina) — wrapper absolute, hint sotto l'icona */
.note-action-hint-host[data-t1-hint] {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.note-action-hint-host[data-t1-hint='below'] > .t1-hover-hint {
  left: 50%;
  right: auto;
  top: calc(100% + 4px);
  transform: translateX(-50%) translateY(3px);
  z-index: 60;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  max-width: none;
  /* Sfondo pieno senza trasparenza — non si confonde con le righe note */
  background: rgba(8, 10, 18, 0.97);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-color: color-mix(in srgb, var(--t1-cyan, #00e5ff) 30%, rgba(255, 255, 255, 0.1));
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.55),
    0 0 10px color-mix(in srgb, var(--t1-cyan, #00e5ff) 8%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.note-action-hint-host[data-t1-hint='below']:hover:not([data-hint-dismissed]) > .t1-hover-hint,
.note-action-hint-host[data-t1-hint='below']:focus-within:not([data-hint-dismissed]) > .t1-hover-hint {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.note-action-hint-host[data-t1-hint='below'][data-hint-dismissed]:hover > .t1-hover-hint,
.note-action-hint-host[data-t1-hint='below'][data-hint-dismissed]:focus-within > .t1-hover-hint {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(3px);
}

/* Scheda profilo — valori anagrafica troncati (P4 below, testo leggibile) */
.identity-hub-overlay .identity-hub-value-hint-host[data-t1-hint='below'] > .t1-hover-hint {
  left: 0;
  right: auto;
  top: calc(100% + 5px);
  transform: translateY(4px);
  z-index: 240;
  white-space: normal;
  text-transform: none;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.4;
  text-align: left;
  max-width: min(320px, 88vw);
  padding: 8px 12px;
}

.identity-hub-overlay .identity-hub-value-hint-host[data-t1-hint='below']:hover:not([data-hint-dismissed]) > .t1-hover-hint,
.identity-hub-overlay .identity-hub-value-hint-host[data-t1-hint='below']:focus-within:not([data-hint-dismissed]) > .t1-hover-hint {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.identity-hub-overlay .identity-hub-value-hint-host[data-t1-hint='below'][data-hint-dismissed]:hover > .t1-hover-hint,
.identity-hub-overlay .identity-hub-value-hint-host[data-t1-hint='below'][data-hint-dismissed]:focus-within > .t1-hover-hint {
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
}

