/* Directory contact icons: restore inline rows from old FrontPage tables.
   Applies only to two-cell location/phone/registration rows, not advertisements. */
.directory-content .legacy-content .legacy-table > .legacy-row:has(> .legacy-cell:nth-child(2)):has(> .legacy-cell:first-child img[src*="/images/botones/direccion-consultorio"]),
.directory-content .legacy-content .legacy-table > .legacy-row:has(> .legacy-cell:nth-child(2)):has(> .legacy-cell:first-child img[src*="/images/botones/telefono"]),
.directory-content .legacy-content .legacy-table > .legacy-row:has(> .legacy-cell:nth-child(2)):has(> .legacy-cell:first-child img[src*="/images/botones/senescyt"]) {
 display: grid !important;
 grid-template-columns: 28px minmax(0, 1fr) !important;
 column-gap: 8px !important;
 row-gap: 0 !important;
 align-items: start !important;
 margin: 3px 0 !important;
 padding: 0 !important;
}
.directory-content .legacy-content .legacy-table > .legacy-row:has(> .legacy-cell:nth-child(2)):has(> .legacy-cell:first-child img[src*="/images/botones/direccion-consultorio"]) > .legacy-cell,
.directory-content .legacy-content .legacy-table > .legacy-row:has(> .legacy-cell:nth-child(2)):has(> .legacy-cell:first-child img[src*="/images/botones/telefono"]) > .legacy-cell,
.directory-content .legacy-content .legacy-table > .legacy-row:has(> .legacy-cell:nth-child(2)):has(> .legacy-cell:first-child img[src*="/images/botones/senescyt"]) > .legacy-cell {
 padding: 0 !important; min-width: 0 !important; margin: 0 !important;
 line-height: 1.35 !important; text-align: left !important;
}
.directory-content .legacy-content .legacy-table > .legacy-row:has(> .legacy-cell:nth-child(2)):has(> .legacy-cell:first-child img[src*="/images/botones/"]) > .legacy-cell:first-child img,
.directory-content .legacy-content .legacy-table > .legacy-row:has(> .legacy-cell:nth-child(2)):has(> .legacy-cell:first-child img[src*="/images/botones/"]) > .legacy-cell:first-child b img,
.directory-content .legacy-content .legacy-table > .legacy-row:has(> .legacy-cell:nth-child(2)):has(> .legacy-cell:first-child img[src*="/images/botones/"]) > .legacy-cell:first-child p img {
 display: block !important; float: none !important;
 width: 25px !important; height: auto !important;
 max-height: 28px !important; margin: 1px 0 !important;
 padding: 0 !important;
}
.directory-content .legacy-content .legacy-table > .legacy-row:has(> .legacy-cell:nth-child(2)):has(> .legacy-cell:first-child img[src*="/images/botones/"]) > .legacy-cell p,
.directory-content .legacy-content .legacy-table > .legacy-row:has(> .legacy-cell:nth-child(2)):has(> .legacy-cell:first-child img[src*="/images/botones/"]) > .legacy-cell b {
 margin: 0 !important; line-height: 1.34 !important;
}
/* Make ordinary text advertisements shorter without changing photo cards or buttons. */
.directory-content .legacy-content .me-text-ad:not(.me-photo-ad) .legacy-table > .legacy-row {margin: 2px 0 !important}
.directory-content .legacy-content .me-text-ad:not(.me-photo-ad) .legacy-cell > p {margin: 2px 0 !important;line-height: 1.36 !important}
.directory-content .legacy-content .me-text-ad:not(.me-photo-ad) .legacy-cell > p > img {margin: 0 !important}
@media (max-width: 550px) {
 .directory-content .legacy-content .legacy-table > .legacy-row:has(> .legacy-cell:nth-child(2)):has(> .legacy-cell:first-child img[src*="/images/botones/"]) {
  grid-template-columns: 25px minmax(0,1fr) !important; column-gap: 7px !important;
 }
}
