/* 全体ラッパー */
.printout-block {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 20px 24px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  font-size: 14px;
  color: #111827;
}

/* フィルターエリア（上部の検索エリア） */
.printout-filters {
  margin-bottom: 16px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.printout-filters-title {
  margin: 0 0 10px;
  font-weight: 600;
  font-size: 1.1rem;
  color: #4b5563;
}

.printout-filter-row {
  margin-bottom: 6px;
}

.filter-label {
  font-weight: 600;
  margin-right: 8px;
  display: inline-block;
  min-width: 6em;
  color: #6b7280;
}

/* 絞り込みボタン */
.filter-btn {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 8px 20px;
  margin-right: 4px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--nv-text-color);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.filter-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: var(--nv-text-color);
}

.filter-btn.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

/* 見出し行（ファイル名 / 教師用 / 生徒用） */
.printout-list-headings {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: #6b7280;
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 8px 8px 0 0;
  margin-top: 8px;
}

.printout-heading-title {
  flex: 1 0 auto;
}

.printout-heading-links {
  display: flex;
  gap: 10px;
  width: 400px;
  max-width: 100%;
}

.printout-heading-links>* {
  flex: 1 0 auto;
}

/* リスト全体 */
.printout-list {
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

/* 行（1レコード） */
.printout-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  transition: background-color 0.12s ease;
}

.printout-item:last-child {
  border-bottom: none;
}

.printout-item:hover {
  background-color: #fafafa;
}

/* ファイル名（タイトル） */
.printout-item-title {
  flex: 1 0 auto;
  font-weight: 500;
  font-size: 1.1rem;
  color: #111827;
}

/* PDFリンク部分 */
.printout-item-links {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 400px;
  max-width: 100%;
  justify-content: space-between;
}

.printout-item-link {
  flex: 1 0 auto;
}

.printout-item-link a {
  display: block;
  padding: 6px 12px;
  text-align: center;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  color: #2563eb;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.printout-item-link a:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.35);
}

/* 絞り込み結果が空のときのメッセージ */
.printout-empty-message {
  margin-top: 12px;
  padding: 10px 12px;
  color: #6b7280;
  font-size: 1rem;
}

@media screen and (max-width: 767px) {
  .filter-label {
    display: block;
  }

  .filter-btn {
    padding: 8px 12px;
    margin-bottom: 4px;
  }

  .printout-block {
    padding: 16px;
  }

  .printout-list-headings {
    display: none;
  }

  .printout-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 20px 0;
  }

  .printout-item-links {
    gap: 10px;
  }

  .printout-item-link a {
    padding: 6px 8px;
  }
}