/* =========================
   Team Directory Pro – CSS (FIXED)
   - Perfect centering desktop + mobile
   - Registration centered (Elementor override-proof)
   - Avatar hidden
   ========================= */

.tdp-wrap{
  --tdp-cols: 3;
  --tdp-gap: 18px;

  /* Colors */
  --tdp-name-color: #111;
  --tdp-designation-color: #6aa84f;
  --tdp-label-color: #333;
  --tdp-value-color: #333;

  --tdp-email-color: #1a73e8;
  --tdp-phone-color: #222;
  --tdp-website-color: #0b7a3e;
  --tdp-whatsapp-color: #128c7e;
}

/* Make sure all sizing behaves */
.tdp-wrap, .tdp-wrap *{
  box-sizing: border-box;
}

/* =========================
   Filters
   ========================= */
.tdp-filters{
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 14px;
}

.tdp-filter label{
  display: block;
  font-size: 12px;
  opacity: .8;
  margin-bottom: 6px;
  text-align: left;
}

.tdp-filters select,
.tdp-filters input{
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.12);
  background: transparent;
  outline: none;
}

/* =========================
   Loading / empty
   ========================= */
.tdp-results .tdp-loading,
.tdp-empty{
  padding: 18px;
  border-radius: 12px;
  text-align: center;
}

/* =========================
   Grid (center cards properly)
   ========================= */
.tdp-grid{
  display: grid;
  grid-template-columns: repeat(var(--tdp-cols), minmax(0, 1fr));
  gap: var(--tdp-gap);

  /* THIS is what centers cards nicely in each grid cell */
  justify-items: center;
}

/* =========================
   Card (center everything)
   ========================= */
.tdp-card{
  width: 100%;
  max-width: 420px; /* keeps it nice on mobile and avoids weird stretching */
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.08);
  transition: transform .15s ease, box-shadow .15s ease;

  display: flex;
  flex-direction: column;
  align-items: center;

  /* center text by default */
  text-align: center;
}

.tdp-card:hover{
  transform: translateY(-2px);
}

/* =========================
   Avatar area: completely hidden
   ========================= */
.tdp-media,
.tdp-avatar,
.tdp-avatar--placeholder{
  display: none !important;
}

/* =========================
   Body
   ========================= */
.tdp-body{
  width: 100%;
  padding: 14px;

  display: flex;
  flex-direction: column;
  align-items: center;

  /* override Elementor forcing left */
  text-align: center !important;
}

/* Name */
.tdp-name{
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.2;
  color: var(--tdp-name-color);

  text-align: center !important;
}

/* Registration / designation */
.tdp-designation{
  margin: 0 0 10px;
  font-size: 13px;
  opacity: .95;
  color: var(--tdp-designation-color);

  /* FORCE center even if Elementor injects left */
  text-align: center !important;

  /* IMPORTANT: prevents “full width + looks left” issues */
  display: inline-block !important;
  width: auto !important;
}

/* =========================
   Meta list
   ========================= */
.tdp-meta{
  list-style: none;
  margin: 0;
  padding: 0;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 6px;
  font-size: 13px;

  text-align: center !important;
}

/* Row */
.tdp-meta-item{
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;

  text-align: center !important;
}

/* Label + value */
.tdp-meta-item .tdp-label{
  font-weight: 600;
  color: var(--tdp-label-color);
}
.tdp-meta-item .tdp-value{
  color: var(--tdp-value-color);
}

/* Links */
.tdp-meta-item a.tdp-value{
  color: inherit;
  text-decoration: none;
}
.tdp-meta-item a.tdp-value:hover{
  text-decoration: underline;
}

/* Per-field colors (li must have these classes) */
.tdp-meta-item.is-email .tdp-label,
.tdp-meta-item.is-email .tdp-value{ color: var(--tdp-email-color); }

.tdp-meta-item.is-phone .tdp-label,
.tdp-meta-item.is-phone .tdp-value{ color: var(--tdp-phone-color); }

.tdp-meta-item.is-website .tdp-label,
.tdp-meta-item.is-website .tdp-value{ color: var(--tdp-website-color); }

.tdp-meta-item.is-whatsapp .tdp-label,
.tdp-meta-item.is-whatsapp .tdp-value{ color: var(--tdp-whatsapp-color); }

/* =========================
   Pagination
   ========================= */
.tdp-pagination{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}

.tdp-page{
  border: 1px solid rgba(0,0,0,.12);
  background: transparent;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.tdp-page.is-active{
  font-weight: 700;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 1024px){
  .tdp-filters{ grid-template-columns: 1fr 1fr; }
  .tdp-wrap{ --tdp-cols: 2; }
}

@media (max-width: 680px){
  .tdp-filters{ grid-template-columns: 1fr; }
  .tdp-wrap{ --tdp-cols: 1; }

  /* keep cards centered and readable */
  .tdp-card{
    max-width: 520px;
  }
}
/* =========================
   RTL + hard centering fix
   ========================= */
.tdp-wrap{
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

/* Keep everything centered even inside Elementor columns */
.tdp-wrap .tdp-filters,
.tdp-wrap .tdp-results{
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* If your whole site is Arabic, force RTL in this widget */
.tdp-wrap[dir="rtl"],
.rtl .tdp-wrap{
  direction: rtl;
}

/* Filters container center */
.tdp-filters{
  align-items: center;
  justify-items: center;
}

/* Fix select text inside arrow (RTL/LTR safe) */
.tdp-filters select{
  width: 100%;
  max-width: 100%;
  padding-inline-start: 12px;
  padding-inline-end: 44px; /* space for arrow */
  line-height: 1.2;
  appearance: auto; /* keep native arrow */
}

/* Some themes force weird background/arrow; this helps */
.rtl .tdp-filters select{
  padding-inline-start: 44px; /* arrow side in rtl can be left */
  padding-inline-end: 12px;
}

/* Ensure inputs don’t push grid out */
.tdp-filters input,
.tdp-filters select{
  min-width: 0;
}

/* Prevent any horizontal overflow on mobile */
.tdp-wrap,
.tdp-filters,
.tdp-results{
  overflow-x: hidden;
}


/* =========================
   Elementor color vars (force apply)
   ========================= */

.tdp-wrap .tdp-name{
  color: var(--tdp-name-color) !important;
}

.tdp-wrap .tdp-designation{
  color: var(--tdp-designation-color) !important;
}

.tdp-wrap .tdp-meta-item .tdp-label{
  color: var(--tdp-label-color) !important;
}

.tdp-wrap .tdp-meta-item .tdp-value,
.tdp-wrap .tdp-meta-item .tdp-value a{
  color: var(--tdp-value-color) !important;
}

/* Field-specific */
.tdp-wrap .tdp-meta-item.is-email .tdp-label,
.tdp-wrap .tdp-meta-item.is-email .tdp-value,
.tdp-wrap .tdp-meta-item.is-email .tdp-value a{
  color: var(--tdp-email-color) !important;
}

.tdp-wrap .tdp-meta-item.is-phone .tdp-label,
.tdp-wrap .tdp-meta-item.is-phone .tdp-value{
  color: var(--tdp-phone-color) !important;
}

.tdp-wrap .tdp-meta-item.is-website .tdp-label,
.tdp-wrap .tdp-meta-item.is-website .tdp-value,
.tdp-wrap .tdp-meta-item.is-website .tdp-value a{
  color: var(--tdp-website-color) !important;
}

.tdp-wrap .tdp-meta-item.is-whatsapp .tdp-label,
.tdp-wrap .tdp-meta-item.is-whatsapp .tdp-value,
.tdp-wrap .tdp-meta-item.is-whatsapp .tdp-value a{
  color: var(--tdp-whatsapp-color) !important;
}
