/* ==========================================================================
   110_hp4_auth-access.css
   Stili per icona login header, voce hamburger, modale Registrati/Accedi
   usati dalla route /homepage4 (route 110). Non tocca asset globali.
   Identita' cromatica coerente con /homepage3.css (gold/cyan su dark).
   Tutte le classi sono prefissate `hp4-auth-` o `hp4-` per evitare clash.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Icona login in header
   -------------------------------------------------------------------------- */
.hp4-auth-root .hp4-auth-entry-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--hp3-border-bright, rgba(255, 255, 255, 0.18));
  background: transparent;
  color: var(--hp3-text, #e8eaed);
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.25s,
              color 0.25s,
              box-shadow 0.25s;
}

.hp4-auth-root .hp4-auth-entry-button i { line-height: 1; }

.hp4-auth-root .hp4-auth-entry-button:hover,
.hp4-auth-root .hp4-auth-entry-button:focus-visible {
  border-color: var(--hp3-cyan, #00d4ff);
  color: var(--hp3-cyan, #00d4ff);
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.25);
  outline: none;
}

.hp4-auth-root .hp4-auth-entry-button:focus-visible {
  outline: 2px solid var(--hp3-cyan, #00d4ff);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   2. Voce hamburger "Area cliente"
   -------------------------------------------------------------------------- */
.hp4-auth-root .hp4-auth-hamburger-entry {
  width: 100%;
  background: transparent;
  border: 1px solid var(--hp3-border-bright, rgba(255, 255, 255, 0.18));
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 12px;
  color: var(--hp3-text, #e8eaed);
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: inherit;
  font-weight: 500;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.hp4-auth-root .hp4-auth-hamburger-entry:hover,
.hp4-auth-root .hp4-auth-hamburger-entry:focus-visible {
  color: var(--hp3-gold, #d4af37);
  border-color: var(--hp3-gold, #d4af37);
  background: rgba(212, 175, 55, 0.06);
  outline: none;
}

.hp4-auth-root .hp4-auth-hamburger-entry i {
  font-size: 1.1rem;
  color: var(--hp3-cyan, #00d4ff);
}

/* --------------------------------------------------------------------------
   3. Modale auth
   -------------------------------------------------------------------------- */
.hp4-auth-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 6, 12, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s ease;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-y: auto;
}

.hp4-auth-modal-overlay[hidden] {
  display: none !important;
}

.hp4-auth-modal-overlay.is-open {
  opacity: 1;
}

.hp4-auth-modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  background: linear-gradient(160deg, rgba(17, 22, 42, 0.96) 0%, rgba(7, 8, 15, 0.96) 100%);
  border: 1px solid var(--hp3-border-bright, rgba(255, 255, 255, 0.18));
  border-radius: 18px;
  padding: 28px 30px 32px;
  color: var(--hp3-text, #e8eaed);
  font-family: 'Lato', system-ui, sans-serif;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  margin: auto;
  transform: translateY(8px) scale(0.98);
  transition: transform 0.25s ease;
}

.hp4-auth-modal-overlay.is-open .hp4-auth-modal {
  transform: translateY(0) scale(1);
}

.hp4-auth-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.hp4-auth-modal-title {
  margin: 0;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: 10px;
  row-gap: 4px;
}

.hp4-auth-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  white-space: nowrap;
}

.hp4-auth-modal-title .gold { color: var(--hp3-gold, #d4af37); }
.hp4-auth-modal-title .text { color: var(--hp3-text, #e8eaed); }
.hp4-auth-modal-title .cursor {
  color: var(--hp3-gold, #d4af37);
  animation: hp4-auth-blink 1.05s steps(1) infinite;
}

.hp4-auth-modal-title small {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--hp3-cyan, #00d4ff);
  margin-left: 4px;
}

@keyframes hp4-auth-blink {
  0%, 50%   { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.hp4-auth-modal-close {
  background: transparent;
  border: 1px solid var(--hp3-border-bright, rgba(255, 255, 255, 0.18));
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--hp3-text, #e8eaed);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}

.hp4-auth-modal-close:hover,
.hp4-auth-modal-close:focus-visible {
  color: var(--hp3-gold, #d4af37);
  border-color: var(--hp3-gold, #d4af37);
  transform: rotate(90deg);
  outline: none;
}

.hp4-auth-modal-body { margin-top: 6px; }

.hp4-auth-modal-lead {
  margin: 0 0 18px;
  font-size: 1rem;
  color: var(--hp3-text-dim, #9aa0b4);
}

.hp4-auth-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hp4-auth-choice-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--hp3-border-bright, rgba(255, 255, 255, 0.18));
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.hp4-auth-choice-card:hover,
.hp4-auth-choice-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--hp3-gold, #d4af37);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45),
              0 0 24px rgba(212, 175, 55, 0.18);
  outline: none;
}

.hp4-auth-choice-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(0, 212, 255, 0.15) 100%);
  border: 1px solid var(--hp3-border-bright, rgba(255, 255, 255, 0.18));
  color: var(--hp3-gold, #d4af37);
  font-size: 1.15rem;
}

.hp4-auth-choice-card h3 {
  margin: 4px 0 0;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--hp3-text, #e8eaed);
}

.hp4-auth-choice-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--hp3-text-dim, #9aa0b4);
}

/* Body lock quando modale aperta */
.hp4-auth-body-lock {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   4. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 540px) {
  .hp4-auth-modal { padding: 22px 18px 24px; border-radius: 14px; }
  .hp4-auth-modal-title { font-size: 1.2rem; }
  .hp4-auth-modal-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .hp4-auth-modal-overlay,
  .hp4-auth-modal,
  .hp4-auth-modal-close,
  .hp4-auth-choice-card,
  .hp4-auth-entry-button {
    transition: none !important;
    animation: none !important;
  }
}
