/* Regular post toolbar: emoji counts, lightweight sharing, and accessible mobile controls. */
.npi {
  width: 100%;
  min-width: 0;
  margin-top: 18px;
  font-family: Arial, sans-serif;
  color: #162a3e;
  box-sizing: border-box;
}
.p-card-footer:has(> .npi) {
  display: block;
  padding-top: 0;
  border-top: 0;
}
.p-card-footer > .npi {
  margin-top: 0;
}
.p-card-footer:has(> .npi) > .p-next-update-link {
  margin-top: 12px;
}
.npi-reactions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 0;
  border-top: 1px solid #e5eaf0;
}
.npi button {
  font-family: Arial, sans-serif;
  cursor: pointer;
}
.npi button:disabled {
  cursor: default;
  opacity: 0.55;
}
.npi .npi-reaction {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 62px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid #cfd8e2;
  border-radius: 999px;
  background: #fff;
  color: #53657c;
  font-size: 13px;
  line-height: 1;
}
.npi .npi-reaction:hover:enabled {
  border-color: #8296ab;
  background: #f5f8fb;
}
.npi .npi-reaction.is-selected {
  border-color: #162a3e;
  background: #eef4fa;
  color: #162a3e;
  box-shadow: inset 0 0 0 1px #162a3e;
}
.npi-emoji {
  font-size: 21px;
  line-height: 1.1;
}
.npi-count {
  font-variant-numeric: tabular-nums;
  min-width: 10px;
}
.npi .npi-more {
  min-height: 44px;
  min-width: 44px;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: #162a3e;
  color: white;
  font-size: 12px;
  font-weight: 700;
}
.npi-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #e5eaf0;
  padding: 12px 0 0;
  background: #fff;
}
.npi-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.npi-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #dbe3ea;
  border-radius: 7px;
  background: #fff;
  color: #162a3e;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.npi-toolbar .npi-comments {
  border-color: transparent;
  padding-left: 0;
  color: #53657c;
}
.npi-toolbar .npi-share {
  background: #162a3e;
  color: #fff;
  border-color: #162a3e;
  padding: 10px 16px;
}
.npi svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
.npi-status,
.npi-menu-status {
  margin: 8px 0 0;
  color: #157347;
  font:
    12px/1.5 Arial,
    sans-serif;
  overflow-wrap: anywhere;
}
.npi-status:empty,
.npi-menu-status:empty {
  display: none;
}
.npi-status.is-error {
  color: #9b1c20;
}
.npi .npi-retry {
  margin: 0 0 10px;
  padding: 8px 12px;
  min-height: 40px;
  border: 1px solid #dbe3ea;
  border-radius: 6px;
  background: #fff;
  color: #162a3e;
}
.npi [hidden],
.npi-share-dialog [hidden] {
  display: none !important;
}
.npi :is(button, a):focus-visible,
.npi-share-dialog :is(button, a, input):focus-visible {
  outline: 3px solid #ab0003;
  outline-offset: 3px;
}
.npi-share-dialog {
  position: fixed;
  inset: auto;
  margin: 0;
  box-sizing: border-box;
  width: 270px;
  max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 0;
  border: 1px solid #dbe3ea;
  border-radius: 10px;
  background: #fff;
  color: #162a3e;
  box-shadow: 0 8px 30px #071d4926;
  font-family: Arial, sans-serif;
  z-index: 10020;
}
.npi-share-dialog header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  justify-content: space-between;
  padding: 15px;
  border-bottom: 1px solid #edf0f4;
}
.npi-share-dialog h2 {
  margin: 0;
  font:
    700 14px/1.4 Arial,
    sans-serif;
  color: #162a3e;
}
.npi-share-dialog header p {
  display: none;
}
.npi-share-dialog .npi-close {
  display: grid;
  place-items: center;
  width: 30px;
  min-height: 30px;
  margin: -5px -5px -5px 0;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #65758a;
  font:
    22px/1 Arial,
    sans-serif;
  cursor: pointer;
}
.npi-share-dialog nav {
  padding: 5px;
}
.npi-share-dialog nav a,
.npi-share-dialog nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 0;
  border-radius: 5px;
  background: white;
  color: #162a3e;
  font:
    400 13px/1.4 Arial,
    sans-serif;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.npi-share-dialog nav :is(a, button):hover {
  background: #f3f6fa;
}
.npi-share-dialog svg {
  height: 19px;
  width: 19px;
  flex-shrink: 0;
}
.npi-share-dialog [data-method="facebook"] svg {
  color: #1877f2;
}
.npi-menu-status {
  padding: 0 16px 12px;
  margin: 0;
}
.npi-copy-fallback {
  box-sizing: border-box;
  width: calc(100% - 32px);
  margin: 0 16px 10px;
  border: 1px solid #dbe3ea;
  border-radius: 5px;
  padding: 10px;
  font:
    12px Arial,
    sans-serif;
}
@media (max-width: 600px) {
  .npi-toolbar .npi-copy {
    display: none;
  }
  .npi-reactions {
    gap: 6px;
  }
  .npi .npi-reaction {
    min-width: 60px;
  }
  .npi-share-dialog {
    width: calc(100vw - 16px);
    border-radius: 16px;
    padding-bottom: 8px;
    box-shadow: 0 8px 40px #071d4933;
  }
  .npi-share-dialog::backdrop {
    background: #0b1c3273;
  }
  .npi-share-dialog header {
    padding: 18px 16px 12px;
  }
  .npi-share-dialog h2 {
    font-size: 16px;
  }
  .npi-share-dialog header p {
    display: block;
    margin: 6px 0 0;
    color: #65758a;
    font:
      12px/1.5 Arial,
      sans-serif;
    overflow-wrap: anywhere;
    max-height: 54px;
    overflow: auto;
  }
  .npi-share-dialog nav {
    padding: 4px 8px;
  }
  .npi-share-dialog nav :is(a, button) {
    min-height: 46px;
  }
}

.npi-share-dialog:focus {
  outline: none;
}

/* Reuse the post toolbar immediately below its byline. */
.p-post-top-actions.npi-toolbar { border-top: 0; padding: 0; margin: 14px 0 18px; justify-content: flex-start; }
.p-post-top-actions .npi-tools { flex-wrap: wrap; }
.p-post-top-actions svg { width: 19px; height: 19px; flex-shrink: 0; }
.p-post-top-actions.npi-toolbar .npi-copy:not([hidden]) { display: inline-flex; }
