/**
 * PAS4 — Admin & Coordination (PG) listing.
 * Expandable submission cards + exposed-filter grid.
 * Everything is scoped under .view-admin-coordination-pg so it can't leak.
 * Set the wrapper class on the view: Advanced > Other > CSS class =
 *   view-admin-coordination-pg
 * Card classes are prefixed pgc- so they don't collide with the Academic
 * Support card styles (as-).
 */

/* ---------- Exposed filter bar: many filters → tidy responsive grid ---------- */
.view-admin-coordination-pg .views-exposed-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px 16px;
  align-items: end;
  padding: 16px;
  margin-bottom: 20px;
  background: #f7f7f5;
  border: 1px solid #e6e6e1;
  border-radius: 12px;
}
.view-admin-coordination-pg .views-exposed-form .form-item { margin: 0; }
.view-admin-coordination-pg .views-exposed-form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #5f5e5a;
  margin-bottom: 4px;
}
.view-admin-coordination-pg .views-exposed-form input[type="text"],
.view-admin-coordination-pg .views-exposed-form select {
  width: 100%;
  height: 38px;
  box-sizing: border-box;
}
.view-admin-coordination-pg .views-exposed-form .form-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}

/* Result-count line (Global: Result summary header) */
.view-admin-coordination-pg .view-header {
  font-size: 13px;
  color: #5f5e5a;
  margin: 4px 2px 12px;
}

/* ---------- Card list ---------- */
.view-admin-coordination-pg .view-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pgc-card {
  background: #fff;
  border: 1px solid #e6e6e1;
  border-radius: 12px;
  overflow: hidden;
}
.pgc-card:hover { border-color: #cfcfc8; }

.pgc-details > summary { list-style: none; cursor: pointer; }
.pgc-details > summary::-webkit-details-marker { display: none; }

/* ---------- Collapsed header (key info) ---------- */
.pgc-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
}
.pgc-badge {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: #e6f0fb;
  color: #185fa5;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
}
.pgc-headline { flex: 1 1 auto; min-width: 0; }

.pgc-title {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  font-size: 14px; font-weight: 600; color: #2c2c2a;
  line-height: 1.3;
}
.pgc-code { color: #185fa5; }
.pgc-tag {
  font-size: 11px; font-weight: 600; line-height: 1;
  padding: 3px 7px; border-radius: 6px;
  background: #eef1f5; color: #4a5a6a;
}
.pgc-tag--soft { background: #f1efe8; color: #6b6a65; }

.pgc-work {
  display: block;
  font-size: 13px; color: #43423f;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: 2px;
}
.pgc-sub {
  display: block;
  font-size: 12px; color: #8a8880;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pgc-dot { margin: 0 5px; color: #b4b2a9; }
.pgc-muted { color: #93918a; }

.pgc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pgc-chips--summary { flex: 0 0 auto; justify-content: flex-end; }
.pgc-chips--full { margin-top: 14px; }

.pgc-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; line-height: 1;
  padding: 5px 9px;
  border-radius: 8px;
  background: #f1efe8; color: #5f5e5a;
  white-space: nowrap;
}
.pgc-chip__label { opacity: .7; font-weight: 500; }
.pgc-chip--ok     { background: #e1f5ee; color: #0f6e56; }
.pgc-chip--warn   { background: #faeeda; color: #854f0b; }
.pgc-chip--danger { background: #fcebeb; color: #a32d2d; }
.pgc-chip--muted  { background: #f1efe8; color: #7d7c76; }

.pgc-chev {
  flex: 0 0 auto;
  width: 9px; height: 9px;
  border-right: 2px solid #b4b2a9;
  border-bottom: 2px solid #b4b2a9;
  transform: rotate(45deg);
  transition: transform .18s ease;
  margin-left: 2px;
}
.pgc-details[open] .pgc-chev { transform: rotate(-135deg); }

/* ---------- Expanded body (curated detail) ---------- */
.pgc-body {
  padding: 4px 16px 16px;
  border-top: 1px solid #eeece5;
}
.pgc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 22px;
  padding-top: 14px;
}
.pgc-item { min-width: 0; }
.pgc-item--wide { grid-column: 1 / -1; }
.pgc-k {
  display: block;
  font-size: 12px; color: #93918a;
  margin-bottom: 2px;
}
.pgc-v { display: block; font-size: 14px; color: #2c2c2a; }
.pgc-v a { color: #185fa5; }

.pgc-actions {
  display: flex; justify-content: flex-end; align-items: center;
  flex-wrap: wrap; gap: 8px;
  margin-top: 16px;
}
.pgc-links { display: flex; gap: 8px; }
.pgc-btn {
  font-size: 13px; line-height: 1;
  padding: 7px 12px;
  border: 1px solid #cfcfc8;
  border-radius: 8px;
  color: #2c2c2a; text-decoration: none;
  background: #fff;
}
.pgc-btn:hover { background: #f7f7f5; }
.pgc-btn--primary { border-color: #185fa5; color: #185fa5; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .pgc-chips--summary { display: none; }   /* keep collapsed row short on mobile */
  .pgc-grid { grid-template-columns: 1fr; }
}
