.hippd {
  --hippd-gap: 0.75rem;
  font-size: 0.95rem;
}

.hippd .hippd-list {
  display: grid;
  gap: var(--hippd-gap);
}

.hippd .hippd-person {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--hippd-accent, #ddd);
  border-radius: 0.5rem;
  background: #fff;
}

.hippd .hippd-name {
  font-weight: 600;
}

.hippd .hippd-meta {
  font-size: 0.9em;
  opacity: 0.85;
}

.hippd .hippd-group-badge {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border-radius: 0.4rem;
  font-size: 0.8em;
  background: var(--hippd-accent, #eee);
  color: #000;
  align-self: start;
}

.hippd .hippd-contacts {
  font-size: 0.9em;
  opacity: 0.9;
}

.hippd .hippd-room {
  font-variant-numeric: tabular-nums;
}

/* Grouped mode */

.hippd.hippd-grouped .hippd-group {
  margin: 1.25rem 0;
}

.hippd .hippd-group-title {
  font-weight: 700;
  margin: 0.5rem 0 0.35rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid var(--hippd-accent, #333);
}

.hippd .hippd-subgroup {
  margin: 0.75rem 0 1rem;
}

.hippd .hippd-subgroup-title {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

/* Utility classes */

.hippd-adjunct .hippd-name::after {
  content: " (adjunct)";
  font-weight: 400;
  font-size: 0.85em;
}

@media (max-width: 600px) {
  .hippd .hippd-person {
    grid-template-columns: 1fr;
  }

  .hippd .hippd-group-badge {
    justify-self: flex-start;
  }
}

.hippd-header-row {
  text-align: left;
}

/* Make the team cell the positioning context for tooltips */
.hippd-td-team {
  position: relative; 
  white-space: nowrap;
}

/* Base tooltip style */
.hippd-tooltip {
  display: none;
  position: absolute;
  left: 0;
  padding: 4px 8px;
  background: #333;
  color: #fff;
  border-radius: 4px;
  font-size: 0.8rem;
  z-index: 9999;
  white-space: nowrap;
  pointer-events: none;
}

/* Show tooltips on mouse hover */
.hippd-td-team:hover .hippd-tooltip {
  display: block;
}

/* Offset each tooltip to avoid overlap */
.hippd-tooltip-maingroup {
  top: 100%;     /* below the cell */
  transform: translateY(4px); /* small gap */
}

.hippd-tooltip-subgroup {
  top: calc(100% + 24px); /* further below main tooltip */
  transform: translateY(4px);
}

/* Optional: small arrow triangle */
.hippd-tooltip::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 8px;
  border-width: 0 6px 6px 6px;
  border-style: solid;
  border-color: transparent transparent #333 transparent;
}


.hippd-table-all {
  border-collapse: collapse; 
}

.hippd-table-all td, th {
  border-bottom: 1px solid black; 
  padding: 0px; /* Optional: adds some spacing for readability */
}

.hippd-table-all tbody tr.hippd-row:nth-child(odd)  { background: #f8f8f8; }
.hippd-table-all tbody tr.hippd-row:nth-child(even) { background: #ffffff; }
.hippd-table-all tbody tr.hippd-row:nth-child(odd):hover  { background: #e6f4fb; }
.hippd-table-all tbody tr.hippd-row:nth-child(even):hover { background: #e6f4fb; }

/* Web icon inside Web column */
.hippd-web-icon {
  font-size: 1.1rem;
  color: #33A3DC; /* HIP blue */
}

/* Optional: hover effect */
.hippd-web-link:hover .hippd-web-icon {
  color: #216B91; /* darker HIP blue */
}

.hippd-td-email {
  text-align: center;
}

.hippd-email-button {
  background: none;
  border: none;
  cursor: pointer;
  padding-left: 4px;
  padding-right:  4px;
}

.hippd-email-icon {
  font-size: 1.1rem;
  color: #33A3DC; /* HIP blue */
}

/* Hover / copied feedback */
.hippd-email-button:hover .hippd-email-icon {
  color: #216B91; /* darker HIP blue */
}

.hippd-email-button.hippd-email-copied .hippd-email-icon {
  color: #08B89D; /* HIP green when copied */
}

.hippd-group-title {
  margin-top: 1em !important;
}

.hippd-subgroup-title {
  margin-top: 0.5em !important;
}



/* Grouped view tables */
.hippd-table-grouped {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25rem;
}

/* Left accent border on first cell of each row (group color) */
.hippd-table-grouped tbody tr.hippd-row > td:first-child {
  border-left: 4px solid var(--hippd-accent);
  padding-left: 8px; /* spacing between stripe and text */
}

.hippd-table-grouped tbody tr.hippd-row > td:last-child {
  border-right: 1px solid black;
  padding-right: 2px; /* spacing between stripe and text */
}

.hippd-table-grouped {
  border-collapse: collapse; 
}

.hippd-table-grouped td, th {
  border-bottom: 1px solid black; 
  padding: 0px; /* Optional: adds some spacing for readability */
}

.hippd-table-grouped tbody tr.hippd-row:nth-child(odd)  { background: #f8f8f8; }
.hippd-table-grouped tbody tr.hippd-row:nth-child(even) { background: #ffffff; }
.hippd-table-grouped tbody tr.hippd-row:nth-child(odd):hover  { background: #e6f4fb; }
.hippd-table-grouped tbody tr.hippd-row:nth-child(even):hover { background: #e6f4fb; }

.hippd-td-email {
  text-align: left;
}

.hippd-td-multirole {
  font-style: italic;
  opacity: 0.9;
}

.hippd-count {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #555;
}

.hippd-search-form {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #f8fafc;
}

/* Wrapper for search form + toggle button */
.hippd-search-controls {
  margin-bottom: 1rem;
}

/* Toggle button styling (adjust to taste) */
.hippd-search-toggle {
  margin-bottom: 0.5rem;
  padding: 0.3rem 0.6rem;
  border-radius: 3px;
  border: 1px solid #cbd5e0;
  background: #edf2f7;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Collapsed vs expanded states */
.hippd-search-controls.hippd-search-collapsed .hippd-search-form {
  display: none;
}

.hippd-search-controls.hippd-search-expanded .hippd-search-form {
  display: block;
}

.hippd-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-bottom: 0.5rem;
}

.hippd-search-field {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
}

.hippd-search-field span {
  margin-bottom: 0.15rem;
  font-weight: 600;
}

.hippd-search-field input,
.hippd-search-field select {
  padding: 0.25rem 0.4rem;
  font-size: 0.9rem;
}

.hippd-search-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.hippd-search-submit {
  padding: 0.3rem 0.75rem;
  border: 0;
  border-radius: 3px;
  background: #33A3DC;
  color: #fff;
  cursor: pointer;
}

.hippd-search-reset {
  font-size: 0.85rem;
}

/* Ensure selects have enough room */
.hippd-search-field select {
  min-width: 140px;        /* adjust to taste */
  padding-right: 1.8rem;   /* space for dropdown arrow */
}

/* Optional: name / position fields wider */
.hippd-search-field input[type="text"] {
  min-width: 180px;
}

.hippd-search-field {
  min-width: 160px;
}
