@layer components {
  /* Detail page title bar — sticky save/close actions with unsaved-changes indicator. */
  .app-details-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: calc(var(--app-spacing) * 2);
  }

  .app-details-titlebar h1,
  .app-details-titlebar h2,
  .app-details-titlebar h3,
  .app-details-titlebar h4,
  .app-details-titlebar h5,
  .app-details-titlebar h6 {
    margin: 0;
  }

  .app-details-titlebar button,
  .app-details-titlebar [role="button"] {
    --app-button-padding-horizontal: 10px;
    --app-button-padding-vertical: 6px;
    font-size: var(--text-sm);
    margin: 0;
  }

  .app-details-titlebar button i,
  .app-details-titlebar [role="button"] i {
    font-size: 10px; /* icon-font metric — intentional px */
  }

  .app-details-titlebar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
  }

  .app-details-titlebar .app-detail-unsaved-indicator {
    margin: 0;
    white-space: nowrap;
  }

  .app-details-titlebar h1:has(.app-icon-button) {
    display: flex;
    align-items: center;
    gap: 7px;
    line-height: var(--leading-none);
  }
  .app-details-titlebar details.dropdown {
    margin-bottom: 0;
  }

  .app-details-titlebar details.dropdown summary:after {
    display: none;
  }

  .app-details-titlebar details.dropdown li {
    padding: 0;
    margin: 0;
  }

  .app-details-titlebar details.dropdown li button,
  .app-details-titlebar details.dropdown li [role="button"] {
    margin: 0;
    border: none;
    border-radius: 3px;
    width: 100%;
    text-align: left;
    padding: 0.375rem 0.5rem;
  }

  .app-details-titlebar details.dropdown li button:hover,
  .app-details-titlebar details.dropdown li button:focus-visible,
  .app-details-titlebar details.dropdown li [role="button"]:hover,
  .app-details-titlebar details.dropdown li [role="button"]:focus-visible {
    background: color-mix(in srgb, var(--app-contrast) 8%, transparent);
  }
}
