/* HR Tracker — Staff Directory */

#tt-directory-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #111827;
  padding: 30px;
  box-sizing: border-box;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Filter bar ── */
.ttd-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

/* Count — far left */
.ttd-count {
  font-size: 13px;
  color: #9ca3af;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Spacer pushes filters + search to the right */
.ttd-bar-spacer { flex: 1; min-width: 8px; }

/* Staff-type pills */
.ttd-filter-group { display: flex; align-items: center; flex-shrink: 0; }
.ttd-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ttd-pill {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .12s;
  white-space: nowrap;
}
.ttd-pill:hover  { border-color: #4f46e5; color: #4f46e5; }
.ttd-pill.active { border-color: #4f46e5; background: #eef2ff; color: #4f46e5; font-weight: 600; }

/* Search — far right */
.ttd-search-wrap {
  position: relative;
  flex-shrink: 0;
  width: 220px;
}
.ttd-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  pointer-events: none;
  display: flex;
  align-items: center;
  z-index: 2;
}
.ttd-search-wrap { isolation: isolate; }
.ttd-search {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  color: #111827;
  background: #fff;
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s;
}
.ttd-search:focus { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,.08); }

/* ── Grid ── */
.ttd-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .ttd-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .ttd-grid { grid-template-columns: 1fr; }
}

.ttd-bar {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Card ── */
.ttd-card {
  background: #fff;
  border: 1px solid #f1f5f9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: box-shadow .15s, transform .15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px 20px;
  text-align: center;
}
.ttd-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.10);
  transform: translateY(-2px);
}

/* Photo */
.ttd-photo-wrap {
  width: 176px;
  height: 176px;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.ttd-photo-wrap svg {
  width: 72px;
  height: 72px;
}
.ttd-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Info */
.ttd-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100%;
}
.ttd-name {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin: 0;
}
.ttd-title {
  font-size: 13px;
  color: #4f46e5;
  font-weight: 500;
  margin: 0;
}
.ttd-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 9px;
  border-radius: 999px;
}
.ttd-phone {
  font-size: 13px;
  color: #374151;
  text-decoration: none;
}
.ttd-phone:hover { color: #4f46e5; text-decoration: underline; }

.ttd-bio {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
  margin: 4px 0 0;
  text-align: center;
}

/* Empty / error states */
.ttd-empty,
.ttd-error {
  text-align: center;
  padding: 48px 20px;
  color: #9ca3af;
  font-size: 14px;
}

/* Responsive */


/* ── Department dropdown ── */
.ttd-filter-group { display: flex; align-items: center; gap: 8px; }
.ttd-dept-wrap    { display: flex; align-items: center; }
.ttd-dept-select {
  padding: 7px 12px; border: 1px solid #e2e8f0; border-radius: 8px;
  font-size: 13px; color: #374151; background: #fff;
  cursor: pointer; outline: none; transition: border-color .15s;
}
.ttd-dept-select:focus { border-color: #4f46e5; }

/* ── Read more button ── */
.ttd-read-more {
  background: none; border: none; padding: 0;
  font-size: 12px; color: #4f46e5; cursor: pointer;
  font-weight: 500; text-decoration: underline;
  margin-top: 2px;
}
.ttd-read-more:hover { color: #4338ca; }

/* ── Bio modal ── */
.ttd-modal-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.ttd-modal-box {
  background: #fff; border-radius: 16px;
  max-width: 540px; width: 100%; padding: 32px;
  position: relative; max-height: 80vh; overflow-y: auto;
  display: flex; gap: 24px; align-items: flex-start;
}
.ttd-modal-photo-wrap {
  width: 100px; height: 100px; border-radius: 10px; flex-shrink: 0;
  overflow: hidden; background: #f3f4f6;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid #e5e7eb;
}
.ttd-modal-photo-wrap svg { width: 50px; height: 50px; }
.ttd-modal-photo-wrap img { width:100%;height:100%;object-fit:cover; }
.ttd-modal-info { flex: 1; }
.ttd-modal-name  { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.ttd-modal-title { font-size: 14px; color: #4f46e5; font-weight: 500; margin: 0 0 8px; }
.ttd-modal-bio   { font-size: 14px; color: #374151; line-height: 1.7; margin: 12px 0 0; }
.ttd-modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; font-size: 24px; cursor: pointer;
  color: #9ca3af; line-height: 1; padding: 4px 8px; border-radius: 6px;
}
.ttd-modal-close:hover { background: #f3f4f6; color: #111827; }

@media (max-width: 480px) {
  .ttd-modal-box { flex-direction: column; align-items: center; text-align: center; }
}
