/* Universal Widget Styles */
.cp-widget-coin {
  background-color: #F7F5F9;
  color: #343434 !important;
  padding: 3px 9px;
  font-size: small;
  font-weight: 600;
  border-radius: 0;
  /* display: inline-flex; */
  margin-right: 4px;
  align-items: center;
  position: relative;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
  min-height: 24px;
}

/* Fix for link hover opacity affecting tooltip */
a.cp-widget-coin {
  opacity: 1;
}

a.cp-widget-coin:hover {
    opacity: 1 !important;
}

a.cp-widget-coin:hover .cp-tooltip {
  opacity: 1 !important;
}

.cp-widget-coin img {
  vertical-align: middle;
  max-width: 16px;
  max-height: 16px;
  margin-bottom: 0 !important;
  margin-right: 5px;
}

.cp-widget-coin > span {
  display: inline-flex;
  align-items: center;
}

/* Tooltip Styles */
.cp-tooltip {
  display: none; /* Start hidden, JS will control visibility */
  position: absolute;
  z-index: 1000;
  top: 100%;
  left: 0;
  width: 200px;
  margin-top: 5px;
  background-color: white;
  box-shadow: 0px 0px 13px 0px #00000040;
  border-radius: 6px;
  padding: 12px;
  text-align: left;
  /* Prevent inheriting opacity from parent element */
  will-change: opacity;
  isolation: isolate;
}

/* Ensure all tooltip contents don't inherit opacity */
.cp-tooltip * {
  opacity: 1 !important;
}

/* Remove this rule since we're now using JS to control visibility */
/* .cp-widget-coin:hover .cp-tooltip {
  visibility: visible;
  opacity: 1 !important;
} */

.cp-tooltip-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.cp-tooltip-header img {
  max-width: 24px;
  max-height: 24px;
  margin-right: 10px;
}

.cp-tooltip-name-label-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.cp-tooltip-coin-name {
  font-weight: 600;
  color: #343434;
  margin-right: 6px;
}

.cp-tooltip-presale-label {
  display: inline-block;
  font-size: 11px;
  font-weight: normal;
  padding: 2px 5px;
  border-radius: 4px;
  background-color: #dfdfdf;
  color: #444;
  letter-spacing: 0.5px;
  line-height: 1;
}

.cp-tooltip-coin-symbol {
  color: #737373;
  font-weight: 400;
}

.cp-tooltip-section {
  margin-bottom: 10px;
  white-space: normal;
}

.cp-tooltip-section-title {
  font-size: 12px;
  color: #737373;
  line-height: 11px;
  margin-bottom: 0;
}

.cp-tooltip-price {
  font-weight: 600;
  color: #000 !important;
  font-size: 14px;
}

.cp-tooltip-change {
  margin-left: 5px;
  color: #000 !important;
  font-size: 13px;
}

.cp-tooltip-volume {
  font-size: 14px;
}

.cp-tooltip-movement {
  width: 100%;
  height: 40px;
  margin-top: 5px;
  position: relative;
}

.cp-tooltip-movement svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  position: relative;
}

.cp-tooltip-movement-placeholder {
  width: 100%;
  height: 40px;
  background-color: #f3f3f3;
  margin-top: 5px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #737373;
}

/* Loading and Error States */
.cp-tooltip-loading,
.cp-tooltip-error {
  padding: 10px;
  text-align: center;
  font-size: 12px;
  color: #737373;
}

.cp-tooltip-error {
  color: #ef4546;
}

/* CTA Button Styles */
.cp-tooltip-cta {
  display: block !important;
  width: 100%;
  max-width: 100% !important;
  padding: 8px 12px;
  text-align: center;
  background-color: transparent;
  color: #A72E83 !important;
  border: 1px solid #E5C0DA;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  transition: background-color 0.2s, color 0.2s;
  margin-top: 5px;
  box-sizing: border-box;
}

.cp-tooltip-cta:hover {
  background-color: rgba(167, 46, 131, 0.05);
  text-decoration: none;
}

/* Secondary CTA Button Styles */
.cp-tooltip-cta-secondary {
  background-color: transparent !important;
  color: #555 !important;
  border: 1px solid #ddd;
  margin-top: 8px;
}

.cp-tooltip-cta-secondary:hover {
  background-color: rgba(0, 0, 0, 0.03) !important;
}

span.changered {
    background-color: #F7C9CF;
    padding: 5px;
    color: #DD1C36;
  }
  
  span.changegreen {
    background-color: #D2F9D3;
    padding: 5px;
    color: #348837;
  }
  
  span.changegreen i, span.changered i {
    transform: scaleX(1) scaleY(0.6) translate(0px, -4px);
  display: inline-block;
  }

/* Flex layout for volume and market cap display */
.cp-tooltip-flex-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.cp-tooltip-flex-column {
  flex: 1;
  min-width: 0; /* Prevent overflow */
}

.cp-tooltip-flex-column:first-child {
  margin-right: 15px;
}

/* 99BTC Style Overrides */
.cp-widget-99btc .cp-tooltip {
  /* No specific changes to tooltip container for now */
}

/* 99BTC widget symbol styling - black text, no underline */
.cp-widget-99btc {
  color: #000 !important;
  text-decoration: none !important;
}

.cp-widget-99btc:hover {
  text-decoration: none !important;
}

/* 99BTC Volume styling - label light grey not bold, value black */
.cp-99btc-volume-label {
  color: #999 !important;
  font-weight: normal !important;
}

.cp-99btc-volume-value {
  color: #000 !important;
  font-weight: 500 !important;
}

/* 99BTC CTA button styling - background #008000, text black bold, no border */
.cp-99btc-cta {
  background-color: #43e343 !important;
  color: #000 !important;
  border: none !important;
  font-weight: bold !important;
}

.cp-99btc-cta:hover {
  background-color: #006600 !important;
  color: #000 !important;
} 