/**
 * CEM Content Enhancer Styles
 *
 * Styles for enhanced content sections injected into articles.
 *
 * @package CryptoExchangeManager
 */

/* ===================================
   Assets Section
   =================================== */

.cem-enhanced-section {
  margin: 24px 0 32px 0;
  border: 1px solid var(--border-color, #2a2a2a);
  border-radius: 0;
  background: var(--bg-card, #1a1a1a);
  overflow: hidden;
  width: 100% !important;
  max-width: none !important;
  display: block !important;
}

/* Tabs */
.cem-assets-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-color, #2a2a2a);
  background: var(--bg-secondary, #111);
}

.cem-assets-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #a0a0a8;
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.cem-assets-tab:hover {
  color: var(--text-main, #fff);
  background: rgba(255, 255, 255, 0.03);
}

.cem-assets-tab.active {
  color: var(--color-primary, #00d4ff);
  border-bottom-color: var(--color-primary, #00d4ff);
  background: rgba(0, 212, 255, 0.05);
}

.cem-tab-count {
  font-size: 11px;
  margin-left: 4px;
}

/* Search */
.cem-assets-search {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color, #2a2a2a);
}

.cem-assets-search-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color, #2a2a2a);
  border-radius: 0;
  background: var(--bg-secondary, #111);
  color: var(--text-main, #fff);
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.cem-assets-search-input:focus {
  border-color: var(--color-primary, #00d4ff);
}

.cem-assets-search-input::placeholder {
  color: var(--text-muted, #666);
}

/* Quote Filters */
.cem-assets-quote-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color, #2a2a2a);
  background: var(--bg-secondary, #111);
}

.cem-quote-filter {
  padding: 6px 12px;
  border: 1px solid var(--border-color, #2a2a2a);
  border-radius: 0;
  background: transparent;
  color: var(--text-muted, #888);
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
}

.cem-quote-filter:hover {
  color: var(--text-main, #fff);
  border-color: var(--text-muted, #666);
}

.cem-quote-filter.active {
  color: var(--color-primary, #00d4ff);
  border-color: var(--color-primary, #00d4ff);
  background: rgba(0, 212, 255, 0.1);
}

/* Table Container */
.cem-assets-table-container {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: auto;
}

/* Custom scrollbar */
.cem-assets-table-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.cem-assets-table-container::-webkit-scrollbar-track {
  background: var(--bg-secondary, #111);
}

.cem-assets-table-container::-webkit-scrollbar-thumb {
  background: var(--border-color, #333);
  border-radius: 0;
}

.cem-assets-table-container::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted, #555);
}

/* Table */
.cem-assets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
  display: table !important;
  max-width: none !important;
}

.cem-assets-table thead {
  position: sticky;
  top: 0;
  background: var(--bg-card, #1a1a1a);
  z-index: 1;
}

.cem-assets-table th {
  padding: 12px 16px;
  text-align: left;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color, #2a2a2a);
  white-space: nowrap;
}

/* Column widths - 3 columns */
.cem-assets-table th:nth-child(1),
.cem-assets-table td:nth-child(1) {
  width: 40%;
}

.cem-assets-table th:nth-child(2),
.cem-assets-table td:nth-child(2) {
  width: 30%;
}

.cem-assets-table th:nth-child(3),
.cem-assets-table td:nth-child(3) {
  width: 30%;
}

.cem-assets-table th:last-child,
.cem-assets-table td:last-child {
  text-align: right;
}

.cem-assets-table tbody tr {
  transition: background 0.15s ease;
}

.cem-assets-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.cem-assets-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color, #2a2a2a);
  color: var(--text-main, #fff);
  white-space: nowrap;
}

.cem-assets-table tbody tr:last-child td {
  border-bottom: none;
}

.cem-pair-cell {
  font-weight: 600;
  font-family: var(--font-mono, monospace);
}

/* Trust Score Colors */
.cem-trust-green {
  color: var(--color-success, #00c853);
}

.cem-trust-yellow {
  color: var(--color-warning, #ffc107);
}

.cem-trust-red {
  color: var(--color-danger, #ff5252);
}

.cem-trust-gray {
  color: var(--text-muted, #666);
}

/* Trade Link */
.cem-assets-table a {
  color: var(--color-primary, #00d4ff);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: opacity 0.2s ease;
}

.cem-assets-table a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Loading State */
.cem-assets-loading {
  padding: 48px 16px;
  text-align: center;
  color: var(--text-muted, #888);
  font-family: var(--font-mono, monospace);
  font-size: 13px;
}

/* Empty State */
.cem-assets-empty {
  padding: 48px 16px;
  text-align: center;
  color: var(--text-muted, #888);
  font-family: var(--font-mono, monospace);
  font-size: 13px;
}

/* Load More */
.cem-assets-load-more {
  padding: 16px;
  text-align: center;
  border-top: 1px solid var(--border-color, #2a2a2a);
}

.cem-load-more-btn {
  padding: 10px 24px;
  border: 1px solid var(--color-primary, #00d4ff);
  border-radius: 0;
  background: transparent;
  color: var(--color-primary, #00d4ff);
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cem-load-more-btn:hover {
  background: var(--color-primary, #00d4ff);
  color: var(--bg-main, #000);
}

/* Footer */
.cem-assets-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color, #2a2a2a);
  background: var(--bg-secondary, #111);
}

.cem-assets-showing {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  color: var(--text-muted, #888);
}

/* ===================================
   Pros & Cons Section
   =================================== */

.cem-pros-cons-section {
  margin: 24px 0 32px 0;
  border: 1px solid var(--border-color, #2a2a2a);
  border-radius: 0;
  background: var(--bg-card, #1a1a1a);
  overflow: hidden;
  width: 100% !important;
  max-width: none !important;
  display: block !important;
}

/* Grid Layout */
.cem-pros-cons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.cem-pros-column {
  border-right: 1px solid var(--border-color, #2a2a2a);
}

.cem-cons-column {
  /* No border needed */
}

/* Headers */
.cem-pros-header,
.cem-cons-header {
  padding: 10px 14px;
  font-family: var(--font-mono, monospace);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid var(--border-color, #2a2a2a);
}

.cem-pros-header {
  background: rgba(0, 200, 83, 0.1);
  color: var(--color-success, #00c853);
}

.cem-cons-header {
  background: rgba(255, 82, 82, 0.1);
  color: var(--color-danger, #ff5252);
}

/* Lists */
.cem-pros-list,
.cem-cons-list {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.cem-pros-list li,
.cem-cons-list li {
  list-style: none !important;
  list-style-type: none !important;
  padding: 8px 14px 8px 36px !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--border-color, #2a2a2a);
  color: var(--text-main, #fff);
  font-size: 14px;
  line-height: 1.5;
  position: relative;
}

.cem-pros-list li:last-child,
.cem-cons-list li:last-child {
  border-bottom: none;
}

/* Remove any default bullets */
.cem-pros-list li::marker,
.cem-cons-list li::marker {
  content: none;
  display: none;
}

/* Checkmark for Pros */
.cem-pros-list li::before {
  content: '✓';
  position: absolute;
  left: 14px;
  top: 9px;
  color: var(--color-success, #00c853);
  font-weight: 700;
  font-size: 14px;
}

/* X mark for Cons */
.cem-cons-list li::before {
  content: '✗';
  position: absolute;
  left: 14px;
  top: 9px;
  color: var(--color-danger, #ff5252);
  font-weight: 700;
  font-size: 14px;
}

/* ===================================
   Trading Fees Section
   =================================== */

.cem-trading-fees-section {
  margin: 24px 0 32px 0;
  border: 1px solid var(--border-color, #2a2a2a);
  border-radius: 0;
  background: var(--bg-card, #1a1a1a);
  overflow-x: auto;
  overflow-y: hidden;
  width: 100% !important;
  max-width: none !important;
  display: block !important;
}

.cem-fees-header {
  padding: 12px 16px;
  font-family: var(--font-mono, monospace);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main, #fff);
  background: var(--bg-secondary, #111);
  border-bottom: 1px solid var(--border-color, #2a2a2a);
}

.cem-fees-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
}

.cem-fees-table thead {
  background: var(--bg-secondary, #111);
}

.cem-fees-table th {
  padding: 10px 16px;
  text-align: center;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #888);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color, #2a2a2a);
}

.cem-fees-table th:first-child {
  text-align: left;
  width: 40%;
}

.cem-fees-table th:nth-child(2),
.cem-fees-table th:nth-child(3) {
  width: 30%;
}

.cem-fees-table tbody tr {
  transition: background 0.15s ease;
}

.cem-fees-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.cem-fees-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color, #2a2a2a);
  text-align: center;
}

.cem-fees-table tbody tr:last-child td {
  border-bottom: none;
}

.cem-fees-market {
  text-align: left !important;
  font-weight: 600;
  color: var(--text-main, #fff);
  font-family: var(--font-mono, monospace);
}

.cem-fees-value {
  font-family: var(--font-mono, monospace);
  font-weight: 500;
  color: var(--color-primary, #ccff00);
}

.cem-fees-footer {
  padding: 10px 16px;
  background: var(--bg-secondary, #111);
  border-top: 1px solid var(--border-color, #2a2a2a);
  text-align: right;
}

.cem-fees-footer a {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: var(--text-muted, #888);
  text-decoration: none;
  transition: color 0.2s ease;
}

.cem-fees-footer a:hover {
  color: var(--color-primary, #ccff00);
}

/* ===================================
   Responsive
   =================================== */

@media (max-width: 768px) {
  /* Pros & Cons responsive - stack vertically */
  .cem-pros-cons-grid {
    grid-template-columns: 1fr;
  }

  .cem-pros-column {
    border-right: none;
    border-bottom: 1px solid var(--border-color, #2a2a2a);
  }

  .cem-pros-header,
  .cem-cons-header {
    padding: 12px 14px;
    font-size: 13px;
  }

  .cem-pros-list li,
  .cem-cons-list li {
    padding: 10px 14px 10px 38px !important;
    font-size: 13px;
  }

  .cem-pros-list li::before,
  .cem-cons-list li::before {
    left: 14px;
    top: 10px;
  }

  /* Assets responsive */
  .cem-assets-tabs {
    flex-direction: column;
  }

  .cem-assets-tab {
    border-bottom: none;
    border-left: 2px solid transparent;
  }

  .cem-assets-tab.active {
    border-bottom: none;
    border-left-color: var(--color-primary, #00d4ff);
  }

  .cem-assets-table th,
  .cem-assets-table td {
    padding: 8px 12px;
    font-size: 12px;
  }

  .cem-assets-table-container {
    max-height: 350px;
  }

  .cem-assets-quote-filters {
    gap: 6px;
  }

  .cem-quote-filter {
    padding: 5px 10px;
    font-size: 10px;
  }

  /* Trading Fees responsive */
  .cem-trading-fees-section {
    overflow-x: auto;
  }

  .cem-fees-header {
    padding: 10px 14px;
    font-size: 13px;
  }

  .cem-fees-table {
    min-width: 280px;
  }

  .cem-fees-table th,
  .cem-fees-table td {
    padding: 10px 12px;
    font-size: 13px;
  }

  .cem-fees-table th {
    font-size: 10px;
  }

  .cem-fees-footer {
    padding: 8px 14px;
    text-align: center;
  }

  .cem-fees-footer a {
    font-size: 11px;
  }
}
