*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: sans-serif;
}

/*Market*/
.market-wrap{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    max-width: 100%;
}

.market-widget {
  background: white;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  text-align: center;
  font-family: sans-serif;
  min-height: 81px;
  width: 100%;
  max-width: 100%;
}

.market-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2px;
  padding: 4px 6px;
  border-radius: 8px;
  transition: background-color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.market-header:hover {
  background-color: #e2e8f0;
}

.index-title {
  font-size: 22px;
  color: #0f172a;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  flex-shrink: 0; /* don't let title shrink */
  margin: 4px 0 6px;
}

/* Keep underline only under title */
.index-title::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  transform: translateX(0);
  width: 100%;
  height: 2px;
  background: #94a3b8;
  border-radius: 1px;
  opacity: 0.7;
}

.index-price {
  font-size: 20px;
  font-weight: 600;
  color: #0f172a;
}

.market-toggle svg {
  transition: transform 0.3s ease; /* ✅ smooth transition */
  /*transform-origin: center top;*/
}

.market-toggle svg.rotated {
  transform: rotateX(180deg); /* ✅ rotate when toggled */
}

.market-timestamp {
  font-size: 14px;
  color: #475569;
  text-align: center;
  font-style: italic;
  margin: 2px 0 0px;
}

.market-bottom {
  display: none;
  margin-top: 10px;
}
.market-bottom.open {
  display: block;
}

.market-stats {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-evenly;
  flex-wrap: wrap;
}


.market-stat .label {
  color: #475569;
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
}

.market-stat .value {
  font-weight: 600;
  font-size: 16px;
}