@font-face {
  font-family: "Metropolis";
  src: url("../../../../uploads/2026/03/Metropolis-Regular.woff2") format("woff2"),
    url("../../../../uploads/2026/03/Metropolis-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Metropolis";
  src: url("../../../../uploads/2026/03/Metropolis-Medium.woff2") format("woff2"),
    url("../../../../uploads/2026/03/Metropolis-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Metropolis";
  src: url("../../../../uploads/2026/03/Metropolis-Bold.woff2") format("woff2"),
    url("../../../../uploads/2026/03/Metropolis-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.library-controls,
.accordion-list,
.empty-state,
.download-modal {
  --purple: #4e008b;
  --purple-soft: #f5edf9;
  --purple-border: #caa6ec;
  --ink: #061026;
  --muted: #7d8491;
  --line: #d8dde5;
  --line-soft: #e9edf3;
  --panel-gray: #eff0f1;
  --white: #fff;
  --radius: 8px;
  color: var(--ink);
  font-family: "Metropolis", Sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

.suntech-document-library,
.suntech-document-library *:not(.document-copy h4) {
  font-family: "Metropolis", Sans-serif !important;
}

.library-controls,
.library-controls *,
.accordion-list,
.accordion-list *,
.empty-state,
.download-modal,
.download-modal * {
  box-sizing: border-box;
}

.library-controls button,
.library-controls input,
.library-controls select {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.library-controls {
  margin-bottom: 14px;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 30px;
}

.search-wrap {
  position: relative;
  width: min(100%, 586px);
}

.search-wrap > svg {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-clear {
  position: absolute;
  top: 50%;
  right: 18px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(78, 0, 139, 0.08);
  color: var(--purple);
  cursor: pointer;
  transform: translateY(-50%);
}

.search-clear svg {
  display: block;
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  stroke-linecap: round;
}

.search-clear[hidden] {
  display: none;
}

#document-search {
  width: 100%;
  height: 62px;
  padding: 13px 55px 13px 55px;
  border: 1px solid rgba(78, 0, 139, 0.2);
  border-radius: 13px;
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 36px;
  color: #9f9b9b;
  outline: 0;
}

#document-search:focus,
.filter-select:focus,
.jump-nav button:focus,
.download-button:focus,
.accordion-header:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(78, 0, 139, 0.12);
  outline: 0;
}

.result-count {
  margin: 0;
  color: #8b909a;
  font-size: 18px;
  font-weight: 400;
}

.result-count strong {
  color: var(--purple);
  font-weight: 700;
}

.filter-row {
  display: flex;
  gap: 33px;
  margin-bottom: 50px;
}

.filter-dropdown-wrap {
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 277px;
}

.dropdown-label {
  color: #000000;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
}

.filter-select {
  height: 62px;
  padding: 0 20px 0 24px;
  border: 1px solid rgba(78, 0, 139, 0.2);
  border-radius: 13px;
  background: var(--white);
  color: #8b909a;
  appearance: none;
  background-image: url('data:image/svg+xml,<svg width="19" height="10" viewBox="0 0 19 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.16658 10C9.27603 10.0001 9.38442 9.9786 9.48552 9.9367C9.58663 9.8948 9.67846 9.83333 9.75574 9.75583L18.089 1.42254C18.4147 1.09692 18.4147 0.569632 18.089 0.244217C17.7634 -0.0811975 17.2361 -0.0814059 16.9107 0.244217L9.16658 7.98834L1.42245 0.244216C1.09683 -0.0814073 0.56954 -0.0814074 0.244125 0.244216C-0.0812893 0.569839 -0.0814973 1.09713 0.244125 1.42254L8.57742 9.75583C8.6547 9.83333 8.74653 9.8948 8.84764 9.9367C8.94875 9.9786 9.05713 10.0001 9.16658 10Z" fill="%23A29E97"/></svg>');
  background-position: calc(100% - 22px) 50%;
  background-size: 19px 10px;
  background-repeat: no-repeat;
  font-weight: 400 !important;
  font-size: 18px !important;
  line-height: 1 !important;
  cursor: pointer;
}

.jump-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  background: var(--panel-gray);
}

.jump-nav span {
  margin-right: 6px;
  color: #9f9b9b;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 1.6px;
  text-transform: none;
}

.jump-nav button {
  min-height: 24px;
  padding: 0 14px;
  border: 1px solid rgba(78, 0, 139, 0.22);
  border-radius: 7px;
  background: var(--white);
  color: var(--purple);
  cursor: pointer;
  font-weight: 400;
  font-size: 11px;
  line-height: 1;
  transition: all 0.3s;
}

.jump-nav button:hover {
  background: var(--purple);
  color: var(--white);
}

.empty-state {
  margin: 18px 0;
  padding: 24px;
  border: 1px dashed var(--purple-border);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.accordion-list {
  display: grid;
  gap: 15px;
}

.document-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--white);
  scroll-margin-top: 150px;
}

.document-group.is-open:first-child {
  border-color: rgba(78, 0, 139, 0.2);
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 62px;
  padding: 0 26px;
  border: 0;
  background: rgba(187, 202, 222, 0.3);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.header-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 16px;
  font-size: 20px;
  font-weight: 600;
  color: #4e008b;
}

.folder-icon,
.chevron-icon {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.folder-icon {
  width: 24px;
  height: 24px;
  color: var(--purple);
  flex: 0 0 auto;
}

.chevron-icon {
  width: 18px;
  height: 18px;
  color: #9ca0aa;
  transition: transform 0.2s ease;
}

.document-group:not(.is-open) .chevron-icon {
  transform: rotate(180deg);
}

.count-badge,
.featured-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  white-space: nowrap;
}

.count-badge {
  min-width: 29px;
  height: 19px;
  padding: 0 10px;
  background: #e8e8e8;
  color: #9f9b9b;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  margin-left: -10px;
}

.featured-badge {
  gap: 7px;
  height: 28px;
  padding: 0 17px;
  background: var(--purple);
  color: var(--white);
  font-size: 12px;
  font-weight: 400;
  text-transform: capitalize;
  line-height: 1;
}

.accordion-panel {
  background: var(--white);
}

.document-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 122px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line-soft);
  border-top: 1px solid #d6d9dd;
}

.document-row:last-child {
  border-bottom: 0;
}

.file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 9px;
  background: #ececed;
  color: var(--purple);
}

.file-icon svg {
  width: 15px;
  height: 18px;
}

.document-copy {
  min-width: 0;
}

.document-copy h4 {
  color: var(--purple);
  font-family: "Montserrat", "Metropolis", Arial, sans-serif;
}

.document-copy p {
  margin: 0 0 10px;
  color: #3d3d3d;
  font-size: 16px;
  line-height: 25px;
  font-weight: 400;
}

.badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.badges span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 19px;
  padding: 2px 11px;
  border-radius: 10px;
  background: #ececed;
  color: #b9b9b9;
  font-size: 11px;
  font-weight: 400;
  line-height: 1em;
  text-transform: uppercase;
}

.badges span:not(.pill) {
  cursor: default;
}

.badges .pill {
  background: rgba(78, 0, 139, 0.13);
  color: #4e008b;
  text-transform: none;
}

.type-guide {
  background: #dff4ee;
  color: #168a67;
}

.type-manual {
  background: #f2e3fa;
  color: #7a25b1;
}

.type-brochure {
  background: #dff0fb;
  color: #247fbb;
}

.type-reference {
  background: #f6f2eb;
  color: #7b6040;
}

.type-clinical {
  background: #fde8e4;
  color: #de4f4b;
}

.type-technical {
  background: #f4ecdf;
  color: #9a6a28;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 137px;
  padding: 17px 25px;
  border: 1px solid #4e008b;
  border-radius: 7px;
  color: var(--purple);
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.download-button svg {
  width: 16px;
  height: 16px;
}

.download-button:hover {
  background: var(--purple);
  color: var(--white);
}

.download-button:hover svg path {
  fill: var(--white);
}

body.download-modal-open {
  overflow: hidden;
}

.download-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.download-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.download-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 16, 38, 0.55);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.download-modal.is-open .download-modal__overlay {
  opacity: 1;
}

.download-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  padding: 30px;
  border: 1px solid rgba(78, 0, 139, 0.2);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(6, 16, 38, 0.22);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.download-modal.is-open .download-modal__dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.download-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(78, 0, 139, 0.08);
  color: var(--purple);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.download-modal h4 {
  margin: 0 40px 8px 0;
  color: var(--purple);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
}

.download-modal p {
  margin: 0 0 20px;
  color: #3d3d3d;
  font-size: 15px;
  line-height: 22px;
}

.download-modal__options {
  display: grid;
  gap: 10px;
}

.download-modal__options a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 12px 16px;
  border: 1px solid rgba(78, 0, 139, 0.2);
  border-radius: 9px;
  color: var(--purple);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.download-modal__options a:hover {
  background: var(--purple);
  color: var(--white);
}

@media (max-width: 900px) {
  .search-row,
  .filter-row {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .search-wrap,
  .filter-dropdown-wrap {
    width: 100%;
    max-width: 100%;
  }

  .filter-row {
    margin-bottom: 22px;
  }

  .header-title,
  .document-copy h4 {
    font-size: 16px;
  }

  .document-row {
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
    min-height: 0;
    padding: 18px 16px;
  }

  .jump-nav {
    align-items: stretch;
    padding: 12px;
  }

  .jump-nav span {
    flex: 0 0 100%;
  }

  .jump-nav button {
    flex: 1 1 calc(50% - 8px);
    padding-inline: 10px;
  }

  .accordion-header {
    min-height: 56px;
    padding: 0 14px;
  }

  .header-title {
    gap: 8px;
  }

  .header-title > span:nth-child(2) {
    overflow-wrap: anywhere;
  }

  .featured-badge {
    display: none;
  }

  .file-icon {
    width: 42px;
    height: 42px;
  }

  .download-button {
    grid-column: auto;
    width: 100%;
  }
}

@media (max-width: 767px) {
  #document-search {
    width: 100%;
    height: 48px;
    padding: 13px 30px 13px 35px;
    font-size: 15px;
    border-radius: 7px;
  }

  .search-wrap svg {
    position: absolute;
    top: 50%;
    width: 15px;
    height: 15px;
    transform: translateY(-50%);
    pointer-events: none;
  }

  .filter-select {
    height: 48px;
    font-size: 16px !important;
    background-size: 15px 7px;
    border-radius: 7px;
  }

  .download-button {
    padding: 10px 25px;
  }

  .result-count {
    font-size: 15px;
  }

  .count-badge {
    font-size: 12px;
    margin-left: 0;
  }

  .download-modal__dialog {
    padding: 24px 18px;
  }

  .download-modal h4 {
    font-size: 19px;
  }
}
