.demo-container {
  align-items: stretch;
  padding: 24px;
}

.xlsx-viewer {
  width: min(100%, 480px);
  margin: 0 auto;
}

.xlsx-viewer__area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 280px;
  padding: 32px 20px;
  color: #2b7fe8;
  background: #fff;
  border: 2px dashed #a9c8ef;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.xlsx-viewer__area:hover,
.xlsx-viewer__area:focus-within,
.xlsx-viewer__area.is-dragover {
  background: #eef6ff;
  border-color: #2b7fe8;
}

.xlsx-viewer__area:focus-within {
  outline: 3px solid rgba(43, 127, 232, 0.28);
  outline-offset: 3px;
}

.xlsx-viewer__area.is-loading {
  opacity: 0.65;
  pointer-events: none;
}

.xlsx-viewer__icon {
  width: 34px;
  height: 34px;
}

.xlsx-viewer__text {
  max-width: 100%;
  color: #1a2332;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.xlsx-viewer__sub,
.xlsx-viewer__status,
.xlsx-viewer__count {
  max-width: 100%;
  color: #5a6a7a;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.xlsx-viewer__input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.xlsx-viewer__status {
  min-height: 20px;
  margin: 10px 0 0;
  text-align: center;
}

.xlsx-viewer__error {
  margin: 12px 0 0;
  padding: 12px 14px;
  color: #b42318;
  background: #fef3f2;
  border: 1px solid #fecdca;
  border-radius: 8px;
  font-size: 14px;
}

.xlsx-viewer__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.xlsx-viewer__file-name {
  max-width: 100%;
  margin: 0;
  color: #1a2332;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.xlsx-viewer__sheet-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #344256;
  font-size: 14px;
  font-weight: 700;
}

.xlsx-viewer__sheet-select {
  max-width: 260px;
  padding: 7px 10px;
  color: #1a2332;
  background: #fff;
  border: 1px solid #b8c4d1;
  border-radius: 6px;
  font: inherit;
}

.xlsx-viewer__sheet-select:focus {
  outline: 3px solid rgba(43, 127, 232, 0.28);
  outline-offset: 1px;
  border-color: #2b7fe8;
}

.xlsx-viewer__count {
  margin: 12px 0 8px;
  text-align: right;
}

.xlsx-viewer__scroll {
  max-height: 400px;
  overflow: auto;
  border: 1px solid #dce3eb;
  border-radius: 8px;
}

.xlsx-viewer__table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}

.xlsx-viewer__table th,
.xlsx-viewer__table td {
  max-width: 280px;
  padding: 10px 12px;
  overflow-wrap: anywhere;
  border-bottom: 1px solid #e7edf3;
  text-align: left;
  vertical-align: top;
}

.xlsx-viewer__table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #fff;
  background: #2b7fe8;
  font-weight: 700;
}

.xlsx-viewer__table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.xlsx-viewer__empty {
  margin: 0;
  padding: 24px;
  color: #5a6a7a;
  background: #f8fafc;
  border: 1px solid #dce3eb;
  border-radius: 8px;
  text-align: center;
}

.demo-controls {
  margin-top: 12px;
  text-align: right;
}

.reset-btn {
  padding: 6px 16px;
  color: #5a6a7a;
  background: #fff;
  border: 1.5px solid #d0d7e0;
  border-radius: 6px;
  cursor: pointer;
  font-family: sans-serif;
  font-size: 13px;
  transition: background 0.15s, border-color 0.15s;
}

.reset-btn:hover {
  background: #f4f6f9;
  border-color: #9aa5b4;
}

.reset-btn:focus-visible {
  outline: 3px solid rgba(43, 127, 232, 0.28);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .demo-container {
    padding: 16px;
  }

  .xlsx-viewer__area {
    min-height: 164px;
    padding: 26px 14px;
  }

  .xlsx-viewer__toolbar,
  .xlsx-viewer__sheet-label {
    align-items: stretch;
    flex-direction: column;
  }

  .xlsx-viewer__sheet-label {
    gap: 6px;
  }

  .xlsx-viewer__sheet-select {
    max-width: none;
  }

  .xlsx-viewer__count {
    text-align: left;
  }
}
