@import url("../../malangatana-ui.css");

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 2rem;
  font-family: var(--m-font);
  background: var(--m-bg);
  color: var(--m-text-main);
}

.component-page {
  max-width: 1040px;
  margin: 0 auto;
}

.component-header {
  margin-bottom: 1.5rem;
}

.component-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.component-desc {
  margin: 0;
  color: var(--m-text-muted);
}

.doc-section {
  padding-top: 0;
  border-top: none;
  margin-top: 0;
}

.doc-section-title,
.doc-section-desc {
  display: none;
}

.preview {
  border: 1px solid var(--m-border);
  border-radius: var(--m-radius-md);
  padding: 2rem;
  background: #fff;
  background-image: radial-gradient(var(--m-border) 1px, transparent 1px);
  background-size: 20px 20px;
  position: relative;
  margin-bottom: 0.75rem;
}

.preview-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--m-text-muted);
  margin-bottom: 8px;
}

.preview.no-bg {
  background-image: none;
  background: var(--m-surface);
}

.preview.dark {
  background: #111827;
  background-image: none;
}

.flex-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.flex-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 900px) {
  body {
    padding: 1rem;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}
