/* ==========================================================================
   FMD — Contactos de Emergencia (modal #modal-contactos)
   Single source of truth for the emergency contacts table, shared by every
   tenant template. Tenants keep only their colours, radii and background.

   Layout: a flex column of contacts with gap between them; inside each contact
   the name block and the phone block are joined by a 1px divider. So a contact
   reads as name | divider | phone, and the next contact starts after the gap.
   ========================================================================== */

.tabla-emergencia {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  margin: 0;
  font-size: 1rem; /* same size as the ficha labels */
  line-height: 1.35;
}

.tabla-emergencia tbody {
  display: contents;
}

.tabla-emergencia tr {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin: 0;
  background-color: var(--fmd-contacts-bg, #f7f7f7);
}

.tabla-emergencia tr td {
  display: block;
  width: 100%;
  padding: 15px 10px;
  border: 0;
  font-size: inherit;
  text-align: center;
}

/* divider between the name block and the phone block of the same contact */
.tabla-emergencia tr td + td {
  border-top: 1px solid #e2e2e2;
}

.tabla-emergencia .contactos-nombre {
  text-align: center !important;
  font-size: inherit;
  line-height: 1.25;
}

.tabla-emergencia .contactos-nombre b {
  display: block;
  font-size: inherit;
  font-weight: 700;
}

.tabla-emergencia .contactos-nombre span {
  display: block;
  font-size: inherit;
  font-weight: normal;
}

.tabla-emergencia .div-llamar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1.4rem; /* the phone number stays the focal value */
}

.tabla-emergencia .div-llamar h4 {
  margin: 0;
  font-size: inherit;
  font-weight: normal;
}

.tabla-emergencia .btn-llamar {
  flex: 0 0 auto;
  box-sizing: border-box;
  padding: 0.5rem;
  margin: 0;
}

.tabla-emergencia .btn-llamar i {
  font-size: 1.1rem;
  line-height: 1;
}

#modal-contactos .scaem-rating-holder.datos-bancarios {
  /* the grey lives on each contact group, not on the wrapper, so the gap
     between groups shows the modal background instead of more grey */
  background: transparent;
  margin: 0;
  padding: 0;
}

#modal-contactos .scaem-startinfo {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

#modal-contactos .scaem-startinfo p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

@media (max-width: 575px) {
  .tabla-emergencia {
    font-size: 0.8125rem; /* same size as the mobile .title-tarjeta */
  }
}
