/* NO TRESPASS LIST alert dialog (redesign 2026-11-06).
   JS markup: window.createTrespassListHTML() in public/js/scripts/pages/scripts.js.
   Opened by the 9 "ON_TRESPASS_LIST" Swal.fire() call sites, each with customClass.popup 'tp-alert-popup'.
   Every rule is scoped to .tp-alert-popup / .tpa — nothing here touches other SweetAlert dialogs.
   Swal's own confirm (ADMIT ANYWAY) / deny (DENY) buttons are kept, so the call-site logic is unchanged.
   FontAwesome all.js swaps each <i> for an <svg> at runtime, so icon rules list both. */

/* ── SweetAlert2 10 shell ── */
.swal2-popup.tp-alert-popup {
  width: 500px;
  max-width: calc(100vw - 32px);
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  text-align: left;
}
/* Big animated X + Swal title are replaced by .tpa-head (same title text). */
.swal2-popup.tp-alert-popup .swal2-header {
  display: none !important;
}
.swal2-popup.tp-alert-popup .swal2-content {
  padding: 0;
  font-size: 1rem;
  text-align: left;
}
.swal2-popup.tp-alert-popup .swal2-html-container {
  margin: 0;
  overflow: visible;
}

.tpa {
  color: #1f2937;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 140px);
}

/* ── Header band ── */
.tpa-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px 18px;
  background: #fff1f1;
  border-bottom: 1px solid #fbd5d5;
  border-top: 4px solid #e5484d;
}
.tpa-icon {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #e5484d;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  box-shadow: 0 6px 16px rgba(229, 72, 77, .28);
}
.tpa-icon svg,
.tpa-icon i {
  width: 1em;
  height: 1em;
}
.tpa-head-text {
  flex: 1 1 auto;
  min-width: 0;
}
.tpa .tpa-title {
  margin: 0 0 4px;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: #b42318;
}
.tpa-sub {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #6b4b4b;
}

/* ── Record cards ── */
.tpa-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 22px;
  background: #f7f8fb;
  overflow-y: auto;
  min-height: 0;
}
.tpa-card {
  background: #fff;
  border: 1px solid #e3e6ee;
  border-radius: 12px;
  padding: 16px;
}
.tpa-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tpa-photo {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
}
.tpa-photo a,
.tpa-photo img {
  display: block;
  width: 72px;
  height: 72px;
}
.tpa-photo img {
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #e5484d;
}
.tpa-ident {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.tpa-name {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  color: #202B56;
  overflow-wrap: anywhere;
}
.tpa-contact {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.92rem;
  color: #5b6475;
  overflow-wrap: anywhere;
  min-width: 0;
}
.tpa-contact svg,
.tpa-contact i {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  color: #8a93a5;
}
.tpa-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fde8e8;
  color: #b42318;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tpa-flag svg,
.tpa-flag i {
  width: 11px;
  height: 11px;
}

/* ── Detail grid (Ethnicity / Gender / DOB / SSN) ── */
.tpa .tpa-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
}
.tpa-fact {
  min-width: 0;
  padding: 8px 12px;
  background: #f4f6fa;
  border-radius: 8px;
}
.tpa .tpa-fact dt {
  margin: 0 0 2px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #8a93a5;
}
.tpa .tpa-fact dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f2937;
  overflow-wrap: anywhere;
}
.tpa .tpa-fact-empty dd {
  font-weight: 400;
  color: #a0a7b5;
}

/* ── Staff note ── */
.tpa-note {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  background: #fff8e1;
  border: 1px solid #fde7a8;
  border-left: 3px solid #f59e0b;
  border-radius: 8px;
  color: #78350f;
}
.tpa-note > svg,
.tpa-note > i {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 3px;
  color: #d97706;
}
.tpa-note-text {
  min-width: 0;
  font-size: 0.88rem;
  line-height: 1.45;
}
.tpa-note-text strong {
  display: block;
  font-size: 0.72rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.tpa-note-text p {
  margin: 2px 0 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* ── Footer buttons (Swal confirm = ADMIT ANYWAY, deny = DENY) ── */
.swal2-popup.tp-alert-popup .swal2-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 16px 22px 20px;
  border-top: 1px solid #eef0f4;
  background: #fff;
}
/* Layout only — colours, fill, radius and font stay the app's standard Swal buttons
   (bg-success ADMIT ANYWAY / bg-danger DENY, as passed by the call sites). */
.swal2-popup.tp-alert-popup .swal2-actions {
  justify-content: center;
}
.swal2-popup.tp-alert-popup .swal2-actions .swal2-styled {
  flex: 0 0 auto;
  min-width: 150px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  text-align: center;
}

/* ── Phone ── */
@media (max-width: 480px) {
  .tpa-head,
  .tpa-list {
    padding-left: 16px;
    padding-right: 16px;
  }
  .swal2-popup.tp-alert-popup .swal2-actions {
    padding: 14px 16px 16px;
  }
  .swal2-popup.tp-alert-popup .swal2-actions .swal2-styled {
    flex: 1 1 0;
    min-width: 0;
    max-width: 170px;
  }
}
