/*
 * SPAC Research - News / DeSPAC & Trump feed cards
 *
 * Extracted from the inline <style> block in news-react.html so the markup
 * stays readable and these card styles can be cached and reused by other feed
 * pages. Loaded after base-page.css to preserve the original cascade order.
 */

.event-content-markdown p { margin-bottom: 0!important; }
.event-content-markdown ul { list-style: none !important; margin-left: 20px !important; padding-left: 0 !important; }
.event-content-markdown li { position: relative !important; padding-left: 6px !important; display: block !important; }
.event-content-markdown li::before { content: "•"; position: absolute !important; left: 0 !important; color: inherit !important; }
.collapsed-content { max-height: 4.2em; overflow: hidden; position: relative; }
.switch { position: relative; display: inline-block; width: 48px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--border-color, #ccc); transition: .4s; border-radius: 24px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: var(--bg-surface, white); transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #4caf50; }
input:checked + .slider:before { transform: translateX(24px); }
.feed-table td { border-top: none !important; padding: 0.5em; padding-bottom: 0; vertical-align: middle; font-size: 14px; }
.feed-table tr.groupBy { border-bottom: 1px solid var(--border-subtle, #eceeef); }
tr.groupBy td { padding-top: 30px !important; }
.news-card-cell { width: 25%; padding: 10px; }
.card { width: 100%; border-radius: 8px; overflow: hidden; border: 1px solid transparent; transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease; }
.card-inner { position: relative; width: 100%; height: 235px; overflow: hidden; }
.card-body { display: flex; flex-direction: column; justify-content: space-between; height: 100%; padding: 1.2em; }
.title-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.3em; }
.title-link { flex: 1; margin-right: 6px; text-decoration: none; color: inherit; }
.card-title { font-size: 15px; font-weight: 500; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; white-space: normal; line-height: 1.3em; max-height: 2.6em; }
.share-icon { color: inherit; text-decoration: none; font-size: 14px; margin-left: 0.3em; }
.news-date { font-size: 11px; color: var(--text-muted, #666); margin-bottom: 2em; display: block; }
.content-link { text-decoration: none !important; color: inherit !important; }
.content-text { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; white-space: normal; line-height: 1.5em; max-height: 4.5em; margin: 0; }
.news-meta-row { display: inline-flex; align-items: baseline; gap: 10px; margin-top: 8px; font-size: 12px; flex-wrap: wrap; }
.news-source { display: inline-block; background-color: var(--accent, #015477); color: white; padding: 6px 10px; border-radius: 999px; font-size: 11px; font-weight: 500; white-space: nowrap; margin-top: 8px; }
.news-category { background-color: var(--bg-surface-hover, #e0e0e0); color: var(--text-color, #333); padding: 2px 8px; margin-left: 1em; border-radius: 6px; font-weight: 400; font-size: 10px; line-height: 1.5; display: inline-block; }
.news-merger-target { color: var(--accent, #015477); font-weight: 600; font-size: 12px; font-family: sans-serif; line-height: 1.5; display: inline-block; text-decoration: none !important; }
.feed-content-title { color: var(--accent, #0275d8); }
.feed-content-box { background-color: var(--bg-surface-hover, #f5f5f5); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09); border-radius: 8px; }
[data-theme="dark"] .feed-content-box { background-color: var(--bg-surface-raised); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
[data-theme="dark"] .feed-content-title { color: var(--link-color); }
[data-theme="dark"] .news-category { background-color: var(--bg-surface-raised); color: var(--text-secondary); }
[data-theme="dark"] .news-source { background-color: var(--accent-light); color: var(--link-color); }
[data-theme="dark"] .news-merger-target { color: var(--link-color); }
[data-theme="dark"] .feed-table td { color: var(--text-color); }
[data-theme="dark"] .feed-table tr.groupBy { border-bottom-color: var(--border-color); }
.feed-table tbody tr:hover, .feed-table tbody tr:hover td { background-color: transparent !important; }
.feed-table .news-card-cell .card:hover { transform: translateY(-2px); border-color: var(--border-color, #d1d5db); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14); }
[data-theme="dark"] .feed-table .news-card-cell .card { background-color: var(--bg-surface); border-color: var(--border-subtle); }
[data-theme="dark"] .feed-table .news-card-cell .card:hover { background-color: var(--bg-surface-raised); border-color: rgba(88, 166, 255, 0.45); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.38); }
[data-theme="dark"] .title-link, [data-theme="dark"] .title-link .card-title { color: var(--text-color); }
[data-theme="dark"] .title-link:hover, [data-theme="dark"] .title-link:hover .card-title { color: #f3f6fb; }
[data-theme="dark"] .title-link:hover .card-title, [data-theme="dark"] .title-link:focus .card-title { text-decoration: underline; text-decoration-color: rgba(88, 166, 255, 0.65); text-underline-offset: 2px; }
[data-theme="dark"] .content-link, [data-theme="dark"] .content-text { color: var(--text-secondary) !important; }

/* Mobile / tablet: DeSPAC & Trump news cards stack one per row with tighter
   internal padding for a cleaner look. */
@media (max-width: 1024px) {
  .feed-table,
  .feed-table tbody,
  .feed-table tr { display: block; width: 100%; }
  .feed-table .news-card-cell { display: block; width: 100%; padding: 6px 0; }
  .feed-table .card-inner { height: auto; }
  .feed-table .card-body { padding: 0.85em; }
  .feed-table .title-row { margin-bottom: 0.2em; }
  .feed-table .news-date { margin-bottom: 0.6em; }
  .feed-table .news-meta-row { margin-top: 6px; }
  .feed-table .news-source { margin-top: 6px; }
}
