.lsw-downloads-page,
.lsw-downloads-page * {
  box-sizing: border-box;
}

.lsw-downloads-page {
  width: 100%;
  padding: 0;
  color: #1f2937;
}

.lsw-downloads-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.lsw-downloads-sidebar,
.lsw-downloads-main {
  background: #fff;
  border: 1px solid #e8ebf0;
  border-radius: 0 !important;
  min-width: 0;
}

.lsw-downloads-section-head {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #edf0f4;
}

.lsw-downloads-section-head h2 {
  margin: 0;
  color: #111827;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

.lsw-downloads-section-head p {
  margin: 3px 0 0;
  color: #8b95a5;
  font-size: 12px;
  line-height: 1.5;
}

.lsw-downloads-categories {
  padding: 8px 0;
}

.lsw-downloads-category {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  color: #4b5563;
  text-decoration: none !important;
  border-left: 2px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.lsw-downloads-category:hover {
  color: #1677ff;
  background: #f7f9fc;
}

.lsw-downloads-category.is-active {
  color: #1677ff;
  background: #f4f8ff;
  border-left-color: #1677ff;
  font-weight: 500;
}

.lsw-downloads-category__icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  flex: 0 0 18px;
  align-items: center;
  justify-content: center;
}

.lsw-downloads-category__icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.lsw-downloads-category__name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.lsw-downloads-category__count {
  min-width: 24px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  color: #6b7280;
  background: #f1f3f6;
  border-radius: 0 !important;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
}

.lsw-downloads-category.is-active .lsw-downloads-category__count {
  color: #1677ff;
  background: #eaf2ff;
}

.lsw-downloads-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.lsw-downloads-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.lsw-downloads-table th {
  height: 44px;
  padding: 10px 16px;
  color: #7b8493;
  background: #fafbfc;
  border-bottom: 1px solid #edf0f4;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  vertical-align: middle;
}

.lsw-downloads-table td {
  min-height: 58px;
  padding: 13px 16px;
  color: #5b6472;
  border-bottom: 1px solid #edf0f4;
  font-size: 13px;
  line-height: 1.5;
  vertical-align: middle;
}

.lsw-downloads-table tbody tr:last-child td {
  border-bottom: 0;
}

.lsw-downloads-table tbody tr:not(.lsw-downloads-empty-row):hover td {
  background: #fbfcfe;
}

.lsw-downloads-table th:first-child,
.lsw-downloads-table td:first-child {
  width: 46%;
}

.lsw-downloads-table th:nth-child(2),
.lsw-downloads-table td:nth-child(2) {
  width: 24%;
}

.lsw-downloads-table th:nth-child(3),
.lsw-downloads-table td:nth-child(3) {
  width: 16%;
}

.lsw-downloads-table__action {
  width: 112px !important;
  text-align: right !important;
}

.lsw-downloads-file {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  color: #111827 !important;
  text-decoration: none !important;
  font-weight: 500;
}

.lsw-downloads-file:hover {
  color: #1677ff !important;
}

.lsw-downloads-file__icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: #f4f6f8;
  border: 1px solid #e7eaf0;
  border-radius: 0 !important;
}

.lsw-downloads-file__icon--1 {
  color: #b7791f;
  background: #fffaf0;
  border-color: #f6e4bd;
}

.lsw-downloads-file__icon--2 {
  color: #0f8a5f;
  background: #f1fbf6;
  border-color: #cfeedd;
}

.lsw-downloads-file__icon--3 {
  color: #53627a;
  background: #f5f7fa;
  border-color: #dde3eb;
}

.lsw-downloads-file__icon svg,
.lsw-downloads-button svg,
.lsw-downloads-alert__icon svg,
.lsw-downloads-empty svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.lsw-downloads-file__icon svg {
  width: 18px;
  height: 18px;
}

.lsw-downloads-file__title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lsw-downloads-button {
  min-width: 72px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  color: #1677ff !important;
  background: #fff;
  border: 1px solid #b9d4ff;
  border-radius: 0 !important;
  text-decoration: none !important;
  font-size: 13px;
  line-height: 30px;
}

.lsw-downloads-button:hover {
  color: #fff !important;
  background: #1677ff;
  border-color: #1677ff;
}

.lsw-downloads-button svg {
  width: 15px;
  height: 15px;
}

.lsw-downloads-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 14px;
  color: #a63d40;
  background: #fff7f7;
  border: 1px solid #f2c9cb;
  border-radius: 0 !important;
  font-size: 13px;
  line-height: 1.6;
}

.lsw-downloads-alert__icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  flex: 0 0 18px;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.lsw-downloads-alert__icon svg {
  width: 18px;
  height: 18px;
}

.lsw-downloads-alert__text {
  min-width: 0;
  flex: 1;
}

.lsw-downloads-empty {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
  text-align: center;
}

.lsw-downloads-empty svg {
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  color: #a8b0bc;
}

.lsw-downloads-empty strong {
  color: #4b5563;
  font-size: 14px;
  font-weight: 500;
}

.lsw-downloads-empty span {
  margin-top: 5px;
  color: #9aa3af;
  font-size: 12px;
}

@media (max-width: 991.98px) {
  .lsw-downloads-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .lsw-downloads-categories {
    display: flex;
    gap: 0;
    padding: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .lsw-downloads-category {
    min-width: max-content;
    min-height: 42px;
    border-left: 0;
    border-bottom: 2px solid transparent;
    padding: 8px 12px;
  }

  .lsw-downloads-category.is-active {
    border-bottom-color: #1677ff;
  }

  .lsw-downloads-category__icon {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .lsw-downloads-section-head {
    min-height: 60px;
    padding: 12px;
  }

  .lsw-downloads-section-head h2 {
    font-size: 15px;
  }

  .lsw-downloads-section-head p {
    font-size: 11px;
  }

  .lsw-downloads-table-wrap {
    overflow: visible;
  }

  .lsw-downloads-table,
  .lsw-downloads-table tbody,
  .lsw-downloads-table tr,
  .lsw-downloads-table td {
    display: block;
    width: 100% !important;
  }

  .lsw-downloads-table thead {
    display: none;
  }

  .lsw-downloads-table tbody tr {
    padding: 12px;
    border-bottom: 1px solid #edf0f4;
  }

  .lsw-downloads-table tbody tr:last-child {
    border-bottom: 0;
  }

  .lsw-downloads-table td {
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border: 0;
    text-align: right;
  }

  .lsw-downloads-table td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: #8a94a3;
    font-size: 12px;
    font-weight: 400;
    text-align: left;
  }

  .lsw-downloads-table td:first-child {
    display: block;
    padding-top: 0;
    padding-bottom: 10px;
  }

  .lsw-downloads-table td:first-child::before {
    display: none;
  }

  .lsw-downloads-file {
    width: 100%;
  }

  .lsw-downloads-file__title {
    white-space: normal;
    text-align: left;
  }

  .lsw-downloads-table__action {
    padding-top: 10px !important;
  }

  .lsw-downloads-button {
    min-width: 84px;
  }

  .lsw-downloads-empty-row {
    padding: 0 !important;
  }

  .lsw-downloads-empty-row td {
    display: block;
    padding: 0;
  }

  .lsw-downloads-empty-row td::before {
    display: none;
  }

  .lsw-downloads-empty {
    min-height: 180px;
  }

  .lsw-downloads-alert {
    margin-bottom: 12px;
    padding: 10px 12px;
  }
}
