/* Keep exact HA price colours over neutral grey in light mode. */
.current-price {
  --price-bar-colour:#cfd9c2;
  display:inline-flex;
  align-items:center;
  flex-wrap:wrap;
  gap:.35rem .5rem;
  box-sizing:border-box;
  max-width:100%;
  margin:.5rem 0 .75rem;
  padding:.45rem .75rem;
  border:1px solid var(--price-bar-colour);
  border-radius:.6rem;
  background:var(--price-label-background,#41464b);
  color:#f1f3f4;
  font-size:.9rem;
  font-weight:500;
  line-height:1.4;
  font-variant-numeric:tabular-nums;
}
.current-price-value {
  color:var(--price-bar-colour);
  font-size:1.2rem;
  font-weight:700;
  white-space:nowrap;
}
.current-price-period { font-size:.75rem; }

html[data-theme="dark"] .current-price { --price-label-background:#15231c; }

.chart-price-controls { display:flex; align-items:center; flex-wrap:wrap; gap:.35rem .65rem; margin:.5rem 0 .75rem; }
.chart-price-controls .current-price { margin:0; }
.chart-price-switch { display:inline-flex; border:1px solid var(--line); border-radius:.45rem; overflow:hidden; }
.chart-price-switch button { margin:0; padding:.3rem .5rem; border:0; border-radius:0; min-height:2rem; font-size:.8rem; }
.chart-price-switch button[aria-pressed="true"] { color:#fff; background:var(--green); }
.chart-price-switch button:focus-visible { outline:2px solid var(--ink); outline-offset:-3px; }
.chart-mobile-interval { display:none; }
@media (max-width:600px) {
  .chart-mobile-interval:not([hidden]) { display:inline-flex; }
  .chart-price-controls { gap:.4rem; }
  .chart-price-controls .current-price { flex:1 1 10rem; min-width:0; padding:.35rem .5rem; font-size:.8rem; }
  .chart-price-controls .current-price-value { font-size:1rem; }
}
html[data-theme="dark"] .chart-price-switch button[aria-pressed="true"] { background:#327b57; color:#fff; }
