/**
 * PAS4 — Academic Support listing.
 * Expandable cards + exposed-filter layout.
 * Scope everything under .view-academic-support so it can't leak.
 * Set the wrapper class on the view: Advanced > Other > CSS class = view-academic-support
 */

/* ---------- Exposed filter bar: wrap the many filters into a tidy grid ---------- */
.view-academic-support .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-academic-support .views-exposed-form .form-item { margin: 0; }
.view-academic-support .views-exposed-form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #5f5e5a;
  margin-bottom: 4px;
}
.view-academic-support .views-exposed-form input[type="text"],
.view-academic-support .views-exposed-form select {
  width: 100%;
  height: 38px;
  box-sizing: border-box;
}
.view-academic-support .views-exposed-form .form-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}

/* Result count line, if you add a header */
.view-academic-support .view-header {
  font-size: 13px;
  color: #5f5e5a;
  margin: 4px 2px 12px;
}

/* ---------- Card list ---------- */
.view-academic-support .view-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

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

/* ---------- Collapsed header (key info) ---------- */
.as-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
}
.as-avatar {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #e6f0fb;
  color: #185fa5;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.as-headline { flex: 1 1 auto; min-width: 0; }
.as-name {
  display: block;
  font-size: 15px; font-weight: 600; color: #2c2c2a;
  line-height: 1.3;
}
.as-sub {
  display: block;
  font-size: 13px; color: #6b6a65;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.as-dot { margin: 0 6px; color: #b4b2a9; }

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

.as-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;
}
.as-chip__label { opacity: .7; font-weight: 500; }
.as-chip--ok     { background: #e1f5ee; color: #0f6e56; }
.as-chip--warn   { background: #faeeda; color: #854f0b; }
.as-chip--danger { background: #fcebeb; color: #a32d2d; }
.as-chip--muted  { background: #f1efe8; color: #7d7c76; }

.as-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;
}
.as-details[open] .as-chev { transform: rotate(-135deg); }

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

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

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