.orgchart-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 12px 24px;
  box-sizing: border-box;
}

.orgchart-title {
  margin: 8px 0 16px;
  font-size: 28px;
  line-height: 1.2;
  text-align: center;
}

.orgchart-subtitle {
  margin: 6px 0 14px;
  font-size: 20px;
  line-height: 1.25;
}

/* Top: 6 leaders in a single row (wrap on small screens) */
.org-top-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 12px;
}
@media (max-width: 1200px) {
  .org-top-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .org-top-grid { grid-template-columns: repeat(1, minmax(0,1fr)); }
}

.org-top-item { display: flex; flex-direction: column; gap: 8px; }

/* Person card */
.org-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 8px;
  background: #fff;
  transition: transform .08s ease, box-shadow .08s ease, border-color .08s ease;
}
.org-card:hover {
  transform: translateY(-1px);
  border-color: #dcdcdc;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.org-card--top {
  border-width: 2px;
  border-color: #e1eefb;
  background: #f8fbff;
}



.org-card--ansat {
  border-width: 2px;
  border-color: #d7f0df;
  background: #f7fcf8;
}

/* Hover label "Ansat (80%)" */
.org-ansat-hover {
  display: none;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0,0,0,.06);
  color: rgba(0,0,0,.75);
  vertical-align: middle;
}

.org-card--ansat:hover .org-ansat-hover {
  display: inline-block;
}

@media (hover: none) {
  .org-card--ansat:hover .org-ansat-hover { display: none; }
}

.org-avatar { width:56px; height:56px; }
.org-photo {
  width:56px; height:56px;
  object-fit: cover; border-radius: 50%;
  display:block;
}
.org-photo--placeholder {
  width:56px; height:56px; border-radius:50%;
  background: #ececec;
}

.org-meta { min-width: 0; }
.org-name {
  font-weight: 600;
  font-size: 15px;
  color: #111;
  margin-bottom: 2px;
}
.org-mins {
  font-size: 12px;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Children lists with details/summary */
.org-children { list-style: none; margin: 6px 0 0 12px; padding: 0; }
.org-node { margin: 4px 0; }

details > summary {
  list-style: none;
  cursor: pointer;
}
details > summary::-webkit-details-marker { display: none; }

.org-toggle-icon::before {
  content: '+';
  display: inline-block;
  margin-left: 6px;
  font-weight: 700;
}
details[open] .org-toggle-icon::before {
  content: '–';
}

/* "Øvrige" grid */
.org-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 12px;
}
@media (max-width: 1200px) {
  .org-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .org-grid { grid-template-columns: repeat(1, minmax(0,1fr)); }
}

.org-grid-item { display: block; }
.pco-org-msg { padding: 8px 10px; border:1px solid #eee; background:#fafafa; border-radius:8px; }

/* Team cards for [orgchart_teams] */
.org-team-card{
  position: relative;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.org-team-card--ansat{
  border-color: #cfe6d8;
  background: #f5fbf7;
}

.org-team-title{
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  color: #111;
}

.org-team-leaders{
  display: none;
  position: absolute;
  left: 10px;
  right: 10px;
  top: calc(100% + 6px);
  z-index: 50;
  padding: 8px 10px;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.10);
  font-size: 13px;
  line-height: 1.35;
}

.org-team-leader-link{
  text-decoration: none;
}

.org-team-leader-link:hover{
  text-decoration: underline;
}

.org-team-card:hover .org-team-leaders{
  display: block;
}

/* No hover popups on touch devices */
@media (hover: none){
  .org-team-card:hover .org-team-leaders{ display: none; }
}
