/* Keep the opening hours in the header, directly above the consultation
   actions. The compact label prevents the long schedule from competing with
   the logos on narrow screens. */
#sp-header #sp-contact .afem-header-actions {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: center !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
  height: auto !important;
  margin-top: 0 !important;
}

#sp-header #sp-contact .afem-header-hours {
  display: block;
  width: 100%;
  color: #536273;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
}

#sp-header #sp-contact .afem-header-hours-compact {
  display: none;
}

#sp-header #sp-contact .afem-header-action-buttons {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
}

@media only screen and (max-width: 991px) {
  #sp-header #sp-contact .afem-header-actions {
    width: 100% !important;
    min-width: 0;
  }

  #sp-header #sp-contact .afem-header-hours {
    width: auto;
    max-width: 100%;
    font-size: 8px;
    line-height: 1.2;
    white-space: normal;
  }

  #sp-header #sp-contact .afem-header-hours-wide {
    display: none;
  }

  #sp-header #sp-contact .afem-header-hours-compact {
    display: inline;
  }

  #sp-header #sp-contact .afem-header-action-buttons {
    width: auto;
    gap: 4px;
  }
}

/* The 640–991px layout positions the action block absolutely. Keep its
   intrinsic width there so the schedule cannot push the logos off-screen. */
@media only screen and (min-width: 640px) and (max-width: 991px) {
  #sp-header #sp-contact .afem-header-actions {
    width: auto !important;
  }

  #sp-header #sp-contact .afem-header-hours {
    max-width: 250px;
  }
}

@media only screen and (max-width: 360px) {
  #sp-header #sp-contact .afem-header-hours {
    max-width: 150px;
    font-size: 7px;
  }
}
