/* ==========================================================================
   Researchers Filter Panel
   ========================================================================== */

.view-researchers .view-filters {
  margin-bottom: 48px;
  padding: 24px 32px;
  background-color: #f7f7f7;
  border: 1px solid #d6d6d6;
  border-radius: 4px;
}

/* Override shared exposed-form spacing from layout.css. */
.view-researchers form.views-exposed-form[data-drupal-selector*="researchers"] {
  margin: 0;
}

.view-researchers
form.views-exposed-form[data-drupal-selector*="researchers"]
.form--inline {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(320px, 1.4fr);
  align-items: end;
  column-gap: 24px;
  row-gap: 16px;
}

/* Remove spacing inherited from shared Views form styles. */
.view-researchers
form.views-exposed-form[data-drupal-selector*="researchers"]
.form-item {
  width: 100%;
  margin: 0;
}

/* Restore labels hidden by global theme styles. */
.view-researchers
form.views-exposed-form[data-drupal-selector*="researchers"]
label {
  position: static;
  display: block;
  width: auto;
  height: auto;
  margin: 0 0 8px;
  overflow: visible;
  clip: auto;
  white-space: normal;
  color: #54585a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Dropdowns */
.view-researchers
form.views-exposed-form[data-drupal-selector*="researchers"]
select.form-select {
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 0 44px 0 14px;
  background-color: #fff;
  border: 1px solid #b8b8b8;
  border-radius: 3px;
  color: #333;
  font-size: 16px;
  line-height: 1.25;
}

.view-researchers
form.views-exposed-form[data-drupal-selector*="researchers"]
select.form-select:hover {
  border-color: #8a8a8a;
}

.view-researchers
form.views-exposed-form[data-drupal-selector*="researchers"]
select.form-select:focus {
  border-color: #c8102e;
  outline: 2px solid transparent;
  box-shadow: 0 0 0 3px rgb(200 16 46 / 20%);
}

/* Actions beneath the dropdowns. */
.view-researchers
form.views-exposed-form[data-drupal-selector*="researchers"]
.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0;
}

/* Apply filters button */
.view-researchers
form.views-exposed-form[data-drupal-selector*="researchers"]
input.form-submit:not([data-drupal-selector^="edit-reset"]) {
  width: auto;
  height: 42px;
  min-height: 42px;
  margin: 0;
  padding: 0 24px;
  background-color: #c8102e;
  border: 1px solid #c8102e;
  border-radius: 4px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.view-researchers
form.views-exposed-form[data-drupal-selector*="researchers"]
input.form-submit:not([data-drupal-selector^="edit-reset"]):hover {
  background-color: #960c22;
  border-color: #960c22;
}

.view-researchers
form.views-exposed-form[data-drupal-selector*="researchers"]
input.form-submit:not([data-drupal-selector^="edit-reset"]):focus-visible {
  background-color: #960c22;
  border-color: #960c22;
  outline: 3px solid rgb(200 16 46 / 25%);
  outline-offset: 2px;
  box-shadow: none;
}

/* Clear all secondary action */
.view-researchers
form.views-exposed-form[data-drupal-selector*="researchers"]
input[data-drupal-selector^="edit-reset"] {
  width: auto;
  height: auto;
  min-height: 0;
  margin: 1px 0 0;
  padding: 4px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #c8102e;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.25;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.view-researchers
form.views-exposed-form[data-drupal-selector*="researchers"]
input[data-drupal-selector^="edit-reset"]:hover {
  background: transparent;
  color: #960c22;
  text-decoration-thickness: 2px;
}

.view-researchers
form.views-exposed-form[data-drupal-selector*="researchers"]
input[data-drupal-selector^="edit-reset"]:focus-visible {
  background: transparent;
  color: #960c22;
  outline: 2px solid #c8102e;
  outline-offset: 4px;
  box-shadow: none;
}

/* ==========================================================================
   Researchers View Ordering and Results Count
   ========================================================================== */

.view-researchers {
  display: flex;
  flex-direction: column;
}

.view-researchers .view-header {
  order: 1;
}

.view-researchers .view-filters {
  order: 2;
}

.view-researchers .view-footer {
  order: 3;
  margin: 0 0 36px;
  color: #54585a;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.view-researchers .view-content {
  order: 4;
}

.view-researchers .pager {
  order: 5;
}

/* ==========================================================================
   Researchers Grid Layout
   ========================================================================== */

/*
 * Use three wide content columns with the spacing shown in the mockup.
 * The wider card area gives researcher information more visual weight
 * than the supporting headshot.
 */
.view-researchers .view-content {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  column-gap: 70px;
  row-gap: 70px;
  align-items: start;
  justify-items: start;
  width: 100%;
  margin-top: 0;
  margin-bottom: 48px;
}

.view-researchers .view-content .views-row {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 340px;
  margin: 0;
}

/* Remove spacing inherited from shared grid field styles. */
.view-researchers .view-content .views-field {
  margin: 0;
}

/* ==========================================================================
   Researcher Card Image
   ========================================================================== */

/*
 * Keep the headshot visually secondary so the researcher name,
 * department, and research areas remain the primary focus.
 */
.view-researchers .views-field-field-faculty-image-link {
  margin-bottom: 10px;
}

.view-researchers
.views-field-field-faculty-image-link
.field-content,
.view-researchers
.views-field-field-faculty-image-link
a,
.view-researchers
.views-field-field-faculty-image-link
img {
  width: 110px;
  height: 110px;
}

.view-researchers .views-field-field-faculty-image-link a {
  display: block;
  border-radius: 50%;
}

.view-researchers .views-field-field-faculty-image-link img {
  display: block;
  max-width: none;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

/* Visible keyboard focus around the full image. */
.view-researchers
.views-field-field-faculty-image-link
a:focus-visible {
  outline: 3px solid #c8102e;
  outline-offset: 4px;
}

/* ==========================================================================
   Researcher Card Typography
   ========================================================================== */

/* Researcher name */
.view-researchers .views-field-title {
  margin: 0 0 5px;
  font-family: "Source Sans 3", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
}

.view-researchers .views-field-title a {
  color: #c8102e;
  font-size: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.view-researchers .views-field-title a:hover {
  color: #960c22;
  text-decoration-thickness: 2px;
}

.view-researchers .views-field-title a:focus-visible {
  border-radius: 2px;
  outline: 3px solid rgb(200 16 46 / 30%);
  outline-offset: 3px;
}

/* Department or college */
.view-researchers .views-field-field-affiliation {
  margin: 0 0 4px;
  color: #6b6f72;
  font-family: "Source Sans 3", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}

/*
 * Research areas receive slightly stronger typography so expertise
 * remains the primary informational focus of the directory card.
 */
.view-researchers .views-field-field-research-topics {
  margin: 0;
  color: #54585a;
  font-family: "Source Sans 3", sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   Responsive Filter Panel and Researcher Grid
   ========================================================================== */

@media only screen and (max-width: 1199px) {
  .view-researchers .view-content {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    column-gap: 48px;
    row-gap: 56px;
  }
}

@media only screen and (max-width: 900px) {
  .view-researchers
  form.views-exposed-form[data-drupal-selector*="researchers"]
  .form--inline {
    grid-template-columns: minmax(0, 1fr);
  }

  .view-researchers
  form.views-exposed-form[data-drupal-selector*="researchers"]
  .form-actions {
    grid-column: 1;
  }
}

@media only screen and (max-width: 767px) {
  .view-researchers .view-filters {
    margin-bottom: 32px;
    padding: 24px 20px;
  }

  .view-researchers
  form.views-exposed-form[data-drupal-selector*="researchers"]
  .form--inline {
    row-gap: 18px;
  }

  .view-researchers
  form.views-exposed-form[data-drupal-selector*="researchers"]
  .form-actions {
    flex-wrap: wrap;
    gap: 16px;
  }

  .view-researchers .view-footer {
    margin-bottom: 28px;
  }

  .view-researchers .view-content {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 48px;
  }

  .view-researchers .view-content .views-row {
    max-width: 100%;
  }

  .view-researchers
  .views-field-field-faculty-image-link
  .field-content,
  .view-researchers
  .views-field-field-faculty-image-link
  a,
  .view-researchers
  .views-field-field-faculty-image-link
  img {
    width: 100px;
    height: 100px;
  }
}

@media only screen and (max-width: 480px) {
  .view-researchers
  form.views-exposed-form[data-drupal-selector*="researchers"]
  .form-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .view-researchers
  form.views-exposed-form[data-drupal-selector*="researchers"]
  input.form-submit:not([data-drupal-selector^="edit-reset"]) {
    width: 100%;
  }
}
