/* ============================================================
   Pool Deep-Dive Redesign Styles
   Prefix: dd- (deep-dive) to avoid collisions with custom.css
   ============================================================ */

/* ---- Pool Header Bar (two rows) ---- */
.dd-header {
  padding: 12px 0;
  border-bottom: 1px solid #21262d;
  margin-bottom: 20px;
}

.dd-header-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.dd-header-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #D97706;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.dd-header-pair {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f0f6fc;
  white-space: nowrap;
}

.dd-header-fee {
  font-size: 0.9rem;
  color: #8b949e;
  white-space: nowrap;
}

/* Badge base (non-clickable) */
.dd-header-badge {
  font-size: 0.8rem;
  color: #8b949e;
  background: rgba(139, 148, 158, 0.1);
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 2px 10px;
  white-space: nowrap;
}

/* Clickable badge links */
.dd-header-badge-link {
  font-size: 0.8rem;
  border-radius: 12px;
  padding: 2px 10px;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.dd-header-badge-link:hover {
  opacity: 0.8;
  text-decoration: none;
}

.dd-header-badge-dex {
  color: #58a6ff;
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.3);
}

.dd-header-badge-ds {
  color: #D97706;
  background: rgba(217, 119, 6, 0.1);
  border: 1px solid rgba(217, 119, 6, 0.3);
}

/* Address row */
.dd-header-address-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dd-header-address {
  font-size: 0.85rem;
  color: #8b949e;
  font-family: 'JetBrains Mono', monospace;
}

.dd-header-copy-btn {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  transition: color 0.15s;
}

.dd-header-copy-btn:hover {
  color: #d1d5db;
}

/* ---- Stats Grid (2-column: wide card + pool age) ---- */
.dd-stats-grid {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.dd-stat-card {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 14px 16px;
  min-width: 0;
}

.dd-stat-card-wide {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 14px 16px;
}

.dd-stat-card-wide-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.dd-stat-card-wide-top > div {
  flex: 1;
}

.dd-stat-label {
  color: #8b949e;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dd-stat-value {
  color: #f0f6fc;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}

.dd-stat-value.dd-stat-muted {
  color: #484f58;
  font-weight: 500;
}

/* TVL green color */
.dd-stat-card-wide #pool-tvl-display {
  color: #3fb950;
}

/* Responsive: stack on mobile */
@media (max-width: 768px) {
  .dd-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Pool State (collapsible) ---- */
.dd-pool-state {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.dd-pool-state summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dd-pool-state summary::-webkit-details-marker {
  display: none;
}

.dd-pool-state summary::before {
  content: '\25B6';
  font-size: 10px;
  transition: transform 0.15s ease;
  display: inline-block;
}

.dd-pool-state[open] summary::before {
  transform: rotate(90deg);
}

/* ---- Token Cards Grid ---- */
.dd-token-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .dd-token-cards {
    grid-template-columns: 1fr;
  }
}

/* ---- Section Label ---- */
.dd-section-label {
  color: #8b949e;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* ---- Period Selector ---- */
.dd-period-selector {
  margin-bottom: 24px;
}

.dd-period-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dd-period-label {
  color: #8b949e;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dd-period-radio .form-check {
  margin-right: 4px;
}

.dd-period-radio .form-check-label {
  color: #c9d1d9;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 12px;
  border: 1px solid #30363d;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dd-period-radio .form-check-input {
  display: none;
}

.dd-period-radio .form-check-input:checked + .form-check-label {
  background: rgba(236, 145, 23, 0.15);
  border-color: rgb(236, 145, 23);
  color: rgb(236, 145, 23);
}

/* ---- Generic Section Wrapper ---- */
.dd-section {
  background: #161b22;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.dd-section-heading {
  color: #f0f6fc;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.dd-section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---- Subsection (e.g. trade config, results) ---- */
.dd-subsection {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 16px;
  height: 100%;
}

.dd-subsection-label {
  color: #8b949e;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* ---- Input styling for deep dive ---- */
.dd-input {
  color: #f0f6fc !important;
  background-color: #161b22 !important;
  border: 1px solid #30363d !important;
  border-radius: 6px !important;
}

.dd-input:focus {
  border-color: rgb(236, 145, 23) !important;
  box-shadow: 0 0 0 2px rgba(236, 145, 23, 0.15) !important;
}

.dd-input-label {
  color: #c9d1d9 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

/* ---- Toggle Radio (TVL History / Composition) ---- */
.dd-toggle-radio .form-check {
  margin-right: 4px;
}

.dd-toggle-radio .form-check-label {
  color: #8b949e;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 12px;
  border: 1px solid #30363d;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dd-toggle-radio .form-check-input {
  display: none;
}

.dd-toggle-radio .form-check-input:checked + .form-check-label {
  background: rgba(88, 166, 255, 0.12);
  border-color: #58a6ff;
  color: #58a6ff;
}
