/* CloudWatch Dashboard Builder: builds on the csp, cors and alarms tool.css. */

.dash-preview {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  grid-auto-rows: 16px;
  gap: 4px;
  padding: 8px;
  border: 1px solid #22324a;
  border-radius: 12px;
  background: #0b1424;
}
.dash-widget {
  border: 1px solid #2c3d57;
  border-radius: 6px;
  background: #101c30;
  padding: 6px 8px;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dash-widget strong {
  font-size: 0.72rem;
  font-weight: 600;
  color: #dbe5f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-widget span {
  font-size: 0.68rem;
  color: #8fa3bb;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-widget[data-type="text"] {
  background: transparent;
  border-style: dashed;
  justify-content: center;
}
.dash-widget[data-type="text"] span {
  display: none;
}
.dash-widget[data-type="alarm"] {
  border-color: rgba(255, 154, 168, 0.5);
}
.dash-spark {
  flex: 1;
  min-height: 0;
  position: relative;
  border-bottom: 1px solid #22324a;
}
.dash-spark i {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed #f3c969;
}
.dash-spark i.goal {
  border-top-color: var(--mint);
}
.dash-alarms {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  overflow: hidden;
  min-height: 0;
}
.dash-alarms b {
  font-size: 0.64rem;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(143, 163, 187, 0.18);
  color: #c4d2e2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-cli {
  white-space: pre;
  overflow-x: auto;
  max-width: 100%;
}
.dash-json summary {
  cursor: pointer;
  color: var(--mint);
  margin: 10px 0;
}
.dash-json pre {
  max-height: 420px;
  overflow: auto;
  white-space: pre;
}
@media (max-width: 560px) {
  .dash-preview {
    grid-auto-rows: 10px;
    gap: 3px;
    padding: 6px;
  }
  .dash-widget {
    padding: 3px 4px;
  }
  .dash-widget span {
    display: none;
  }
  .dash-widget strong {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.66rem;
    line-height: 1.25;
  }
  .dash-widget[data-type="text"] strong {
    -webkit-line-clamp: 1;
  }
  .dash-alarms b {
    font-size: 0.6rem;
  }
  .dash-widget[data-type="alarm"] strong {
    display: none;
  }
}
