.vulcan-voting-members-wrapper {
  position: relative;
}

.vulcan-voting-members {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Mobile: collapsed by default, show ~3 rows (3 tiles at 86px each + gaps) */
@media (max-width: 767px) {
  .vulcan-voting-members {
    max-height: 280px;
    overflow: hidden;
    position: relative;
  }

  .vulcan-voting-members.expanded {
    max-height: none;
  }

  .vulcan-voting-members:not(.expanded)::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, white);
    pointer-events: none;
  }

  .vulcan-show-more-btn {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 12px 24px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
  }

  .vulcan-show-more-btn:hover {
    background: #005a87;
  }
}

/* Tablet and up: hide the button, show all tiles */
@media (min-width: 768px) {
  .vulcan-show-more-btn {
    display: none;
  }
}

.vulcan-voting-member-tile {
  display: flex;
  align-items: center;
  position: relative;
  cursor: pointer;

  height: 70px;
  padding: 8px 12px;
  gap: 12px;

  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);

  flex: 1 1 100%;
  max-width: 100%;
}

/* Tablet: 3 per row */
@media (min-width: 768px) {
  .vulcan-voting-member-tile {
    flex: 1 1 calc(33.333% - 16px);
    max-width: calc(33.333% - 16px);
  }
}

/* Desktop: 4 per row */
@media (min-width: 1024px) {
  .vulcan-voting-member-tile {
    flex: 1 1 calc(25% - 16px);
    max-width: calc(25% - 16px);
  }
}

.vulcan-voting-member-logo {
  flex: 0 0 55px;
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vulcan-voting-member-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.vulcan-voting-member-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.vulcan-voting-member-text .org-name {
  font-size: 14px;
  color: #666;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vulcan-voting-member-text .member-name {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vulcan-select-icon {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 14px;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 50%;
  background: #f2f2f2;
  color: #555;
}

.vulcan-voting-member-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.vulcan-voting-member-overlay.active {
  display: flex;
}

.overlay-backdrop {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.35);
}

.overlay-content {
  position: relative;
  max-width: 960px;
  max-height: calc(100vh - 64px);
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  overflow-y: auto;
}

.overlay-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 24px;
  height: 24px;
  font-size: 24px;
  background: #f4e2e2;
  border: none;
  cursor: pointer;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 4px;
}

.member-top-box {
  display: flex;
  align-items: center;
  padding: 16px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  gap: 30px;
  margin-bottom: 16px;
}

.member-top-portrait img {
  width: 90px;
  height: 90px;
  border-radius: 6px;
  object-fit: cover;
}

@media (min-width: 768px) {
  .member-top-portrait img {
    width: 110px;
    height: 110px;
  }
}

@media (min-width: 1024px) {
  .member-top-portrait img {
    width: 140px;
    height: 140px;
  }
}

.member-top-info .member-name {
  font-size: 35px;
  font-weight: 700;
  margin: 0 0 4px;
}

.member-top-info .member-qualifications {
  font-size: 12px;
  color: #444;
  margin-top: 6px;
  line-height: 1.4;
}

.member-top-info .member-role {
  font-size: 12px;
  color: #666;
}

.member-description {
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.6;
}

.section-divider {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 24px 0;
}

.org-box {
  display: flex;
  align-items: center;
  gap: 30px;
}

.org-logo img {
  object-fit: contain;
}

.org-info .org-name {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 4px;
}

.org-info .org-description {
  font-size: 14px;
  margin: 0 0 8px;
}

.org-info .org-link a {
  font-size: 14px;
  color: #0073aa;
  text-decoration: underline;
}

.org-logo {
  max-width: 150px;
}

.overlay-content .member-description p {
  padding-bottom: 8px;
}
