.asset-details-shell[hidden] {
  display: none;
}

.asset-details-shell {
  align-items: stretch;
  background: rgb(4 8 24 / 42%);
  display: flex;
  inset: 0;
  justify-content: flex-end;
  position: fixed;
  z-index: 1800;
}

.asset-details-dialog {
  background: #f8f9fd;
  box-shadow: -20px 0 54px rgb(15 23 42 / 18%);
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  outline: none;
  width: min(680px, 92vw);
}

.asset-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-block-end: 16px;
}

.asset-preview-actions button {
  min-height: 44px;
}

.asset-preview-section .media-preview-stage {
  border-radius: 8px;
}

.asset-preview-section .media-state-view {
  width: 100%;
  border: 0;
  color: #fff;
  background: transparent;
}

.asset-preview-section .media-state-body {
  color: #c9cede;
}

.asset-details-header {
  align-items: flex-start;
  background: #fff;
  border-bottom: 1px solid #e5e7f1;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 24px 28px 20px;
}

.asset-details-header h2,
.asset-details-section-heading h3 {
  color: #0b1029;
  letter-spacing: 0;
  margin: 4px 0 0;
}

.asset-details-header h2 {
  font-size: 22px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.asset-details-header p,
.asset-details-section-heading p {
  color: #5c6480;
  margin: 6px 0 0;
}

.asset-details-close {
  align-items: center;
  background: #f2f3f8;
  border: 1px solid #e1e3ec;
  border-radius: 6px;
  color: #1a2140;
  display: inline-flex;
  flex: 0 0 42px;
  font-size: 24px;
  height: 42px;
  justify-content: center;
  padding: 0;
  width: 42px;
}

.asset-details-tabs {
  background: #fff;
  border-bottom: 1px solid #e5e7f1;
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  padding: 0 28px;
  scrollbar-width: thin;
}

.asset-details-tabs button {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: #5c6480;
  flex: 0 0 auto;
  font-weight: 700;
  min-height: 48px;
  padding: 0 12px;
}

.asset-details-tabs button.active {
  border-bottom-color: #3c13d3;
  color: #2f0eb6;
}

.asset-details-notice {
  color: #59617a;
  margin: 0;
  min-height: 20px;
  padding: 12px 28px 0;
}

.asset-details-notice:empty {
  display: none;
}

.asset-details-notice[data-tone="error"] {
  color: #b42318;
}

.asset-details-notice[data-tone="warning"] {
  color: #9a6700;
}

.asset-details-notice[data-tone="success"] {
  color: #067647;
}

.asset-details-content {
  min-height: 0;
  overflow-y: auto;
  padding: 24px 28px calc(28px + env(safe-area-inset-bottom));
}

.asset-details-section {
  min-width: 0;
}

.asset-details-section-heading {
  border-bottom: 1px solid #e1e4ed;
  margin-bottom: 22px;
  padding-bottom: 18px;
}

.asset-details-section-heading h3 {
  font-size: 18px;
}

.asset-details-facts {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  overflow: hidden;
}

.asset-details-facts > div {
  background: #fff;
  border: 1px solid #e5e7f1;
  min-width: 0;
  padding: 15px 16px;
}

.asset-details-facts dt {
  color: #737b94;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 5px;
}

.asset-details-facts dd {
  color: #111735;
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}

.asset-details-open {
  overflow: hidden;
}

.asset-details-dialog button:focus-visible,
.asset-details-dialog input:focus-visible {
  outline: 3px solid rgb(64 24 220 / 28%);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .asset-details-dialog {
    height: 100dvh;
    width: 100%;
  }

  .asset-details-header {
    padding:
      calc(16px + env(safe-area-inset-top))
      18px
      16px;
  }

  .asset-details-header h2 {
    font-size: 19px;
  }

  .asset-details-tabs {
    padding: 0 14px;
  }

  .asset-details-tabs button {
    min-height: 46px;
  }

  .asset-details-notice {
    padding: 10px 18px 0;
  }

  .asset-details-content {
    padding: 20px 18px calc(24px + env(safe-area-inset-bottom));
  }

  .asset-details-facts {
    grid-template-columns: 1fr;
  }

  .asset-preview-actions button {
    flex: 1 1 140px;
  }
}
