.gk-smart-search-hero,
.gk-library,
.gk-search-page {
  margin: 26px 0;
  color: var(--gk-text, #f7f7f7);
}

.gk-smart-search-hero {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(420px, 1.2fr);
  align-items: end;
  gap: clamp(20px, 4vw, 52px);
  padding: clamp(22px, 4vw, 40px);
  background:
    radial-gradient(circle at 88% 12%, rgba(245, 183, 0, .12), transparent 36%),
    #15181e;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
}

.gk-smart-search-hero h2,
.gk-library-head h2,
.gk-search-page-head h2 {
  margin: 4px 0 8px;
  color: #f7f7f7;
  font-size: clamp(25px, 3.5vw, 38px);
  line-height: 1.08;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.gk-smart-search-hero p,
.gk-library-head p,
.gk-search-page-head p {
  max-width: 62ch;
  margin: 0;
  color: #aeb3bd;
}

.gk-smart-search-form {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: rgba(9, 11, 15, .72);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(3, 5, 9, .24);
}

.gk-search-input-wrap {
  position: relative;
}

.gk-search-input-wrap > .fas {
  position: absolute;
  top: 50%;
  left: 15px;
  z-index: 2;
  color: #f5b700;
  transform: translateY(-50%);
}

.gk-search-input-wrap input {
  width: 100%;
  min-height: 50px;
  padding: 11px 15px 11px 43px;
  color: #f7f7f7;
  background: #11141a;
  border: 1px solid #3a404b;
  border-radius: 9px;
}

.gk-search-input-wrap input:focus {
  outline: 2px solid #f5b700;
  outline-offset: 1px;
  border-color: #f5b700;
}

.gk-search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.gk-search-controls label {
  display: grid;
  gap: 4px;
  color: #aeb3bd;
  font-size: 11px;
  font-weight: 700;
}

.gk-search-controls select {
  min-height: 42px;
  color: #f7f7f7;
  background: #171a20;
  border: 1px solid #3a404b;
  border-radius: 8px;
}

.gk-search-controls button {
  min-height: 42px;
  padding: 10px 22px;
  color: #171717;
  font-weight: 800;
  cursor: pointer;
  background: #f5b700;
  border: 0;
  border-radius: 8px;
}

.gk-search-controls button:hover,
.gk-search-controls button:focus-visible {
  background: #ffd34f;
}

.gk-search-suggestions {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  z-index: 30;
  overflow: hidden;
  background: #171a20;
  border: 1px solid #3a404b;
  border-radius: 9px;
  box-shadow: 0 20px 46px rgba(0, 0, 0, .42);
}

.gk-search-suggestions a {
  display: block;
  padding: 11px 13px;
  color: #f3f4f6;
  text-decoration: none;
}

.gk-search-suggestions a + a {
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.gk-search-suggestions a:hover,
.gk-search-suggestions a:focus-visible,
.gk-search-suggestions a.is-active {
  color: #171717;
  background: #f5b700;
}

.gk-search-suggestions strong,
.gk-search-suggestions small {
  display: block;
}

.gk-search-suggestions small {
  margin-top: 2px;
  color: inherit;
  opacity: .72;
}

.gk-library-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.gk-library-count {
  min-width: 118px;
  color: #f5b700;
  font-size: 34px;
  line-height: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.gk-library-count span {
  display: block;
  margin-top: 5px;
  color: #aeb3bd;
  font-size: 11px;
  font-weight: 600;
}

.gk-library-search {
  position: relative;
  display: block;
}

.gk-library-search > .fas {
  position: absolute;
  top: 50%;
  left: 16px;
  color: #f5b700;
  transform: translateY(-50%);
}

.gk-library-search input {
  width: 100%;
  min-height: 48px;
  padding: 11px 16px 11px 44px;
  color: #f7f7f7;
  background: #15181e;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
}

.gk-library-filters,
.gk-popular-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 22px;
}

.gk-library-filters button,
.gk-popular-searches a {
  padding: 8px 12px;
  color: #d8dbe0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  background: #20242b;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 7px;
}

.gk-library-filters button:hover,
.gk-library-filters button:focus-visible,
.gk-library-filters button.is-active,
.gk-popular-searches a:hover,
.gk-popular-searches a:focus-visible {
  color: #171717;
  background: #f5b700;
  border-color: #f5b700;
}

.gk-library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.gk-file-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 15px;
  padding: 18px;
  background: #171a20;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 11px;
}

.gk-file-card[hidden],
.gk-library-empty[hidden],
.gk-search-suggestions[hidden] {
  display: none !important;
}

.gk-file-card:hover {
  border-color: rgba(245, 183, 0, .42);
  transform: translateY(-1px);
}

.gk-file-icon {
  display: grid;
  width: 58px;
  height: 66px;
  color: #f5b700;
  place-items: center;
  background: rgba(245, 183, 0, .09);
  border: 1px solid rgba(245, 183, 0, .22);
  border-radius: 9px;
}

.gk-file-icon .fas {
  margin-top: 8px;
  font-size: 25px;
}

.gk-file-icon small {
  align-self: start;
  color: #d3b34f;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}

.gk-file-category {
  color: #d3b34f;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.gk-file-card h3,
.gk-search-results h3 {
  margin: 4px 0 7px;
  color: #f7f7f7;
  font-size: 16px;
  line-height: 1.32;
  overflow-wrap: anywhere;
}

.gk-file-card p,
.gk-search-results p {
  margin: 0;
  color: #aeb3bd;
  font-size: 12px;
}

.gk-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.gk-file-actions a {
  color: #f5b700;
  font-size: 12px;
  font-weight: 750;
}

.gk-file-actions .gk-file-source {
  color: #c6cad2;
}

.gk-library-empty {
  margin-top: 18px;
  padding: 22px;
  color: #c9cdd4;
  text-align: center;
  background: #171a20;
  border: 1px dashed rgba(255, 255, 255, .18);
  border-radius: 10px;
}

.gk-search-page-head {
  margin-bottom: 22px;
}

.gk-search-page > .gk-smart-search-form {
  max-width: 900px;
}

.gk-popular-searches {
  align-items: center;
}

.gk-popular-searches > span {
  color: #aeb3bd;
  font-size: 12px;
  font-weight: 700;
}

.gk-search-summary {
  margin: 26px 0 12px;
  color: #c9cdd4;
}

.gk-search-summary strong {
  color: #f5b700;
  font-size: 22px;
}

.gk-search-results {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 11px;
}

.gk-search-results article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 13px;
  padding: 16px;
  background: #171a20;
}

.gk-search-results article + article {
  border-top: 1px solid rgba(255, 255, 255, .09);
}

.gk-search-result-icon {
  display: grid;
  width: 42px;
  height: 42px;
  color: #f5b700;
  place-items: center;
  background: rgba(245, 183, 0, .09);
  border-radius: 9px;
}

.gk-search-results h3 a {
  color: #f7f7f7;
  text-decoration: none;
}

.gk-search-results h3 a:hover,
.gk-search-results h3 a:focus-visible {
  color: #f5b700;
}

@media (max-width: 760px) {
  .gk-smart-search-hero,
  .gk-library-grid {
    grid-template-columns: 1fr;
  }

  .gk-library-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .gk-library-count {
    text-align: left;
  }

  .gk-library-filters,
  .gk-popular-searches {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .gk-library-filters button,
  .gk-popular-searches a {
    flex: 0 0 auto;
  }

  .gk-search-controls {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .gk-file-card,
  .gk-library-filters button,
  .gk-popular-searches a,
  .gk-search-controls button {
    transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s ease;
  }
}
