/* Replica-specific fixes for the static mirror. */

/* YouTube embed responsive wrapper */
.youtube-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: 1rem 0;
  border-radius: 4px;
}

.youtube-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* The live header search is rendered by Google CSE with a green submit
   button. The static fallback form needs the same treatment so the white
   magnifier icon stays visible. */
.usa-search__submit {
  background-color: #2e8367;
  border-color: #2e8367;
}

.usa-search__submit:hover,
.usa-search__submit:focus {
  background-color: #215c49;
  border-color: #215c49;
}

.usa-search__input {
  border-color: #2e8367;
}

/* Keep the small header search aligned with the live layout. */
.usa-header .usa-search--small {
  margin-bottom: 0;
}

/* The theme relies on this utility class, which is not present in the
   captured stylesheets, so the search label was rendering visibly. */
.usa-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Directory search: static snapshot toolbar, table and paging. */
.dir-results__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.dir-results__length,
.dir-results__search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
}

.dir-results__length label,
.dir-results__search label {
  font-weight: 700;
  white-space: nowrap;
  margin: 0;
}

.dir-results__length .usa-select {
  width: auto;
  margin: 0;
}

.dir-results__search .usa-input {
  margin: 0;
  min-width: 15rem;
}

.dir-results__note {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid #2e8367;
  background: #eef6f3;
  font-size: 0.95rem;
  line-height: 1.4;
}

.dir-results__table-scroll {
  overflow-x: auto;
}

/* The live DataTables configuration hides these three columns. */
#programs th:nth-child(7),
#programs td:nth-child(7),
#programs th:nth-child(8),
#programs td:nth-child(8),
#programs th:nth-child(9),
#programs td:nth-child(9) {
  display: none;
}

#programs {
  margin-top: 0;
}

#programs tbody td {
  vertical-align: top;
}

/* Until the local script runs, all rows are available without JavaScript. */
.dir-results--js #programs tbody tr {
  display: none;
}

.dir-results__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0 1.5rem;
}

.dir-results__info {
  font-size: 0.95rem;
  color: #1b1b1b;
}

.dir-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.dir-pagination--top {
  justify-content: center;
  padding: 0.5rem 0 0;
}

.dir-page-btn {
  min-width: 2rem;
  padding: 0.4rem 0.6rem;
  border: 0;
  background: transparent;
  color: #1b1b1b;
  font: inherit;
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;
}

.dir-page-btn:hover:not(:disabled),
.dir-page-btn:focus:not(:disabled) {
  background: #eef6f3;
}

.dir-page-btn.is-current {
  background: transparent;
  color: #2e8367;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.dir-page-btn--nav {
  min-width: 5.5rem;
  background: #2e8367;
  color: #fff;
  font-weight: 700;
}

.dir-page-btn--nav:hover:not(:disabled),
.dir-page-btn--nav:focus:not(:disabled) {
  background: #215c49;
}

.dir-page-btn--nav:disabled {
  background: #d9e2e0;
  color: #5c6b66;
}

.dir-page-btn:disabled {
  cursor: default;
}

.dir-page-btn:not(.dir-page-btn--nav):disabled {
  color: #767676;
}

@media (max-width: 40rem) {
  .dir-results__toolbar,
  .dir-results__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .dir-results__search {
    width: 100%;
    flex-wrap: wrap;
  }

  .dir-results__search .usa-input {
    flex: 1 1 12rem;
    min-width: 0;
    width: auto;
  }
}
