/*
 * PULSELINE balanced conversation header.
 *
 * Left: avatar and encryption status
 * Centre: contact identity
 * Right: conversation controls
 */

@media (min-width: 1200px) {
  .pulseline-conversation-header {
    position: relative !important;

    min-height: 92px !important;
    padding: 12px 18px !important;

    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;

    gap: 18px !important;

    background:
      linear-gradient(
        110deg,
        color-mix(in oklab, var(--color-primary) 6%, transparent),
        color-mix(in oklab, var(--color-brand-2) 6%, transparent)
      ) !important;
  }

  /*
   * Keep the avatar on the left.
   */
  .pulseline-conversation-header > div:first-child {
    display: flex !important;
    align-items: center !important;

    min-width: 54px !important;
    flex-shrink: 0 !important;
  }

  .pulseline-conversation-header .h-12.w-12 {
    width: 50px !important;
    height: 50px !important;
  }

  /*
   * Centre the contact name and username independently
   * from the avatar and control buttons.
   */
  .pulseline-conversation-header
    > div:first-child
    > div:last-child {
    position: absolute !important;

    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;

    width: min(360px, 42%) !important;

    text-align: center !important;
    pointer-events: none !important;
  }

  .pulseline-conversation-header
    > div:first-child
    > div:last-child
    > p:first-child {
    font-size: 16px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
  }

  .pulseline-conversation-header
    > div:first-child
    > div:last-child
    > p:nth-child(2) {
    margin-top: 3px !important;

    font-size: 12px !important;
    line-height: 1.2 !important;
  }

  /*
   * Keep the existing encryption indicator on the left,
   * underneath the contact avatar.
   */
  .pulseline-conversation-pane
    > div.mb-2.text-emerald-400 {
    position: absolute !important;

    top: 65px !important;
    left: 18px !important;
    z-index: 10 !important;

    display: flex !important;
    align-items: center !important;

    width: max-content !important;
    margin: 0 !important;
    padding: 3px 7px !important;

    border: 1px solid
      color-mix(in oklab, currentColor 24%, transparent) !important;
    border-radius: 999px !important;

    background:
      color-mix(
        in oklab,
        var(--color-background) 86%,
        transparent
      ) !important;

    font-size: 10px !important;
    line-height: 1rem !important;
    white-space: nowrap !important;

    pointer-events: none !important;
  }

  /*
   * Keep all conversation controls neatly aligned right.
   */
  .pulseline-conversation-header > div:last-child {
    display: flex !important;
    align-items: center !important;

    margin-left: auto !important;
    flex-shrink: 0 !important;
    gap: 3px !important;
  }
}
