/* Keep the Helix off-canvas menu accessible on tablets, including iPad PWAs. */
@media (min-width: 768px) and (max-width: 1199.98px) {
  #sp-header .container-inner > .row {
    position: relative !important;
  }

  #sp-header #sp-menu {
    display: block !important;
    flex: 1 1 auto !important;
    min-width: 60px !important;
    position: static !important;
  }

  #sp-header #offcanvas-toggler {
    position: absolute !important;
    z-index: 1000 !important;
    top: 0 !important;
    right: 15px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 60px !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  #sp-header #offcanvas-toggler .burger-icon {
    display: inline-block !important;
    width: 28px !important;
  }

  #sp-header #offcanvas-toggler .burger-icon > span {
    display: block !important;
    height: 3px !important;
    margin: 5px 0 !important;
    background-color: #ffffff !important;
    opacity: 1 !important;
  }

  /* Fourth book in Michel Georges' bibliography: keep the complete cover
     and a true two-column layout on tablets. */
  img[src*="archeologiemigrations"] {
    display: block !important;
    width: 210px !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: top center !important;
  }

  a:has(> img[src*="archeologiemigrations"]) {
    display: block !important;
    width: 210px !important;
    max-width: 100% !important;
    height: auto !important;
    align-self: start !important;
  }

  :is(div, section):has(> a > img[src*="archeologiemigrations"]),
  :is(div, section):has(> div > a > img[src*="archeologiemigrations"]) {
    display: grid !important;
    grid-template-columns: minmax(170px, 210px) minmax(0, 1fr) !important;
    grid-auto-flow: row !important;
    align-items: start !important;
    column-gap: 28px !important;
    row-gap: 12px !important;
  }
}

@media (max-width: 767.98px) {
  img[src*="archeologiemigrations"] {
    display: block !important;
    width: min(210px, 100%) !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
  }
}

/* Simplified front-end profile. */
#sp-header.cureghem-profile-hidden,
#sp-menu.cureghem-profile-hidden,
.sp-megamenu-parent.cureghem-profile-hidden,
#offcanvas-toggler.cureghem-profile-hidden {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.cureghem-profile-hidden,
.cureghem-profile-empty-fieldset {
  display: none !important;
}

.cureghem-profile-intro {
  margin-bottom: 1.5rem;
  padding: 1rem 1.15rem;
  border-left: 5px solid #154875;
  border-radius: 4px;
  background: #eef5fb;
  color: #17324d;
}

.cureghem-profile-intro h2 {
  margin: 0 0 .5rem;
  font-size: 1.35rem;
}

.cureghem-password-field.cureghem-password-closed {
  display: none !important;
}

.cureghem-profile-access-section.cureghem-access-closed {
  display: none !important;
}

.cureghem-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #d9e1e8;
}

.cureghem-profile-save {
  min-width: 230px;
}

.cureghem-profile-security-button {
  min-height: 42px;
}

.cureghem-profile-summary {
  max-width: 900px;
  margin: 0 auto;
}

.cureghem-profile-summary > h2 {
  margin-bottom: .35rem;
  color: #173f68;
}

.cureghem-profile-summary-list {
  margin: 1.25rem 0;
  overflow: hidden;
  border: 1px solid #d9e1e8;
  border-radius: 6px;
  background: #fff;
}

.cureghem-profile-summary-row {
  display: grid;
  grid-template-columns: minmax(180px, 32%) minmax(0, 1fr);
  gap: 1rem;
  padding: .7rem 1rem;
  border-bottom: 1px solid #e5e9ed;
}

.cureghem-profile-summary-row:last-child {
  border-bottom: 0;
}

.cureghem-profile-summary-row dt,
.cureghem-profile-summary-row dd {
  margin: 0;
}

.cureghem-profile-summary-row dt {
  font-weight: 700;
  color: #173f68;
}

.cureghem-profile-edit-button {
  min-width: 190px;
}

@media (max-width: 767.98px) {
  .cureghem-profile-actions .btn {
    width: 100%;
  }

  .cureghem-profile-summary-row {
    grid-template-columns: 1fr;
    gap: .15rem;
  }

  .cureghem-profile-edit-button {
    width: 100%;
  }
}
