/* ============================================
   EV News Display Styles - Enhanced Version
   Professional bullet-point design for equity research
   ============================================ */

/* Container */
.ev-news-container {
  max-width: 1000px;
  margin: 20px auto;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", sans-serif;
}

/* ============================================
   Filters Section
   ============================================ */
.ev-news-filters {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  padding: 20px;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-group label {
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.ev-news-select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  min-width: 150px;
  cursor: pointer;
  background: white;
  transition: border-color 0.2s;
}

.ev-news-select:hover {
  border-color: #999;
}

.ev-news-select:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.6;
}

.ev-news-btn {
  padding: 8px 20px;
  background: #0073aa;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  align-self: flex-end;
}

.ev-news-btn:hover:not(:disabled) {
  background: #005a87;
}

.ev-news-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* ============================================
   Translation Toggle Bar - NEW
   ============================================ */
.ev-news-translation-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  margin-bottom: 20px;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #0073aa;
}

.ev-news-translation-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.ev-news-translate-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #0073aa;
}

.ev-news-translate-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ev-news-translate-text:before {
  content: "🌐";
  font-size: 18px;
}

.ev-news-translation-status {
  font-size: 13px;
  color: #0073aa;
  font-weight: 500;
  padding: 4px 12px;
  background: #e6f4ff;
  border-radius: 4px;
  display: none;
  transition: all 0.3s ease;
}

.ev-news-translation-status:empty {
  display: none;
}

/* ============================================
   Results Section
   ============================================ */
.ev-news-results {
  background: white;
  border-radius: 6px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ev-news-loading {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 16px;
}

/* ============================================
   News List & Items - Enhanced
   ============================================ */
.ev-news-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* News Item Container - Enhanced with Card Style */
.ev-news-item {
  padding: 20px;
  background: #ffffff;
  border: 1px solid #e1e4e8;
  border-left: 4px solid #0073aa;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  animation: fadeIn 0.3s ease-out;
}

.ev-news-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

/* Header Section - NEW */
.ev-news-header {
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

/* Title Styling - Enhanced */
.ev-news-item-title {
  font-size: 18px;
  font-weight: 600;
  color: #0073aa;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.ev-news-item-title a {
  color: #0073aa;
  text-decoration: none;
  transition: color 0.2s ease;
}

.ev-news-item-title a:hover {
  color: #005a87;
  text-decoration: underline;
}

.external-icon {
  font-size: 13px;
  opacity: 0.7;
  margin-left: 4px;
  display: inline-block;
  vertical-align: middle;
}

/* Content Section */
.ev-news-item-content {
  font-size: 14px;
  color: #333;
  line-height: 1.6;
}

.ev-news-item-content p {
  margin: 10px 0;
  color: #586069;
  line-height: 1.7;
}

.ev-news-item-content p:first-child {
  margin-top: 0;
}

/* ============================================
   Bullet Points - NEW Professional Style
   ============================================ */
.ev-news-summary {
  margin-bottom: 16px;
}

.ev-news-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: #586069;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #e1e4e8;
}

.ev-news-bullets {
  list-style: none;
  padding-left: 0;
  margin: 0;
  background: #f6f8fa;
  padding: 16px 20px;
  border-radius: 4px;
  border-left: 3px solid #0073aa;
}

.ev-news-bullets li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  line-height: 1.6;
  color: #24292e;
  font-size: 14px;
}

.ev-news-bullets li:last-child {
  margin-bottom: 0;
}

.ev-news-bullets li:before {
  content: "●";
  position: absolute;
  left: 0;
  color: #0073aa;
  font-size: 10px;
  top: 5px;
  font-weight: bold;
}

/* Alternative: Use checkmarks for key points (add class "checkmark-style" to ul) */
.ev-news-bullets.checkmark-style li:before {
  content: "✓";
  color: #28a745;
  font-size: 14px;
  top: 2px;
}

/* ============================================
   Full Content Section - NEW Expandable
   ============================================ */
.ev-news-full-content {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e1e4e8;
  background: #fafbfc;
  padding: 16px;
  border-radius: 4px;
}

.ev-news-full-content h4 {
  font-size: 13px;
  font-weight: 600;
  color: #586069;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px 0;
}

.ev-news-full-content p {
  color: #586069;
  line-height: 1.7;
  margin-bottom: 12px;
  font-size: 14px;
}

.ev-news-full-content p:last-child {
  margin-bottom: 0;
}

/* ============================================
   Toggle Button - NEW Expand/Collapse
   ============================================ */
.ev-news-toggle-btn {
  background: #f6f8fa;
  border: 1px solid #d1d5da;
  color: #24292e;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}

.ev-news-toggle-btn:hover {
  background: #e1e4e8;
  border-color: #c1c5ca;
}

.ev-news-toggle-btn:active {
  background: #d1d5da;
}

.ev-news-toggle-btn.expanded {
  background: #0073aa;
  color: white;
  border-color: #0073aa;
}

.ev-news-toggle-btn.expanded:hover {
  background: #005a87;
  border-color: #005a87;
}

.toggle-icon {
  font-size: 10px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.ev-news-toggle-btn.expanded .toggle-icon {
  transform: rotate(180deg);
}

/* ============================================
   Footer Section - NEW Source Links
   ============================================ */
.ev-news-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e1e4e8;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ev-news-source-link {
  color: #0073aa;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}

.ev-news-source-link:hover {
  color: #005a87;
  text-decoration: underline;
}

.ev-news-source-link:after {
  content: "→";
  font-size: 14px;
}

/* ============================================
   Empty State
   ============================================ */
.ev-news-empty {
  text-align: center;
  padding: 40px;
  color: #999;
  font-size: 15px;
}

/* ============================================
   Pagination
   ============================================ */
.ev-news-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.ev-news-pagination-btn {
  padding: 8px 16px;
  background: #f6f8fa;
  border: 1px solid #d1d5da;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #24292e;
  transition: all 0.2s ease;
  font-family: inherit;
}

.ev-news-pagination-btn:hover:not(:disabled) {
  background: #e1e4e8;
  border-color: #c1c5ca;
}

.ev-news-pagination-btn:disabled {
  background: #fafbfc;
  border-color: #e1e4e8;
  color: #959da5;
  cursor: not-allowed;
  opacity: 0.6;
}

.ev-news-pagination-info {
  font-size: 14px;
  color: #586069;
  font-weight: 500;
}

/* ============================================
   Animations - NEW
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Utility Classes - NEW
   ============================================ */
.ev-news-badge {
  display: inline-block;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ev-news-badge.positive {
  background: #d4edda;
  color: #155724;
}

.ev-news-badge.negative {
  background: #f8d7da;
  color: #721c24;
}

.ev-news-badge.neutral {
  background: #d1ecf1;
  color: #0c5460;
}

/* Highlight Keywords - NEW */
.ev-news-highlight {
  background: #fff3cd;
  padding: 2px 4px;
  border-radius: 2px;
  font-weight: 500;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
  .ev-news-container {
    padding: 15px;
    margin: 10px;
  }

  .ev-news-filters {
    flex-direction: column;
    padding: 15px;
  }

  .filter-group {
    width: 100%;
  }

  .ev-news-select {
    min-width: 100%;
  }

  .ev-news-btn {
    width: 100%;
    align-self: stretch;
  }

  .ev-news-item {
    padding: 16px;
    border-left-width: 3px;
  }

  .ev-news-item-title {
    font-size: 16px;
  }

  .ev-news-bullets {
    padding: 12px 16px;
  }

  .ev-news-bullets li {
    font-size: 13px;
    padding-left: 18px;
  }

  .ev-news-item-content {
    font-size: 13px;
  }

  .ev-news-toggle-btn {
    width: 100%;
    justify-content: center;
  }

  .ev-news-footer {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .ev-news-pagination {
    flex-wrap: wrap;
    gap: 8px;
  }

  .ev-news-pagination-btn {
    padding: 6px 12px;
    font-size: 13px;
  }

  .ev-news-translation-bar {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .ev-news-translation-status {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .ev-news-item-title {
    font-size: 15px;
  }

  .ev-news-bullets li {
    font-size: 12px;
  }

  .ev-news-subtitle {
    font-size: 12px;
  }
}

/* ============================================
   Print Styles - NEW for Reports
   ============================================ */
@media print {
  .ev-news-filters,
  .ev-news-pagination,
  .ev-news-toggle-btn {
    display: none !important;
  }

  .ev-news-full-content {
    display: block !important;
  }

  .ev-news-item {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .ev-news-bullets {
    background: none;
  }
}

/* ============================================
   Dark Mode Support - Optional
   ============================================ */
@media (prefers-color-scheme: dark) {
  .ev-news-container {
    background: #1a1a1a;
  }

  .ev-news-filters,
  .ev-news-results {
    background: #2d2d2d;
  }

  .ev-news-item {
    background: #2d2d2d;
    border-color: #404040;
    color: #e1e1e1;
  }

  .ev-news-item-title,
  .ev-news-item-title a {
    color: #4da6ff;
  }

  .ev-news-bullets {
    background: #1a1a1a;
    border-left-color: #4da6ff;
  }

  .ev-news-bullets li {
    color: #e1e1e1;
  }

  .ev-news-bullets li:before {
    color: #4da6ff;
  }

  .ev-news-select {
    background: #2d2d2d;
    color: #e1e1e1;
    border-color: #404040;
  }

  .ev-news-toggle-btn {
    background: #1a1a1a;
    color: #e1e1e1;
    border-color: #404040;
  }

  .ev-news-toggle-btn:hover {
    background: #404040;
  }

  .ev-news-toggle-btn.expanded {
    background: #4da6ff;
    color: #1a1a1a;
  }

  .ev-news-full-content {
    background: #1a1a1a;
  }

  .ev-news-subtitle {
    color: #a0a0a0;
  }

  .ev-news-source-link {
    color: #4da6ff;
  }

  .ev-news-pagination-btn {
    background: #1a1a1a;
    color: #e1e1e1;
    border-color: #404040;
  }

  .ev-news-pagination-btn:hover:not(:disabled) {
    background: #404040;
  }
}
