/* Open button — must beat .hp-share-section circle rules */
.lp-rel-open-btn,
button.lp-rel-open-btn,
.hp-share-section .lp-rel-open-btn,
.hp-person-header-actions .lp-rel-open-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 44px !important;
  padding: 12px 20px !important;
  margin: 0 !important;
  background: #1a5f7a !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
  flex: 0 0 auto !important;
}
.lp-rel-open-btn:hover,
.hp-share-section .lp-rel-open-btn:hover {
  background: #154e63 !important;
  transform: none !important;
  color: #fff !important;
}

.lp-rel-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lp-rel-modal[hidden] {
  display: none !important;
}
.lp-rel-modal__dialog {
  position: relative;
  background: #fff;
  color: #1a1a1a;
  border-radius: 10px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  padding: 28px 24px 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.lp-rel-modal__dialog,
.lp-rel-modal__dialog p,
.lp-rel-modal__dialog h2,
.lp-rel-modal__dialog li,
.lp-rel-modal__dialog label,
.lp-rel-modal__dialog span {
  color: #1a1a1a;
}
.lp-rel-modal__close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #666;
}
.lp-rel-modal__title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  color: #111 !important;
}
.lp-rel-modal__hint {
  margin: 0 0 14px;
  color: #444 !important;
  font-size: 14px;
}
.lp-rel-modal__search {
  position: relative;
  margin-bottom: 8px;
}
.lp-rel-modal__input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 15px;
  background: #fff !important;
  color: #111 !important;
  -webkit-text-fill-color: #111;
}
.lp-rel-modal__input::placeholder {
  color: #777 !important;
  opacity: 1;
}
.lp-rel-modal__clear {
  margin-top: 6px;
  background: none;
  border: none;
  color: #1a5f7a !important;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}
.lp-rel-modal__results {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  border: 1px solid #e2e2e2;
  border-radius: 6px;
  max-height: 220px;
  overflow: auto;
  background: #fff;
}
.lp-rel-modal__results[hidden] {
  display: none !important;
}
.lp-rel-modal__results li button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid #f0f0f0;
  background: #fff !important;
  color: #111 !important;
  cursor: pointer;
  font-size: 14px;
}
.lp-rel-modal__results li:last-child button {
  border-bottom: none;
}
.lp-rel-modal__results li button:hover,
.lp-rel-modal__results li button:focus {
  background: #f3f8fa !important;
  color: #111 !important;
}
.lp-rel-modal__selected {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #f3f8fa;
  border-radius: 6px;
  font-size: 14px;
  color: #111 !important;
}
.lp-rel-modal__selected[hidden] {
  display: none !important;
}
.lp-rel-modal__find {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: #1a5f7a !important;
  color: #fff !important;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}
.lp-rel-modal__find:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: #fff !important;
}
.lp-rel-modal__status {
  margin-top: 12px;
  font-size: 14px;
  color: #333 !important;
  min-height: 1.2em;
}
.lp-rel-modal__path {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #eee;
  color: #111 !important;
}
.lp-rel-modal__path[hidden] {
  display: none !important;
}
.lp-rel-modal__summary {
  font-weight: 600;
  margin: 0 0 12px;
  color: #111 !important;
}
.lp-rel-path-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lp-rel-path-list li {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 1.4;
  color: #111 !important;
}
.lp-rel-path-list .lp-rel-hop {
  color: #555 !important;
  font-size: 13px;
  margin: 2px 0 0 12px;
}
.lp-rel-path-list a {
  color: #1a5f7a !important;
  text-decoration: none;
  font-weight: 600;
}
.lp-rel-path-list a:hover {
  text-decoration: underline;
}
@media (max-width: 768px) {
  .lp-rel-open-btn,
  button.lp-rel-open-btn,
  .hp-share-section .lp-rel-open-btn {
    width: 100% !important;
    white-space: normal !important;
  }

  .lp-rel-modal {
    padding: 12px;
    align-items: flex-start;
  }

  .lp-rel-modal__dialog {
    padding: 22px 16px 16px;
    max-height: calc(100vh - 24px);
  }
}
