/* Modal Overlay */
.team-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.admin-bar .team-modal-overlay {
  top: var(--wp-admin--admin-bar--height, 32px);
}
@media screen and (max-width: 782px) {
  body.admin-bar .team-modal-overlay {
    top: 46px;
  }
}

.team-modal-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

/* Modal Container */
.team-modal-container {
  background: #ffffff;
  border-radius: 12px;
  width: 90%;
  max-width: 750px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  padding: 30px;
}

.team-modal-overlay.is-active .team-modal-container {
  transform: scale(1);
}

/* Close Button */
.team-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 32px;
  line-height: 1;
  color: #333;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 10;
}

.team-modal-close:hover {
  color: #ff0000;
}

/* Modal Content Layout */
.team-modal-content {
  display: flex;
  gap: 30px;
}

.team-modal-left {
  flex: 0 0 220px;
}

.team-modal-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
}

.team-modal-right {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.team-modal-name {
  font-family: 'Open Sans', sans-serif;
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 5px 0;
  color: #111;
}

.team-modal-position {
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #0073e6;
  text-transform: uppercase;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.team-modal-bio {
  font-family: 'Montserrat', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #444;
}

/* Make Team Cards Look Clickable */
.eael-team-member {
  cursor: pointer;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .team-modal-content {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  .team-modal-left {
    flex: 0 0 auto;
    width: 150px;
  }
  .team-modal-container {
    padding: 20px;
  }
  .team-modal-name {
    font-size: 22px;
    text-align: center;
  }
  .team-modal-position {
    font-size: 14px;
    text-align: center;
    margin-bottom: 15px;
  }
}
