/* ─── Watts Finance: Company detail finance block ─── */

.finance-block {
  margin-top: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.finance-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.finance-block__ticker {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.finance-block__price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.finance-block__price {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.finance-block__currency {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-left: 2px;
}

.finance-block__change {
  font-size: 13px;
  font-weight: 600;
}

.finance-block__change--up {
  color: #00e676;
}

.finance-block__change--down {
  color: #ff5252;
}

.finance-block__change--flat {
  color: rgba(255, 255, 255, 0.5);
}

/* Sparkline */
.finance-block__sparkline {
  width: 100%;
  height: 40px;
  margin: 8px 0;
}

.finance-block__sparkline canvas {
  width: 100%;
  height: 100%;
}

/* Fundamentals grid */
.finance-block__fundamentals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  margin-top: 8px;
}

.finance-block__stat {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.finance-block__stat-label {
  color: rgba(255, 255, 255, 0.4);
}

.finance-block__stat-value {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

/* Loading state */
.finance-block__loading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  padding: 8px 0;
}

.finance-block__loading-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  animation: finance-pulse 1.2s infinite;
}

@keyframes finance-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ─── Watts Finance Dashboard Panel ─── */

.watts-finance-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  height: 100vh;
  background: rgba(10, 12, 20, 0.95);
  backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1000;
  display: none;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.watts-finance-panel.open {
  display: flex;
}

.watts-finance-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.watts-finance-panel__title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.watts-finance-panel__title::before {
  content: '⚡';
}

.watts-finance-panel__close {
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.watts-finance-panel__close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.watts-finance-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

/* Sector cards */
.sector-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}

.sector-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.sector-card__name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.sector-card__badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.sector-card__badge--up {
  background: rgba(0, 230, 118, 0.15);
  color: #00e676;
}

.sector-card__badge--down {
  background: rgba(255, 82, 82, 0.15);
  color: #ff5252;
}

.sector-card__stats {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

.sector-card__stat {
  font-size: 11px;
}

.sector-card__stat-label {
  color: rgba(255, 255, 255, 0.4);
  display: block;
  margin-bottom: 2px;
}

.sector-card__stat-value {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

/* Top movers */
.movers-section {
  margin-bottom: 20px;
}

.movers-section__title {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

.mover-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  margin-bottom: 4px;
}

.mover-row__name {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mover-row__ticker {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  margin-left: 8px;
  flex-shrink: 0;
}

.mover-row__change {
  font-size: 12px;
  font-weight: 600;
  margin-left: 12px;
  flex-shrink: 0;
}

/* Finance view toggle */
.finance-view-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}

.finance-view-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.finance-view-toggle.active {
  background: rgba(0, 230, 118, 0.12);
  border-color: rgba(0, 230, 118, 0.3);
  color: #00e676;
}

/* Scrollbar */
.watts-finance-panel__body::-webkit-scrollbar {
  width: 4px;
}

.watts-finance-panel__body::-webkit-scrollbar-track {
  background: transparent;
}

.watts-finance-panel__body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}
