/* ==========================================================================
   MY LISTS & LIST MEMBERS DESIGN SYSTEM
   Modular styling for list clusters, member cards, and add-to-list modals
   ========================================================================== */

/* Lists Tab Header Banner */
.lists-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.lists-header-bar h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.lists-header-bar h2 i {
  color: var(--primary);
}

.lists-header-bar p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-top: 0.2rem;
}

/* Lists Grid Layout */
.lists-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  width: 100%;
}

/* Individual List Card */
.list-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 12px);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.1rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.list-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(37, 99, 235, 0.4);
}

.list-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.list-card-icon-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.list-folder-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.list-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.list-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  background: #f0f0f0;
  color: #444444;
  font-size: 0.78rem;
  font-weight: 600;
  flex-shrink: 0;
  border: 1px solid #e0e0e0;
}

.list-card-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-color);
}

/* Empty State Banner */
.lists-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg, 16px);
  width: 100%;
}

.lists-empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.25rem auto;
}

.lists-empty-state h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.lists-empty-state p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 480px;
  margin: 0 auto 1.5rem auto;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Add to List Action Button in Professor Horizontal Cards
   -------------------------------------------------------------------------- */
.btn-list-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  background: rgba(100, 116, 139, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.btn-list-action:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-list-action.is-saved {
  background: #0a0a0a;
  border-color: #0a0a0a;
  color: #ffffff;
}

.btn-list-action.is-saved:hover {
  background: #222222;
}

/* --------------------------------------------------------------------------
   List Members Inspection Drawer / Modal
   -------------------------------------------------------------------------- */
.members-modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1050;
  align-items: center;
  justify-content: center;
}

.members-modal-window {
  background: var(--bg-surface);
  width: 92%;
  max-width: 800px;
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-lg);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.members-modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.members-modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.members-modal-body {
  padding: 1.5rem 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.member-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  gap: 1rem;
  transition: all 0.2s ease;
}

.member-row-card:hover {
  border-color: rgba(37, 99, 235, 0.3);
}

.member-row-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.member-row-avatar {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #1a1a1a;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.member-row-details h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.member-row-details p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.member-row-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Notice for 1-list rule inside Add Modal */
.one-list-rule-notice {
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: rgba(37, 99, 235, 0.05);
  border-left: 3px solid var(--primary);
  padding: 0.6rem 0.8rem;
  border-radius: 0 6px 6px 0;
  margin-top: 0.75rem;
}
