/* so_header_html — the header leaf's own rules, kept here because the server
 * strips a template's <style> block.
 *
 * The form root is the .so-header div itself, so that rule stays a bare
 * class, in the media block too, where the root is the subject. Every other
 * rule is scoped :where(.so-header), which adds no specificity and so cannot
 * change which rule wins. This is a child form mounted into the specials
 * ordering shell, never a screen, so the root rule takes no position, flex or
 * min-height and carries exactly what it carried before.
 *
 * No second-class fix is needed in this file: .so-tab-group
 * .px-btn is (0,2,0) and the dependency's .px-btn, injected into <head> at
 * runtime after this link, is (0,1,0), so these rules win on specificity
 * wherever the link lands. .px-page-title and .px-subtitle are theme classes
 * this form does not restyle.
 *
 * No designer gate: nothing in this form is hidden until JavaScript runs.
 */

.so-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

:where(.so-header) .so-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

:where(.so-header) .so-header-controls {
  display: flex;
  align-items: center;
  gap: 0;
}

:where(.so-header) .so-tab-group {
  display: flex;
  gap: 0;
}

:where(.so-header) .so-tab-group .px-btn {
  border-radius: 0;
  border-right-width: 0;
}

:where(.so-header) .so-tab-group .px-btn:first-child {
  border-radius: 6px 0 0 6px;
}

:where(.so-header) .so-tab-group .px-btn:last-child {
  border-radius: 0 6px 6px 0;
  border-right-width: 1px;
}

@media (max-width: 700px) {
  .so-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  :where(.so-header) .so-tab-group {
    flex-direction: column;
  }

  :where(.so-header) .so-tab-group .px-btn {
    width: 100%;
    border-radius: 0;
    border-right-width: 1px;
  }

  :where(.so-header) .so-tab-group .px-btn:not(:last-child) {
    border-bottom-width: 0;
  }

  :where(.so-header) .so-tab-group .px-btn:first-child {
    border-radius: 6px 6px 0 0;
  }

  :where(.so-header) .so-tab-group .px-btn:last-child {
    border-radius: 0 0 6px 6px;
  }
}
