/*
 * Spot metal prices banner styling.
 *
 * Adapted from the old Vue component's <style scoped> block
 * (vue/metal-prices/src/components/MetalPricesShortcode.vue). Vue's
 * "scoped" attribute used to auto-tag every one of these selectors so they
 * could only ever match this component's own elements. Now that this is a
 * plain global stylesheet, every selector below is scoped by hand under
 * .o-metal-prices-container instead - without that, generic names like
 * .flex and .price would leak out and hit unrelated elements sitewide
 * (this theme uses Tailwind, whose own .flex utility is used everywhere).
 *
 * This is still the ONLY copy of the styling: the Elementor widget's
 * render() and the [spot-metal-prices] shortcode share the same PHP
 * markup, so the editor preview and the live frontend stay byte-identical.
 */

.o-metal-prices-container {
  background-color: #1a1a1a;
  border-top: 1px solid #b8975a;
  position: relative;
}

.o-metal-prices-container .o-metal-prices {
  display: flex;
  justify-content: space-between;
  box-sizing: border-box;
  overflow-y: hidden;
  overflow-x: auto;
  white-space: nowrap;
  gap: 4px;
  color: white;
  padding: 8px 0;
  margin-right: 64px;
  line-height: 1.5em;
  font-weight: 400;
}

@media (min-width: 1024px) {
  .o-metal-prices-container .o-metal-prices {
    margin-right: 0;
    max-width: 77.5rem;
    margin-left: auto;
    margin-right: auto;
  }
}

.o-metal-prices-container .price-wrapper {
  display: flex;
  margin-left: 4px;
  align-items: baseline;
}

.o-metal-prices-container .currency-unit {
  font-size: 0.75rem;
  font-weight: 300;
}

.o-metal-prices-container .price-name {
  font-weight: 700;
}

.o-metal-prices-container .price {
  font-weight: 600;
  margin-left: 2px;
}

.o-metal-prices-container .up-percentage {
  border: 1px solid #39dea8;
  color: #39dea8;
  margin-left: 2px;
  padding: 0 4px;
  border-radius: 12px;
}

.o-metal-prices-container .down-percentage {
  border: 1px solid #f8605f;
  color: #f8605f;
  margin-left: 2px;
  padding: 0 4px;
  border-radius: 12px;
}

.o-metal-prices-container .neutral-percentage {
  border: 1px solid #39dea8;
  color: #9ca3af;
  margin-left: 2px;
  padding: 0 4px;
  border-radius: 12px;
}

.o-metal-prices-container .flex {
  display: flex;
  gap: 4px;
  align-items: baseline;
}

.o-metal-prices-container .currency-swap {
  display: flex;
  align-items: center;
  background-color: #b8975a;
  color: black;
  text-decoration: underline;
  font-weight: 600;
  position: absolute;
  cursor: pointer;
  right: 0;
  top: 0;
  bottom: 0;
  padding: 0 16px;
  border: none;
  box-shadow: -7px 0 7px -3px #111;
}

@media (min-width: 1024px) {
  .o-metal-prices-container .currency-swap {
    position: relative;
    margin-top: 0;
    margin-bottom: 0;
  }
}

.o-metal-prices-container .arrow-icon {
  width: 9px;
  height: 9px;
  font-size: 9px;
  line-height: 1;
}
