/* ═══════════════════════════════════════════════════════════════════
   compartir.css — Hoja para compartir el código de acceso

   Extraído tal cual del <style> de residentes.html del sitio anterior
   (la página que envolvía al portal). La lógica está en
   js/residente/anfitrion.js.

   Colores fijos y no variables de tema, igual que el original: la hoja
   tapa todo el portal con un fondo oscuro, sea cual sea el tema.
   ═══════════════════════════════════════════════════════════════════ */

.share-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 99999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px;
}

.share-overlay.on {
  display: flex;
}

.share-overlay img {
  max-width: 90vw;
  max-height: 65vh;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.share-overlay-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.share-overlay-btns button {
  padding: 12px 22px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-share-native {
  background: #7c6fff;
  color: #fff;
}

.btn-share-native:hover {
  background: #6b5de7;
}

.btn-share-download {
  background: rgba(255, 255, 255, 0.1);
  color: #ccc;
}

.btn-share-download:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.btn-share-close {
  background: transparent;
  color: #888;
  font-size: 28px;
  line-height: 1;
  padding: 4px 12px;
}

.btn-share-close:hover {
  color: #fff;
}

/* Código en texto junto a la imagen — copiable aunque la app destino
   descarte el `text` del share (WhatsApp en Android lo hace) */
.share-code-row {
  display: none;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 16px;
}

.share-code-row.on {
  display: inline-flex;
}

.share-code {
  font-family: 'DM Mono', ui-monospace, SFMono-Regular, monospace;
  font-size: 19px;
  letter-spacing: 0.18em;
  color: #fff;
  user-select: all;
}

.btn-share-copy {
  background: rgba(255, 255, 255, 0.1);
  color: #ccc;
  border: none;
  border-radius: 9px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: 0.2s;
}

.btn-share-copy:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
