/* ============================================================================
   DIRECTORY READER — Read-only member directory with profile cards
   ============================================================================
   Prefix: dr-
   Mirrors directory.css styles but scoped to the member reader component.
   ============================================================================ */

/* Grid layout override */
#directory-reader-browser .fb-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding: 4px;
}

/* Card height */
#directory-reader-browser .fb-card {
  height: 380px;
}

/* ---- Front face ---- */

.dr-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 20px 16px;
  height: 100%;
}

.dr-front-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  width: 100%;
}

.dr-photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-primary-bg, #eff6ff);
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  margin-bottom: 14px;
  flex-shrink: 0;
  background: var(--color-primary-bg, #eff6ff);
}

.dr-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-gray-800, #1f2937);
  margin-bottom: 2px;
  line-height: 1.3;
}

.dr-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-gray-500, #6b7280);
  margin-bottom: 2px;
  line-height: 1.3;
}

.dr-company {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary, #2563eb);
  margin-bottom: 10px;
  line-height: 1.3;
}

.dr-dept-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 20px;
  background: var(--color-primary-bg, #eff6ff);
  color: var(--color-primary, #2563eb);
  margin-bottom: 8px;
}

.dr-skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-bottom: 10px;
  max-height: 44px;
  overflow: hidden;
}

.dr-skill-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 12px;
  background: var(--color-success-bg, #f0fdf4);
  color: var(--color-success, #22c55e);
  white-space: nowrap;
}

.dr-meta {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border-color, #e2e8f0);
}

.dr-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-gray-500, #6b7280);
}

.dr-meta-row svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--color-gray-400, #9ca3af);
}

.dr-meta-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Star button */
.dr-star-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--card-bg, #ffffff);
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: 50%;
  color: var(--color-gray-400, #9ca3af);
  cursor: pointer;
  transition: all 200ms;
  z-index: 2;
}

.dr-star-btn:hover {
  border-color: #f59e0b;
  color: #f59e0b;
  background: #fffbeb;
}

.dr-star-btn.dr-starred {
  border-color: #f59e0b;
  color: #f59e0b;
  background: #fffbeb;
}

/* Flip button */
.dr-flip-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--card-bg, #ffffff);
  border: 1.5px solid var(--border-color, #e2e8f0);
  border-radius: 50%;
  color: var(--color-gray-400, #9ca3af);
  cursor: pointer;
  transition: all 200ms;
  z-index: 2;
}

.dr-flip-btn:hover {
  border-color: var(--color-primary, #2563eb);
  color: var(--color-primary, #2563eb);
  background: var(--color-primary-bg, #eff6ff);
}

/* ---- Back face ---- */

.dr-back {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.dr-back-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.dr-back-photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.4);
  flex-shrink: 0;
}

.dr-back-name {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.dr-back-title {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  line-height: 1.3;
}

.dr-back-flip-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  transition: all 200ms;
  z-index: 2;
}

.dr-back-flip-btn:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.dr-back-bio {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.dr-back-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.dr-back-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.dr-back-row:last-child {
  border-bottom: none;
}

.dr-back-row svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: rgba(255,255,255,0.6);
}

.dr-back-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: rgba(255,255,255,0.5);
  width: 80px;
  flex-shrink: 0;
}

.dr-back-value {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
