/* Print the approved profile content without the website's browsing furniture.
   Named pages keep paper settings local to lawyer profiles. */
@page gya-profile {
  size: A4 portrait;
  margin: 17mm 18mm 18mm;
}

@media print {
  html:has(body.page-profile) {
    margin: 0 !important;
    background: #fff !important;
  }

  body.page-profile {
    page: gya-profile;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    color: #000 !important;
    font: 400 12.5pt/1.42 "EB Garamond", Georgia, serif;
  }

  .page-profile :is(.proof-bar, .skip, #wpadminbar, .site-footer,
    .menu-toggle, .site-header nav, .site-header .language,
    [data-reading-progress], .lawyer-profile-return, .lawyer-profile-media,
    .lawyer-profile-related, .lawyer-profile-browse, .lawyer-profile-contact,
    #enquiry, .enquiry-production, .enquiry-unavailable) {
    display: none !important;
  }

  .page-profile .site-header {
    display: block !important;
    position: static !important;
    inset: auto !important;
    width: 100%;
    min-height: 0 !important;
    margin: 0 0 7mm !important;
    padding: 0 0 4mm !important;
    border: 0 !important;
    border-bottom: .5pt solid #999 !important;
    background: #fff !important;
    box-shadow: none !important;
    break-inside: avoid;
    break-after: avoid;
  }

  .page-profile .brand {
    display: inline-block;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  .page-profile .site-header .brand img {
    display: block;
    width: 43mm;
    height: auto;
    max-height: 18mm;
    object-fit: contain;
    object-position: center;
  }

  .page-profile :is(#main, .lawyer-profile, .lawyer-profile-grid,
    .lawyer-profile-copy, .lawyer-profile-panels) {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    transform: none !important;
    break-inside: auto;
  }

  .page-profile .lawyer-profile,
  .page-profile .lawyer-profile * {
    color: #000 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  .page-profile .lawyer-profile-identity {
    margin: 0 0 7mm;
    padding: 0;
    break-inside: avoid;
    break-after: avoid;
  }

  .page-profile .lawyer-profile-identity h1 {
    max-width: none;
    margin: 0;
    font: 500 26pt/1.15 "EB Garamond", Georgia, serif !important;
    letter-spacing: normal;
    overflow-wrap: normal;
    text-wrap: wrap;
  }

  .page-profile .lawyer-profile-role {
    margin: 2mm 0 0;
    font: 400 13pt/1.35 "EB Garamond", Georgia, serif !important;
  }

  .page-profile .lawyer-profile-email {
    display: inline-block;
    direction: ltr;
    unicode-bidi: isolate;
    max-width: 100%;
    margin: 2mm 0 0;
    padding: 0;
    font: 400 11.5pt/1.35 "EB Garamond", Georgia, serif !important;
    text-decoration: none;
  }

  .page-profile .lawyer-profile-email .gya-icon { display: none; }
  .page-profile .lawyer-profile-email span { overflow-wrap: anywhere; }

  .page-profile .lawyer-profile :is(h2, h3, h4, h5, h6) {
    margin: 0 0 2.5mm !important;
    font: 600 14pt/1.25 "EB Garamond", Georgia, serif !important;
    letter-spacing: normal;
    text-wrap: wrap;
    break-after: avoid;
    break-inside: avoid;
  }

  .page-profile .lawyer-profile-prose {
    font: 400 12.5pt/1.42 "EB Garamond", Georgia, serif !important;
    overflow-wrap: normal;
    text-align: start;
  }

  .page-profile .lawyer-profile-prose :is(p, li, blockquote) {
    font: inherit;
    orphans: 3;
    widows: 3;
    break-inside: auto;
  }

  .page-profile .lawyer-profile-prose p {
    margin: 0 0 3mm;
  }

  .page-profile .lawyer-profile-prose :is(h2, h3, h4, h5, h6) {
    margin-top: 5mm !important;
  }

  .page-profile .lawyer-profile :is(.lawyer-profile-biography,
    .lawyer-profile-panel, .lawyer-profile-practices) {
    margin: 0 0 5mm;
    padding: 0;
    border: 0;
    break-inside: auto;
  }

  .page-profile .lawyer-profile :is(.lawyer-profile-panel,
    .lawyer-profile-practices) {
    margin-top: 5mm;
  }

  .page-profile .lawyer-profile :is(.lawyer-profile-panel,
    .lawyer-profile-practices) ul {
    display: block;
    margin: 0;
    padding: 0;
    padding-inline-start: 1.15em;
    list-style: disc;
    font: 400 12pt/1.4 "EB Garamond", Georgia, serif !important;
  }

  .page-profile .lawyer-profile :is(.lawyer-profile-panel,
    .lawyer-profile-practices) li {
    margin: 0 0 1.3mm;
    padding: 0;
    border: 0;
    line-height: inherit !important;
    break-inside: avoid;
    orphans: 2;
    widows: 2;
  }

  .page-profile a { color: #000; }
  .page-profile a::after { content: none !important; }

  html[dir=rtl] body.page-profile {
    direction: rtl;
    font-family: Amiri, serif;
    font-size: 13pt;
    line-height: 1.6;
  }

  html[dir=rtl] .page-profile .lawyer-profile-identity h1 {
    font: 400 25pt/1.35 Amiri, serif !important;
  }

  html[dir=rtl] .page-profile .lawyer-profile-role {
    font: 400 14pt/1.5 Amiri, serif !important;
  }

  html[dir=rtl] .page-profile .lawyer-profile :is(h2, h3, h4, h5, h6) {
    font: 400 15pt/1.5 Amiri, serif !important;
  }

  html[dir=rtl] .page-profile .lawyer-profile-prose {
    font: 400 13pt/1.6 Amiri, serif !important;
  }

  html[dir=rtl] .page-profile .lawyer-profile :is(.lawyer-profile-panel,
    .lawyer-profile-practices) ul {
    font: 400 12.5pt/1.6 Amiri, serif !important;
  }
}
