/* COGO Study Map — three native filters. Keep the label above the control. */
.cg-sm .cg-sm-sheet > .cg-sm-filters {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1.65fr);
  align-items: end;
  gap: 12px;
  padding: 13px 32px 14px;
}

.cg-sm .cg-sm-filters > label.cg-sm-field {
  position: relative;
  display: grid;
  grid-template: auto 44px / minmax(0, 1fr);
  align-items: stretch;
  justify-content: stretch;
  gap: 5px;
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.cg-sm .cg-sm-filters > .cg-sm-field > .cg-sm-field-label {
  position: static;
  display: block;
  margin: 0;
  padding: 0;
  color: var(--cg-ink-2);
  font: 600 12px/16px var(--cg-font);
  text-align: start;
}

.cg-sm .cg-sm-filters > .cg-sm-field > select[data-f] {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  height: 44px;
  margin: 0;
  padding: 0 34px 0 12px;
  border: 1px solid var(--cg-line);
  border-radius: 10px;
  background: var(--cg-surface);
  color: var(--cg-ink);
  font: 650 14px/normal var(--cg-font);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
}

.cg-sm .cg-sm-filters > .cg-sm-field.is-set > select[data-f] {
  border-color: var(--cg-ink-3);
}

@media (hover: hover) {
  .cg-sm .cg-sm-filters > .cg-sm-field:hover > select[data-f] {
    border-color: var(--cg-ink-2);
  }
}

/* The site also applies a global !important keyboard outline. Paint just this
   control's indicator inside its border so it never crosses another field. */
.cg-sm .cg-sm-filters > .cg-sm-field > select[data-f]:focus {
  border-color: var(--cg-blue);
  outline: 2px solid var(--cg-blue) !important;
  outline-offset: -2px !important;
  box-shadow: none !important;
}

.cg-sm .cg-sm-filters > .cg-sm-field > .cg-ic {
  position: absolute;
  width: 16px;
  height: 16px;
  top: auto;
  right: 12px;
  bottom: 14px;
  transform: none;
  pointer-events: none;
}

.cg-sm .cg-sm-filters > .cg-sm-meta {
  align-self: end;
  align-content: center;
  min-width: 0;
  min-height: 44px;
  margin: 0;
}

@media (max-width: 860px) {
  .cg-sm .cg-sm-sheet > .cg-sm-filters {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 10px;
    padding: 10px 16px 12px;
    overflow: visible;
  }
  .cg-sm .cg-sm-filters > .cg-sm-field > select[data-f] {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .cg-sm .cg-sm-sheet > .cg-sm-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 10px;
  }
  .cg-sm .cg-sm-filters > .cg-sm-field--wide {
    grid-column: 1 / -1;
  }
}

@media (forced-colors: active) {
  .cg-sm .cg-sm-filters > .cg-sm-field > select[data-f]:focus {
    outline-color: Highlight !important;
  }
}
