/* Editorial contact stays separate from the existing navigation and language menu. */
:root {
  --editorial-contact-height: 72px;
}

html {
  scroll-padding-top: var(--editorial-contact-height, 72px);
}

html body {
  padding-top: var(--editorial-contact-height, 72px);
}

/* The existing mobile header uses z-index: 100; keep it beneath the fixed strip. */
body > header.nav {
  position: relative;
  z-index: 80;
}

.editorial-contact {
  position: fixed;
  z-index: 90;
  inset: 0 0 auto;
  box-sizing: border-box;
  width: 100%;
  padding: max(10px, env(safe-area-inset-top)) 0 10px;
  border-bottom: 1px solid rgba(24, 151, 209, .24);
  background: rgba(255, 255, 255, .94);
  color: #042e54;
  box-shadow: 0 4px 18px rgba(4, 46, 84, .07);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  font: 14px/1.35 'DM Sans', sans-serif;
}

.editorial-contact-inner {
  display: flex;
  justify-content: flex-end;
  width: min(1240px, calc(100% - 40px));
  margin-inline: auto;
}

.editorial-contact-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 16px;
  width: 520px;
  max-width: 100%;
  min-width: 0;
}

.editorial-contact-title {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  color: #042e54;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.editorial-contact .editorial-contact-phone {
  grid-column: 2;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-sizing: border-box;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid rgba(4, 46, 84, .14);
  border-radius: 14px;
  background: linear-gradient(115deg, #1897d1, #0d6f9f 52%, #042e54);
  color: #fff;
  box-shadow: 0 3px 10px rgba(4, 46, 84, .13);
  text-decoration: none;
  white-space: nowrap;
  font: 700 17px/1.2 'DM Sans', sans-serif;
  letter-spacing: -.015em;
  touch-action: manipulation;
  transition: box-shadow 160ms ease, background-color 160ms ease;
}

.editorial-contact-phone svg {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.editorial-contact-number {
  font-variant-numeric: tabular-nums;
}

.editorial-contact .editorial-contact-phone:hover {
  box-shadow: 0 4px 15px rgba(4, 46, 84, .24);
}

.editorial-contact .editorial-contact-phone:focus-visible {
  outline: 3px solid #042e54;
  outline-offset: 3px;
}

/* Keep the reserved height while a presentation is open, so returning does not jump. */
body.presentation-open .editorial-contact,
body:has(dialog[open]) .editorial-contact,
html.editorial-contact-fullscreen .editorial-contact {
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 560px) {
  :root {
    --editorial-contact-height: 84px;
  }

  .editorial-contact {
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: 8px;
  }

  .editorial-contact-inner {
    width: calc(100% - 24px);
  }

  .editorial-contact-content {
    width: 100%;
    gap: 4px 9px;
  }

  .editorial-contact-title {
    grid-column: 1 / -1;
    grid-row: 1;
    font-size: 13.5px;
    line-height: 1.3;
  }

  .editorial-contact .editorial-contact-phone {
    grid-column: 2;
    grid-row: 2;
    gap: 7px;
    min-height: 44px;
    padding: 9px 10px;
    border-radius: 12px;
    font-size: 16px;
    letter-spacing: -.02em;
  }

  .editorial-contact-phone svg {
    flex-basis: 16px;
    width: 16px;
    height: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .editorial-contact .editorial-contact-phone {
    transition: none;
  }
}

@media print {
  .editorial-contact {
    display: none !important;
  }

  html body {
    padding-top: 0 !important;
  }
}
