/* Demo-only wrapper. This class is not required when embedding the widget. */
.uta-demo-page {
  min-height: 100vh;
  margin: 0;
  background: #f2f4ff;
}

.uta-widget-demo-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.uta-technical-widget,
.uta-technical-widget * {
  box-sizing: border-box;
}

.uta-technical-widget {
  --uta-page-bg: transparent;
  --uta-text: #13151c;
  --uta-muted: #bdc1ce;
  --uta-blue: #1689f8;
  --uta-red: #ff4d54;

  position: relative;
  width: 100%;
  min-height: 0;
  padding: 16px 12px 8px;
  overflow: hidden;
  color: var(--uta-text);
  background: var(--uta-page-bg);
  font-family: inherit;
  direction: rtl;
}

.uta-technical-widget button {
  font: inherit;
}

.uta-technical-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.uta-technical-widget__header h2 {
  margin: 0;
  color: var(--uta-text);
  font-size: 18px;
  font-weight: 700;
  line-height: normal;
  white-space: nowrap;
}

.uta-market-select {
  position: relative;
  direction: rtl;
}

.uta-market-select__button {
  width: 132px;
  height: 40px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 18px;
  align-items: center;
  padding: 0 13px;
  color: #252933;
  background: transparent;
  border: 1px solid #d6dcf1;
  border-radius: 22px;
  cursor: pointer;
}

.uta-market-select__button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.uta-market-select__button span {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  line-height: normal;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uta-market-select__button svg {
  grid-column: 1;
  grid-row: 1;
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.uta-market-select__menu {
  position: absolute;
  z-index: 10;
  top: calc(100% + 7px);
  right: 0;
  width: 100%;
  max-height: 240px;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-5px);
  background: #f0f1ff;
  border: 1px solid #e2e6f3;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgb(41 51 93 / 12%);
  transition: 160ms ease;
}

.uta-market-select.uta-is-open .uta-market-select__menu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.uta-market-select__menu li {
  overflow: hidden;
  padding: 7px 10px;
  color: var(--uta-text);
  font-size: 13px;
  line-height: normal;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 9px;
  cursor: pointer;
}

.uta-market-select__menu li:hover,
.uta-market-select__menu li[aria-selected="true"] {
  color: var(--uta-blue);
  background: #f0f5ff;
}

.uta-gauge {
  position: relative;
  width: 100%;
  margin-top: 12px;
}

.uta-gauge__svg {
  display: block;
  width: 100%;
  overflow: visible;
  direction: ltr;
}

.uta-gauge__track,
.uta-gauge__value {
  fill: none;
  stroke-width: 7;
}

.uta-gauge__track {
  stroke: #e6e9f3;
}

.uta-gauge__value {
  stroke: url("#uta-gauge-gradient");
  stroke-linecap: butt;
  stroke-dasharray: 50 100;
  transition: stroke-dasharray 600ms cubic-bezier(.2, .8, .2, 1);
}

.uta-gauge__label {
  fill: var(--uta-muted);
  font-size: 13px;
  font-weight: 500;
  text-anchor: middle;
  dominant-baseline: middle;
}

.uta-gauge__label.uta-is-active {
  font-weight: 700;
}

.uta-gauge__label--buy.uta-is-active,
.uta-gauge__label--strong-buy.uta-is-active {
  fill: var(--uta-blue);
}

.uta-gauge__label--sell.uta-is-active,
.uta-gauge__label--strong-sell.uta-is-active {
  fill: var(--uta-red);
}

.uta-gauge__label--neutral.uta-is-active {
  fill: #6e7180;
}

.uta-gauge__needle {
  transform: rotate(0deg);
  transform-origin: 180px 180px;
  transition: transform 600ms cubic-bezier(.2, .8, .2, 1);
}

.uta-gauge__needle line {
  stroke: #08090b;
  stroke-width: 3;
  stroke-linecap: round;
}

.uta-gauge__needle circle {
  fill: #08090b;
}

.uta-gauge__result {
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  margin: 0;
  color: #6e7180;
  font-size: 19px;
  font-weight: 700;
  line-height: normal;
  text-align: center;
}

.uta-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 25px 16px 0;
  direction: rtl;
}

.uta-summary__item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.uta-summary__item strong {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 600;
}

.uta-summary__item span {
  margin-top: 5px;
  color: #555965;
  font-size: 15px;
  line-height: normal;
}

.uta-summary__item--buy strong {
  color: var(--uta-blue);
}

.uta-summary__item--neutral strong {
  color: #6e7180;
}

.uta-summary__item--sell strong {
  color: var(--uta-red);
}

.uta-widget-status {
  min-height: 22px;
  margin: 12px 0 0;
  color: #747987;
  font-size: 13px;
  line-height: normal;
  text-align: center;
}

.uta-widget-status:empty {
  display: none;
}

.uta-widget-status--error {
  color: #d93c45;
}

.uta-widget-loading {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  visibility: hidden;
  color: #596174;
  background: rgb(240 241 255 / 86%);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(2px);
  transition: opacity 150ms ease, visibility 150ms ease;
}

.uta-widget-loading.uta-is-visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.uta-widget-loading__spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #dce4f7;
  border-top-color: var(--uta-blue);
  border-radius: 50%;
  animation: uta-widget-spin 750ms linear infinite;
}

@keyframes uta-widget-spin {
  to {
    transform: rotate(1turn);
  }
}

@media (max-width: 520px) {
  .uta-widget-demo-shell {
    padding: 0;
  }

  .uta-technical-widget { min-height: 0; padding-inline: 12px; }

  .uta-technical-widget__header {
    gap: 12px;
  }

  .uta-technical-widget__header h2 {
    font-size: 18px;
  }

  .uta-market-select__button { width: 132px; }
}

@media (max-width: 390px) {
  .uta-technical-widget { padding-inline: 10px; }

  .uta-technical-widget__header h2 {
    font-size: 16px;
  }

  .uta-market-select__button {
    width: 126px;
    padding-inline: 11px;
  }
}
