/* Word SmartArt → HTML (test sahifasida) */

.sa-radial {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch; /* kataklar vertikal balandlashadi */
  justify-content: center;
  gap: 6px;
  margin: 4px 0;
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.sa-radial,
.sa-scroll-layout,
.sa-stack,
.sa-box,
.sa-scroll,
.sa-radial__side,
.sa-radial__center {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.sa-radial__side {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #9e9e9e;
  border-radius: 10px;
  background: #f5f5f5;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  height: auto;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sa-radial__center {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 34%;
  padding: 8px 10px;
  border: 1px solid #7a7a7a;
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  white-space: normal;
  height: auto;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sa-radial__arrow {
  flex: 0 0 auto;
  align-self: center;
  color: #2563eb;
  font-size: 18px;
  line-height: 1;
  user-select: none;
}

.sa-scroll-layout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 8px 0;
  flex-wrap: wrap;
}

.sa-scroll {
  flex: 1 1 45%;
  min-width: 140px;
  padding: 14px 16px;
  border: 2px solid #8b7355;
  border-radius: 18px;
  background: linear-gradient(135deg, #faf6ef 0%, #f3ebe0 100%);
  font-size: 14px;
  line-height: 1.5;
  font-style: italic;
  white-space: normal;
}

.sa-stack {
  flex: 1 1 45%;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sa-box {
  padding: 8px 12px;
  border: 1px solid #9e9e9e;
  border-radius: 10px;
  background: #f8f8ff;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
}

/* Uchta teng sinonim / teng tugun */
.sa-triple {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  margin: 4px 0;
  width: 100%;
}
.sa-triple .sa-box {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

/* Word cycle7 — uchburchak + leftRightArrow (3 ta ulanish) */
.sa-cycle {
  --sa-cycle-w: min(100%, 300px);
  position: relative;
  width: var(--sa-cycle-w);
  aspect-ratio: 1.15 / 1;
  margin: 10px auto;
}
.sa-cycle__node {
  position: absolute;
  z-index: 2;
  width: 42%;
  max-width: 130px;
  text-align: center;
  background: #f5f5f5;
  border-radius: 999px;
  padding: 8px 10px;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
}
.sa-cycle__node--top {
  left: 50%;
  top: 16%;
}
.sa-cycle__node--left {
  left: 18%;
  top: 78%;
}
.sa-cycle__node--right {
  left: 82%;
  top: 78%;
}

/* leftRightArrow stilidagi ikki uchli strelka */
.sa-cycle__link {
  position: absolute;
  z-index: 1;
  height: 3px;
  background: #2563eb;
  border-radius: 2px;
  pointer-events: none;
}
.sa-cycle__link::before,
.sa-cycle__link::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border-style: solid;
  transform: translateY(-50%);
}
.sa-cycle__link::before {
  left: -1px;
  border-width: 5px 8px 5px 0;
  border-color: transparent #2563eb transparent transparent;
}
.sa-cycle__link::after {
  right: -1px;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent #2563eb;
}

/* top ↔ left */
.sa-cycle__link--tl {
  width: 34%;
  left: 28%;
  top: 42%;
  transform: translate(-50%, -50%) rotate(-52deg);
  transform-origin: center;
}
/* top ↔ right */
.sa-cycle__link--tr {
  width: 34%;
  left: 72%;
  top: 42%;
  transform: translate(-50%, -50%) rotate(52deg);
  transform-origin: center;
}
/* left ↔ right */
.sa-cycle__link--lr {
  width: 38%;
  left: 50%;
  top: 78%;
  transform: translate(-50%, -50%);
}

/* Markaz so‘z + raqamlangan variantlar (list fallback) */
.sa-hub {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin: 6px 0;
  width: 100%;
}
.sa-hub__center {
  align-self: center;
  min-width: 88px;
  max-width: 60%;
  padding: 8px 14px;
  border: 1px solid #7a7a7a;
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}
.sa-hub__leaves {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.sa-hub__leaves .sa-box {
  text-align: center;
  background: #f5f5f5;
}

/* Word radial5 — drawing pozitsiyasi + rightArrow */
.sa-rhub {
  --sa-rhub-size: min(100%, 280px);
  position: relative;
  width: var(--sa-rhub-size);
  aspect-ratio: 1 / 1;
  margin: 8px auto;
}
.sa-rhub__center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  min-width: 72px;
  max-width: 42%;
  padding: 8px 12px;
  border: 1px solid #7a7a7a;
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.sa-rhub__leaf {
  position: absolute;
  width: 38%;
  max-width: 110px;
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
  background: #f5f5f5;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.sa-rhub__leaf--n { left: 50%; top: 12%; }
.sa-rhub__leaf--ne { left: 86%; top: 30%; }
.sa-rhub__leaf--se { left: 86%; top: 70%; }
.sa-rhub__leaf--s { left: 50%; top: 88%; }
.sa-rhub__leaf--sw { left: 14%; top: 70%; }
.sa-rhub__leaf--nw { left: 14%; top: 30%; }

.sa-rhub__arrow {
  position: absolute;
  z-index: 1;
  color: #2563eb;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  user-select: none;
  transform: translate(-50%, -50%);
}
.sa-rhub__arrow--n { left: 50%; top: 31%; transform: translate(-50%, -50%) rotate(-90deg); }
.sa-rhub__arrow--ne { left: 68%; top: 40%; transform: translate(-50%, -50%) rotate(-35deg); }
.sa-rhub__arrow--se { left: 68%; top: 60%; transform: translate(-50%, -50%) rotate(35deg); }
.sa-rhub__arrow--s { left: 50%; top: 69%; transform: translate(-50%, -50%) rotate(90deg); }
.sa-rhub__arrow--sw { left: 32%; top: 60%; transform: translate(-50%, -50%) rotate(145deg); }
.sa-rhub__arrow--nw { left: 32%; top: 40%; transform: translate(-50%, -50%) rotate(-145deg); }

/* Inline font size Word dan kelmasin — o‘ram bo‘lsin */
.sa-radial span[style] {
  font-size: inherit !important;
  font-family: inherit !important;
}

@media (max-width: 720px) {
  /* Gorizontal tartib saqlanadi; kataklar balandroq, so‘zlar qatorga o‘tadi */
  .sa-radial {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 4px;
    overflow: visible;
  }
  .sa-radial__arrow {
    transform: none;
    font-size: 14px;
    flex-shrink: 0;
  }
  .sa-radial__side,
  .sa-radial__center {
    flex: 1 1 0;
    width: auto;
    max-width: none;
    min-width: 0;
    padding: 8px 6px;
    font-size: 12px;
    line-height: 1.35;
    border-radius: 8px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .sa-radial__center {
    flex: 0.85 1 0;
    font-size: 12.5px;
    font-weight: 700;
  }

  .sa-scroll-layout {
    flex-direction: column;
    gap: 8px;
    margin: 6px 0;
    width: 100%;
  }
  .sa-scroll,
  .sa-stack {
    flex: none;
    width: 100%;
    min-width: 0;
  }
  .sa-scroll {
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.4;
    border-radius: 10px;
  }
  .sa-stack {
    gap: 6px;
  }
  .sa-box {
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.35;
    border-radius: 8px;
    text-align: left;
  }

  .sa-triple {
    gap: 4px;
  }
  .sa-triple .sa-box {
    padding: 8px 6px;
    font-size: 12px;
    text-align: center;
  }

  /* Telefon: cycle — to‘liq kenglik, qirqilmasin, markazlashgan */
  .sa-cycle {
    --sa-cycle-w: 100%;
    max-width: 100%;
    aspect-ratio: 1.22 / 1;
    margin: 6px 0;
  }
  .sa-cycle__node {
    width: 44%;
    max-width: none;
    font-size: 11.5px;
    line-height: 1.25;
    padding: 7px 6px;
    text-align: center !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    border-radius: 14px;
  }
  .sa-cycle__node--top {
    top: 14%;
  }
  .sa-cycle__node--left {
    left: 22%;
    top: 80%;
  }
  .sa-cycle__node--right {
    left: 78%;
    top: 80%;
  }
  .sa-cycle__link {
    height: 2.5px;
  }
  .sa-cycle__link--tl {
    width: 30%;
    left: 32%;
    top: 44%;
    transform: translate(-50%, -50%) rotate(-48deg);
  }
  .sa-cycle__link--tr {
    width: 30%;
    left: 68%;
    top: 44%;
    transform: translate(-50%, -50%) rotate(48deg);
  }
  .sa-cycle__link--lr {
    width: 32%;
    left: 50%;
    top: 80%;
  }
  .sa-cycle__link::before {
    border-width: 4px 7px 4px 0;
  }
  .sa-cycle__link::after {
    border-width: 4px 0 4px 7px;
  }

  .sa-hub__leaves {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sa-hub__center {
    font-size: 13px;
    padding: 8px 12px;
  }

  /* Telefon: radial — biroz ixcham, chetdan qirqilmasin */
  .sa-rhub {
    --sa-rhub-size: 100%;
    max-width: 100%;
    margin: 6px 0;
  }
  .sa-rhub__center {
    font-size: 12.5px;
    padding: 7px 10px;
    max-width: 46%;
    text-align: center !important;
  }
  .sa-rhub__leaf {
    width: 34%;
    max-width: none;
    font-size: 10.5px;
    line-height: 1.25;
    padding: 5px 5px;
    text-align: center !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    border-radius: 10px;
  }
  .sa-rhub__leaf--n { left: 50%; top: 11%; }
  .sa-rhub__leaf--ne { left: 84%; top: 30%; }
  .sa-rhub__leaf--se { left: 84%; top: 70%; }
  .sa-rhub__leaf--s { left: 50%; top: 89%; }
  .sa-rhub__leaf--sw { left: 16%; top: 70%; }
  .sa-rhub__leaf--nw { left: 16%; top: 30%; }
  .sa-rhub__arrow {
    font-size: 13px;
  }
  .sa-rhub__arrow--n { top: 30%; }
  .sa-rhub__arrow--ne { left: 67%; top: 39%; }
  .sa-rhub__arrow--se { left: 67%; top: 61%; }
  .sa-rhub__arrow--s { top: 70%; }
  .sa-rhub__arrow--sw { left: 33%; top: 61%; }
  .sa-rhub__arrow--nw { left: 33%; top: 39%; }
}

/* Juda tor ekranlar */
@media (max-width: 400px) {
  .sa-cycle {
    aspect-ratio: 1.28 / 1;
  }
  .sa-cycle__node {
    font-size: 11px;
    padding: 6px 5px;
    width: 46%;
  }
  .sa-cycle__node--left { left: 24%; }
  .sa-cycle__node--right { left: 76%; }

  .sa-rhub__leaf {
    font-size: 10px;
    width: 36%;
  }
  .sa-rhub__arrow {
    font-size: 12px;
  }
}

/* G‘azal bayt / misra / lug‘at */
.word-gazal {
  margin: 0.35rem 0;
}
.word-gazal__bayt {
  margin-bottom: 0.55rem;
}
.word-gazal__misra {
  display: block;
  line-height: 1.5;
  color: #1e293b;
}
.word-gazal__misra + .word-gazal__misra {
  margin-top: 0.15rem;
}
.word-gazal__lugat-title {
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
  font-weight: 800;
  color: #1e3a8a;
  font-size: 0.95rem;
}
.word-gazal__lugat {
  display: grid;
  gap: 0.2rem;
}
.word-gazal__lugat-item {
  font-size: 0.9rem;
  line-height: 1.4;
  color: #334155;
}
.word-special--smartart {
  margin-top: 0.5rem;
}
