/* ─── Feature: Assignments — Scoped Styles ───────────────────────────────────
   Rebuilt từ source HTML gốc: filter.html, assignment-list.html, pagination.html
──────────────────────────────────────────────────────────────────────────── */

/* ── Section ── */
.asgn-section { margin-bottom: 36px; }

/* ── Filter label ── */
.filter-label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
}

/* ── Filter row wrapper — nền xám bọc toàn bộ ── */
.filter-tab-group {
  display: flex;
  background-color: #f5f5f5;
  height: 40px;
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}

.filter-status-tab-group {
  display: flex;
  background-color: #f5f5f5;
  height: 40px;
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}

/* ── Filter tab (skill) ── */
.filter-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #8D8D8D;
  transition: all 0.15s ease;
  user-select: none;
  border-radius: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  white-space: nowrap;
}

.filter-tab svg { opacity: 0.6; flex-shrink: 0; }

.filter-tab.active {
  color: #333;
  background-color: white;
  border: 1px solid #D9D9D9;
  border-radius: 7px;
  margin: 5px;
  font-weight: 500;
  justify-content: space-between;
}
.filter-tab.active svg { opacity: 1; }

/* ── Filter tab (status) ── */
.filter-status-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #8D8D8D;
  transition: all 0.15s ease;
  user-select: none;
  border: none;
  background: transparent;
  font-family: inherit;
  white-space: nowrap;
}

.filter-status-tab.active {
  color: #333;
  background-color: white;
  border: 1px solid #D9D9D9;
  border-radius: 7px;
  margin: 5px;
  font-weight: 500;
  justify-content: space-between;
}

/* ── Close icon (chỉ hiện khi active) ── */
.close-icon {
  display: none;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
  color: #8D8D8D;
}
.filter-tab.active .close-icon,
.filter-status-tab.active .close-icon {
  display: inline-flex;
}
.close-icon:hover { color: #333; }

/* ── Tab left content (icon + label) ── */
.tab-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ════════════════════════════════════════
   Assignment List — dựa trên assignment-list.html
   List lớn: 1 cột, mỗi item là card riêng
════════════════════════════════════════ */
.asgn-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.assignment-card {
  width: 100%;
  background-color: white;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid #DDDDDD;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.assignment-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

.assignment-header {
  display: flex;
  align-items: center;
}

.assignment-icon {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 14px;
  flex-shrink: 0;
  font-size: 40px;
  line-height: 1;
}

.assignment-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.assignment-title {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 500;
  color: #8D8D8D;
}
.assignment-title svg { width: 14px; height: 14px; flex-shrink: 0; }

.assignment-subtitle {
  color: #333333;
  font-size: 12px;
  font-weight: 500;
}
.assignment-subtitle a {
  color: inherit;
  text-decoration: underline;
}

/* Status badges — width 100px, căn giữa theo thiết kế gốc */
.assignment-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  width: fit-content;
  min-width: 100px;
}

.status--pending { background-color: #FFEBEE; color: #D14444; }
.status--done    { background-color: #ECF9EE; color: #0C6D26; }
.status--grading { background-color: #FFF3E0; color: #BF5E00; }
.status--graded  { background-color: #E3F2FD; color: #1565C0; }

/* ── Status dot ── */
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.status--pending .status-dot { background: #D14444; }
.status--done    .status-dot { background: #0C6D26; }
.status--grading .status-dot { background: #BF5E00; }
.status--graded  .status-dot { background: #1565C0; }

/* ════════════════════════════════════════
   Assignment Grid — 2 col (bài tập quá trình)
════════════════════════════════════════ */
.asgn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Card trong grid dùng lại assignment-card nhưng avatar nhỏ hơn */
.asgn-grid .assignment-card .assignment-icon {
  width: 52px;
  height: 52px;
  font-size: 32px;
}

/* ════════════════════════════════════════
   Pagination — dựa trên pagination.html
   Button tròn 30×30, active #D14444
════════════════════════════════════════ */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 16px;
}

.pagination-button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: none;
  background-color: #e9e9e9;
  font-size: 13px;
  color: #8D8D8D;
  font-weight: 700;
  transition: all 0.15s ease;
  font-family: inherit;
}
.pagination-button:hover { background-color: #d9d9d9; }
.pagination-button.active {
  background-color: #D14444;
  color: white;
}

.pagination-nav {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: none;
  color: #8D8D8D;
  font-size: 16px;
  transition: color 0.15s;
  font-family: inherit;
}
.pagination-nav:hover { color: #D14444; }

.pagination-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  color: #8D8D8D;
}

@media (max-width: 640px) {
  .asgn-grid { grid-template-columns: 1fr; }
  .filter-tab, .filter-status-tab { font-size: 12px; padding: 0 8px; }
}
