/* Certificates — search + manufacturer sidebar */
.certificates.js-certs-ux .certificates__title.page-title {
  margin: 0 0 24px;
}

.certs-search {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin: 0 0 24px;
  max-width: 720px;
}

.certs-search__wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.certs-search__input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 16px;
  border: 1px solid #E1E7F2;
  border-radius: 8px;
  font-size: 15px;
  color: #282D3C;
  background: #fff;
}

.certs-search__input:focus {
  outline: none;
  border-color: #2F6FED;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}

.certs-search__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.certs-search__clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #6B7385;
  font-size: 22px;
  line-height: 1;
  text-decoration: none;
}

.certs-search__clear:hover {
  background: #F0F3F8;
  color: #282D3C;
  text-decoration: none;
}

.certs-search__btn.btn {
  flex: 0 0 auto;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 48px;
  padding: 0 24px;
  border: 0;
  font-size: 17px;
  line-height: 125%;
  white-space: nowrap;
  background: #007BFA;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}

.certs-search__btn.btn .certs-search__btn-label,
.certs-search__btn.btn .certs-search__btn-loading {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}

.certs-search__btn.btn:hover,
.certs-search__btn.btn:focus,
.certs-search__btn.btn:active {
  background: rgba(0, 123, 250, 0.8);
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}

.certs-search__btn.btn:disabled {
  opacity: 0.85;
  cursor: wait;
}

.certs-search__btn-loading {
  display: none;
}

.certs-search.is-loading .certs-search__btn {
  pointer-events: none;
}

.certs-search.is-loading .certs-search__btn-label {
  display: none;
}

.certs-search.is-loading .certs-search__btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.certs-search.is-loading .certs-search__btn-loading::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: certs-spin .7s linear infinite;
}

.certs-search.is-loading .certs-search__input {
  cursor: wait;
}

@keyframes certs-spin {
  to { transform: rotate(360deg); }
}

.certs-mobile-filter {
  display: none;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  padding: 10px 14px;
  border: 1px solid #E1E7F2;
  border-radius: 8px;
  background: #fff;
  color: #282D3C;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.certs-mobile-filter img {
  width: 18px;
  height: 18px;
}

.certs-layout {
  align-items: flex-start;
}

.certs-side__title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: #282D3C;
}

.certs-side__selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px 10px 8px 12px;
  border-radius: 8px;
  background: #EEF3FF;
  color: #2F6FED;
}

.certs-side__selected-label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.certs-side__selected-clear {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #2F6FED;
  font-size: 20px;
  line-height: 1;
  text-decoration: none;
}

.certs-side__selected-clear:hover {
  background: #DDE8FF;
  text-decoration: none;
}

.certs-side__list {
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  border: 1px solid #E1E7F2;
  border-radius: 8px;
  background: #fff;
}

.certs-side__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid #F0F3F8;
  color: #282D3C;
  text-decoration: none;
  font-size: 14px;
  line-height: 18px;
}

.certs-side__list .certs-side__item:last-child {
  border-bottom: 0;
}

.certs-side__item:hover {
  background: #F7F9FC;
  text-decoration: none;
}

.certs-side__item.is-active {
  background: #EEF3FF;
  color: #2F6FED;
}

.certs-side__name {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  font-weight: 500;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.certs-side__count {
  flex-shrink: 0;
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 10px;
  background: #F0F3F8;
  color: #6B7385;
  font-size: 12px;
  text-align: center;
}

.certs-side__item.is-active .certs-side__count {
  background: #DDE8FF;
  color: #2F6FED;
}

.certs-main {
  flex: 1;
  min-width: 0;
}

.certs-main__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #E1E7F2;
}

.certs-main__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 600;
  color: #282D3C;
}

.certs-main__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #6B7385;
  font-size: 20px;
  line-height: 1;
  text-decoration: none;
  font-weight: 400;
}

.certs-main__clear:hover {
  background: #F0F3F8;
  color: #282D3C;
  text-decoration: none;
}

.certs-main__count {
  font-size: 13px;
  color: #9EA6B7;
  white-space: nowrap;
}

.certs-group {
  margin-bottom: 20px;
}

.certs-group__title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: #282D3C;
}

.certs-group__list {
  border: 1px solid #E1E7F2;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.certs-doc {
  display: grid;
  grid-template-columns: 36px 1fr auto 36px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #F0F3F8;
}

.certs-doc:last-child {
  border-bottom: 0;
}

.certs-doc__icon img {
  width: 28px;
  height: 28px;
  display: block;
}

.certs-doc__name {
  display: block;
  font-size: 14px;
  line-height: 18px;
  color: #282D3C;
  text-decoration: none;
  font-weight: 500;
}

.certs-doc__name:hover {
  color: #2F6FED;
  text-decoration: none;
}

.certs-doc__meta {
  margin-top: 2px;
  font-size: 12px;
  line-height: 16px;
  color: #9EA6B7;
}

.certs-doc__size {
  font-size: 12px;
  color: #9EA6B7;
  white-space: nowrap;
}

.certs-doc__dl {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
}

.certs-doc__dl:hover {
  background: #F5F7FB;
}

.certs-doc__dl img {
  width: 18px;
  height: 18px;
}

.certs-empty {
  padding: 48px 16px;
  text-align: center;
  color: #6B7385;
}

.certs-empty__title {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 600;
  color: #282D3C;
}

.certs-empty__text {
  margin-bottom: 16px;
  font-size: 14px;
}

.certs-empty a {
  color: #2F6FED;
}

/* Landing: brand cards instead of empty state */
.certs-landing__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
  color: #282D3C;
}

.certs-landing__text {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.45;
  color: #6B7385;
}

.certs-landing__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.certs-landing__card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 14px 14px;
  border: 1px solid #E1E7F2;
  border-radius: 8px;
  background: #fff;
  color: #282D3C;
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}

.certs-landing__card:hover {
  border-color: #2F6FED;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.1);
  text-decoration: none;
  color: #2F6FED;
}

.certs-landing__name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

.certs-landing__count {
  flex: 0 0 auto;
  min-width: 22px;
  padding: 2px 7px;
  border-radius: 10px;
  background: #F0F3F8;
  color: #6B7385;
  font-size: 12px;
  text-align: center;
}

.certs-landing__card:hover .certs-landing__count {
  background: #DDE8FF;
  color: #2F6FED;
}

.certs-side .filter__btn-first {
  margin-top: 16px;
}

.certs-side .filter__btn-first .btn {
  width: 100%;
}

/* Desktop: sticky sidebar below fixed header (header-space ≈ 154px) */
@media (min-width: 992px) {
  .certificates.js-certs-ux .filter.certs-side {
    position: sticky;
    top: 170px; /* under fixed .header__top + .header__bottom */
    align-self: flex-start;
    z-index: 1; /* below header (z-index 2/5) */
    background: #fff;
  }

  .certs-side__list {
    max-height: calc(100vh - 200px);
  }
}

/* Mobile / tablet */
@media (max-width: 991px) {
  .certificates.js-certs-ux .certificates__title.page-title {
    margin-bottom: 20px;
  }

  .certs-search {
    max-width: none;
    margin-bottom: 20px;
    flex-wrap: wrap;
  }

  .certs-search__wrap {
    flex: 1 1 100%;
  }

  .certs-search__btn {
    width: 100%;
  }

  .certs-mobile-filter {
    display: inline-flex;
  }

  .certs-side__list {
    max-height: none;
    text-align: left;
  }

  .certs-side .filter__header {
    margin-bottom: 12px;
  }

  .certs-side .filter__header .certs-side__title {
    margin: 0;
  }

  .certs-main__head {
    flex-wrap: wrap;
  }

  .certs-main__title {
    font-size: 18px;
  }

  .certs-landing__grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .certs-doc {
    grid-template-columns: 28px 1fr 32px;
    grid-template-rows: auto auto;
    gap: 6px 10px;
    padding: 12px;
  }

  .certs-doc__icon {
    grid-row: 1 / span 2;
  }

  .certs-doc__body {
    grid-column: 2;
    grid-row: 1;
  }

  .certs-doc__size {
    grid-column: 2;
    grid-row: 2;
  }

  .certs-doc__dl {
    grid-column: 3;
    grid-row: 1 / span 2;
  }

  .certs-empty {
    padding: 32px 8px;
  }
}

@media (max-width: 575px) {
  .certs-doc__name {
    font-size: 13px;
  }

  .certs-landing__grid {
    grid-template-columns: 1fr 1fr;
  }
}
