/* =========================================================
   Team Profiles Popup — COMPLETE CSS (v1.3.0)
   ========================================================= */

/* ------------- Grid ------------- */
.tpp-grid{
  --tpp-min: 220px;     /* fallback min card width */
  --tpp-cols: auto-fit; /* auto-fit unless shortcode sets --tpp-cols */
  display:grid;
  grid-template-columns: repeat(var(--tpp-cols), minmax(var(--tpp-min), 1fr));
  gap: 20px;
}

/* ------------- Card ------------- */
.tpp-card{
  background:#fff;
  border:1px solid #e5e7eb;          /* gray-200 */
  border-radius:14px;
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:10px;
  cursor:pointer;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.tpp-card:hover{
  border-color:#d1d5db;               /* gray-300 */
  box-shadow:0 6px 18px rgba(0,0,0,.06);
  transform: translateY(-2px);
}

.tpp-photo{
  position:relative;
  aspect-ratio: 1 / 1;
  border-radius:12px;
  overflow:hidden;
  background:#f3f4f6;                 /* gray-100 */
}
.tpp-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
	object-position: center 20%;
}

.tpp-title{
  margin:2px 0 0;
  font-weight:600;
  font-size:1.8rem;
  line-height:1.5;
  color:#111827;                       /* gray-900 */
}
.tpp-position{
  color:#6b7280;                       /* gray-500 */
  font-size:1.3rem;
}

/* ------------- Social (card & modal share base) ------------- */
.tpp-social{
  list-style:none;
  margin:6px 0 0;
  padding:0;
  display:flex;
  gap:10px;
}
.tpp-social li{ margin:0; padding:0; }
.tpp-social li a{
  display:inline-flex;
  width:28px; height:28px;            /* card size; modal overrides */
  align-items:center; justify-content:center;
  border-radius:50%;
  background:transparent;
  color:#6b7280;                       /* icon color via currentColor */
  border:1px solid #e5e7eb;
  box-shadow:none;
  transition:transform .15s ease, color .15s ease, border-color .15s ease, background .15s ease;
}
.tpp-social li a:hover{
  color:#111827;
  border-color:#d1d5db;
  transform:translateY(-1px);
}

/* Font Awesome icon sizing */
.tpp-social i { font-size: 16px; line-height: 1; display: inline-block; }
.tpp-social--modal i { font-size: 18px; }

/* ------------- Modal shell ------------- */
#tpp-modal[hidden]{ display:none !important; }

.tpp-modal{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background: rgba(17,24,39,.55);      /* gray-900 @ 55% */
  z-index: 100000;
  opacity:0;
  pointer-events:none;
  transition: opacity .2s ease;
}
.tpp-modal.open{
  opacity:1;
  pointer-events:auto;
}

.tpp-modal__panel{
  width:min(900px, 92vw);
  max-height:min(88vh, 1000px);
  background:#fff;
  border-radius:18px;
  box-shadow:0 20px 50px rgba(0,0,0,.18);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

/* ------------- Modal header cleanup ------------- */
.tpp-modal__header{
  display:grid;
  grid-template-columns: 64px 1fr auto;
  align-items:center;
  gap:16px;
  padding:24px 24px 0;
}
.tpp-modal__avatar .tpp-avatar-img{
  width:64px; height:64px;
  border-radius:9999px;
  object-fit:cover; display:block;
}

/* Title, position, socials arranged cleanly */
.tpp-modal__meta{
  display:grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "title   social"
    "position social";
  align-items:center;
  column-gap:16px;
  row-gap:6px;
}
.tpp-modal__title{
  grid-area:title;
  margin:0;
  font-weight:700;
  line-height:1.15;
  color:#111827;
  font-size:clamp(20px, 2vw, 28px);
}
.tpp-modal__position{
  grid-area:position;
  color:#6b7280;
  font-size:16px;
}
.tpp-modal__social{
  grid-area:social;
  display:flex;
  align-items:center;
  gap:10px;
  margin-left:16px;
}
/* Larger buttons inside modal */
.tpp-social--modal li a{ width:32px; height:32px; }

/* Close button */
.tpp-modal__close{
  position:relative;
  margin-left:auto;
  border:0;
  background:#f3f4f6;
  color:#374151;                       /* gray-700 */
  width:36px; height:36px;
  border-radius:10px;
  cursor:pointer;
  transition: background .15s ease, transform .15s ease;
}
.tpp-modal__close:hover{
  background:#e5e7eb;
  transform: scale(1.03);
}

/* Modal body */
.tpp-modal__body{
  padding:16px 24px 24px;
  overflow:auto;
}

.tpp-section{ margin-top:16px; }
.tpp-section:first-child{ margin-top:0; }

/* ------------- Video / embed wrapper ------------- */
.tpp-profile-video .tpp-embed{
  position:relative;
  width:100%;
  aspect-ratio:16 / 9;
  border-radius:12px;
  overflow:hidden;
  background:#000;
}
.tpp-profile-video .tpp-embed iframe,
.tpp-profile-video .tpp-embed video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  border:0;
}

/* ------------- Responsive ------------- */
@media (max-width: 640px){
  .tpp-modal__header{ grid-template-columns:48px 1fr; }
  .tpp-modal__avatar .tpp-avatar-img{ width:48px; height:48px; }
  .tpp-modal__meta{
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "position"
      "social";
  }
  .tpp-modal__social{ margin-left:0; justify-content:flex-start; }
}

/* ------------- Force overrides (if theme fights us) ------------- */
#tpp-modal .tpp-social--modal li a{
  background:transparent !important;
  box-shadow:none !important;
}

/* ------------- Utility (optional) ------------- */
.tpp-hidden{ display:none !important; }

/* Accessibility helper text for FA */
.tpp-social .sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}
