/* CoinAdoptionScore - Main CSS File */
/* Version: 1.0.0 */
/* Description: Production styles for CoinAdoptionScore dashboard */

/* ========================================
   GLOBAL STYLES
======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #0d1421;
  color: #fff;
  line-height: 1.5;
}

/* ========================================
   HEADER STYLES
======================================== */

.header {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  padding: 2rem 1rem;
  text-align: center;
  border-bottom: 1px solid #1e293b;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(45deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.stats-overview {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #10b981;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
}

.disclaimer-header {
  text-align: center;
  margin-top: 1rem;
  color: #94a3b8;
  font-size: 0.8rem;
  font-style: italic;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

/* ========================================
   MAIN CONTAINER
======================================== */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* ========================================
   TABLE STYLES
======================================== */

.table-container {
  background: #1e293b;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: #334155;
}

th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #cbd5e1;
  border-bottom: 1px solid #475569;
}

/* Table column widths */
th:first-child { width: 20px; }     /* Star */
th:nth-child(2) { width: 30px; }   /* # */
th:nth-child(3) { width: 180px; }  /* Name */
th:nth-child(4) { width: 80px; }   /* Privacy */
th:nth-child(5) { width: 120px; }  /* Merchant Count */
th:nth-child(6) { width: 80px; }   /* Change 3 months */
th:nth-child(7) { width: 100px; }  /* Volume Est. */
th:nth-child(8) { width: 120px; }  /* Timeline */
th:nth-child(9) { width: 80px; }   /* CMC Rank */
th:nth-child(10) { width: 120px; } /* Market Cap */
th:nth-child(11) { width: 100px; } /* Value Score */
th:nth-child(12) { width: 140px; } /* Coin Adoption Score */

/* ========================================
   SORTABLE COLUMNS
======================================== */

.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
}

.sortable:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sort-arrow {
  margin-left: 0.5rem;
  color: #64748b;
  font-size: 0.75rem;
  transition: color 0.2s;
}

.sortable.asc .sort-arrow {
  color: #3b82f6;
}

.sortable.desc .sort-arrow {
  color: #3b82f6;
}

.sortable.asc .sort-arrow::after {
  content: ' ↑';
}

.sortable.desc .sort-arrow::after {
  content: ' ↓';
}

/* ========================================
   TABLE BODY STYLES
======================================== */

tbody tr {
  border-bottom: 1px solid #334155;
  transition: background-color 0.2s ease;
}

tbody tr:hover {
  background: #2d3748;
}

td {
  padding: 1rem;
  vertical-align: middle;
  height: 3rem;
}

.rank {
  font-weight: 600;
  color: #94a3b8;
}

/* ========================================
   CRYPTO INFO STYLES
======================================== */

.star-column {
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.star-column:hover {
  opacity: 1;
}

.star-icon {
  width: 16px;
  height: 16px;
}

.crypto-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.crypto-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.crypto-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.crypto-name {
  font-weight: 600;
  color: #fff;
}

.crypto-symbol {
  color: #94a3b8;
  font-size: 0.875rem;
  margin-left: 0.5rem;
}

.crypto-map-link {
  color: inherit;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.crypto-map-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ========================================
   PRIVACY COLUMN
======================================== */

.privacy-cell {
  text-align: center;
  font-size: 1.1rem;
  cursor: help;
}

/* ========================================
   MERCHANT COUNT & PROGRESS BARS
======================================== */

.merchant-count-cell {
  position: relative;
}

.merchant-count {
  font-weight: 700;
  font-size: 1.1rem;
  position: relative;
  z-index: 2;
}

.adoption-bar-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgb(83 159 255 / 83%), rgb(53 105 255 / 62%)); 
  /* catchy : linear-gradient(90deg, rgb(83 159 255 / 83%), rgb(53 105 255 / 62%)); */
  /* soft : linear-gradient(90deg, rgba(59, 130, 246, 0.3), rgba(29, 78, 216, 0.3)); */
  border-radius: 4px;
  z-index: 1;
  transition: width 0.8s ease;
}

/* ========================================
   COIN ADOPTION SCORE STYLES
======================================== */

.coin-adoption-score-cell {
  position: relative;
  height: 100%;
  min-height: 3rem;
  display: flex;
  align-items: center;
  padding: 0;
}

.coin-adoption-score-bar-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(229, 231, 235, 0.9), rgba(250, 253, 259, 1));
  border-radius: 4px;
  z-index: 1;
  transition: width 0.8s ease;
}

.coin-adoption-score-value {
  font-weight: 700;
  font-size: 1.1rem;
  position: relative;
  z-index: 2;
  color: #d97706;
  width: 100%;
  text-align: center;
  padding: 1rem;
}

/* ========================================
   STATUS COLORS
======================================== */

.positive { color: #10b981; }
.negative { color: #ef4444; }
.neutral { color: #94a3b8; }

.cmc-rank {
  font-weight: 600;
  color: #f59e0b;
}

.market-cap {
  font-weight: 600;
  color: #10b981;
}

.adoption-score {
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.875rem;
}

.score-excellent { background: #059669; color: white; }
.score-good { background: #0891b2; color: white; }
.score-average { background: #d97706; color: white; }
.score-poor { background: #dc2626; color: white; }

/* ========================================
   CHARTS & MISC
======================================== */

.chart-container {
  width: 80px;
  height: 40px;
  position: relative;
}

.mini-chart {
  width: 100%;
  height: 100%;
  border-radius: 4px;
}

.loading {
  color: #6b7280;
  font-style: italic;
}

.error {
  color: #ef4444;
}

/* ========================================
   FOOTER STYLES
======================================== */

.update-time {
  text-align: center;
  margin-top: 1rem;
  color: #6b7280;
  font-size: 0.875rem;
}

.disclaimer {
  text-align: center;
  margin-top: 0.5rem;
  color: #6b7280;
  font-size: 0.75rem;
  font-style: italic;
}

/* ========================================
   DOWNLOAD BUTTONS
======================================== */

.download-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.download-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.download-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.15);
}

.download-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
}

/* ========================================
   TOOLTIPS
======================================== */

.info-tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
  margin-left: 0.25rem;
}

.info-icon {
  width: 14px;
  height: 14px;
  background: #6b7280;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 10px;
  font-weight: bold;
}

.info-icon:hover {
  background: #3b82f6;
}

.tooltip-content {
  visibility: hidden;
  width: 280px;
  background-color: #1f2937;
  color: #fff;
  text-align: left;
  border-radius: 6px;
  padding: 0.75rem;
  position: absolute;
  z-index: 1000;
  top: 125%;
  left: -140px;
  opacity: 0;
  transition: opacity 0.3s;
  border: 1px solid #374151;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  font-size: 0.75rem;
  line-height: 1.4;
}

.tooltip-content::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent #1f2937 transparent;
}

.info-tooltip:hover .tooltip-content {
  visibility: visible;
  opacity: 1;
}

/* Privacy Column Tooltips - Instant Display */
.privacy-cell {
  position: relative;
  cursor: help;
}

.privacy-cell::before {
  content: attr(title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.1s ease-in-out;
  border: 1px solid #374151;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  margin-bottom: 5px;
}

.privacy-cell::after {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1f2937;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.1s ease-in-out;
  pointer-events: none;
  margin-bottom: -5px;
}

.privacy-cell:hover::before,
.privacy-cell:hover::after {
  opacity: 1;
  visibility: visible;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

@media (max-width: 768px) {
  .header h1 { font-size: 2rem; }
  .stats-overview { flex-direction: column; align-items: center; }
  .container { padding: 1rem; }
  th, td { padding: 0.75rem 0.5rem; font-size: 0.875rem; }
  .download-buttons { flex-direction: column; }
}

/* ========================================
   END OF STYLES
======================================== */