/* Members Directory Styles */

/* Member Card Animations */
.member-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.member-card:hover {
  transform: translateY(-2px);
}

/* Member List Item */
.member-list-item {
  transition: box-shadow 0.2s ease;
}

.member-list-item:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Line Clamp Utilities */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Online Indicator Pulse */
@keyframes pulse-green {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.member-card .bg-green-400,
.member-list-item .bg-green-400 {
  animation: pulse-green 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Search Input Focus */
input[type="text"]:focus {
  outline: none;
}

/* Button Styles (if not in design-system.css) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  background-color: #3b82f6;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-primary:hover {
  background-color: #2563eb;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  background-color: white;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-secondary:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Role Badge Colors */
.role-owner {
  background-color: #f3e8ff;
  color: #6b21a8;
}

.role-moderator {
  background-color: #dbeafe;
  color: #1e40af;
}

.role-member {
  background-color: #f3f4f6;
  color: #374151;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .member-card {
    padding: 1rem;
  }

  .member-list-item {
    padding: 0.75rem;
  }

  /* Stack action buttons on mobile */
  .member-list-item .flex.gap-2 {
    flex-direction: column;
    width: 100%;
  }

  .member-list-item .btn-primary,
  .member-list-item .btn-secondary {
    width: 100%;
  }
}

/* Loading Spinner */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Filter Pills */
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.filter-pill button {
  margin-left: 0.25rem;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

/* Accessibility: Skip to content link */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Avatar Container */
.member-avatar-container {
  position: relative;
  display: inline-block;
}

/* Empty State */
.empty-state-icon {
  color: #9ca3af;
}

/* Smooth Transitions */
* {
  transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
