/* ETF Directory Specific Styles */
.etf-search-container {
  max-width: 800px;
  margin: 0 0 32px 0;
}
.etf-search-bar {
  width: 100%;
  padding: 18px 24px;
  font-size: 1.2rem;
  border: 2px solid #eaeaea;
  border-radius: 12px;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.etf-search-bar:focus {
  border-color: #0b6b52;
  box-shadow: 0 4px 20px rgba(11,107,82,0.15);
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 48px;
}
.filter-chip {
  padding: 8px 16px;
  background: #f5f5f5;
  border: 1px solid #eaeaea;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}
.filter-chip:hover {
  background: #0b6b52;
  color: #fff;
  border-color: #0b6b52;
}

.star-rating {
  color: #f5c518;
  font-size: 16px;
  margin-bottom: 8px;
  display: block;
}

.etf-table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  margin-bottom: 24px;
}
.etf-table {
  min-width: 1100px;
  width: max-content;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.etf-table th:first-child,
.etf-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    box-shadow: 4px 0 6px -6px rgba(0,0,0,.35);
}

.etf-table th:first-child {
    z-index: 3;
    background: #fafafa;
}
.etf-table th, .etf-table td {
  padding: 16px 20px;
  border-bottom: 1px solid #eaeaea;
}
.etf-table th {
  background: #fafafa;
  font-family: 'Roboto Mono', monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #666;
}
.etf-table tr:hover {
  background: #fdfdfd;
}
.etf-table td.ticker a {
  font-weight: 700;
  color: #0b6b52;
  text-decoration: none;
}
.etf-table td.ticker a:hover {
  text-decoration: underline;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  margin-bottom: 64px;
}
.page-btn {
  padding: 8px 16px;
  border: 1px solid #eaeaea;
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.2s ease;
}
.page-btn:hover {
  border-color: #ccc;
}
.page-btn.active {
  background: #0b6b52;
  color: #fff;
  border-color: #0b6b52;
}

/* Tabs for ETF Directory */
.tabs {
  display: flex;
  gap: 16px;
  border-bottom: 1px solid #eaeaea;
  margin-bottom: 24px;
  overflow-x: auto;
}
.tab-btn {
  background: none;
  border: none;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-family: inherit;
  white-space: nowrap;
}
.tab-btn:hover {
  color: #333;
}
.tab-btn.active {
  color: #0b6b52;
  border-bottom-color: #0b6b52;
}
.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
}

/* Explorer Layout Styles */
.explorer-layout {
  display: flex;
  margin-top: 20px;
  border-top: 1px solid #eaeaea;
  align-items: flex-start;
}

.sidebar-filters {
  width: 185px;
  border-right: 1px solid #eaeaea;
  padding: 20px 5px 20px 0;
  flex-shrink: 0;
}

.filter-group {
  margin-bottom: 24px;
}

.filter-group h4 {
  margin: 0 0 12px 0;
  font-size: 0.85rem;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'Roboto Mono', monospace;
}

.filter-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.95rem;
  cursor: pointer;
}

.filter-item input {
  margin-right: 10px;
  accent-color: #0b6b52;
}

.main-content {
  flex: 1;
  padding: 20px 0 20px 15px;
  min-width: 0;
}

.badge {
  background: #e6f4f1;
  color: #0b6b52;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  font-family: 'Roboto Mono', monospace;
}

.ter-slider {
  width: 100%;
  accent-color: #0b6b52;
}

/* Collapsible Filter Styles */
.filter-group details {
  margin-bottom: 8px;
}
.filter-group summary {
  font-size: 0.9rem;
  font-weight: 700;
  color: #333;
  cursor: pointer;
  padding: 8px 0;
  list-style: none;
  font-family: 'Roboto Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.filter-group summary::-webkit-details-marker {
  display: none;
}
.filter-group summary::after {
  content: '+';
  color: #888;
  font-size: 1.2rem;
  line-height: 1;
}
.filter-group details[open] summary::after {
  content: '−';
}
.filter-group .filter-list {
  padding-top: 8px;
  padding-bottom: 16px;
}

/* Sticky Filter Summary */
.filter-summary {
  position: sticky;
  top: 0;
  background: #fdfbf7;
  padding: 16px;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}
.filter-summary-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.filter-pill {
  background: #fff;
  border: 1px solid #ccc;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #444;
}
.clear-filters {
  font-size: 13px;
  color: #e53935;
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
}

/* Side Drawer Styles */
.side-drawer-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.side-drawer-overlay.active {
  display: block;
  opacity: 1;
}
.side-drawer {
  position: fixed;
  top: 0; right: -450px;
  width: 100%;
  max-width: 450px;
  height: 100vh;
  background: #fff;
  z-index: 1000;
  box-shadow: -4px 0 24px rgba(0,0,0,0.1);
  transition: right 0.3s ease;
  overflow-y: auto;
  padding: 32px;
}
.side-drawer.active {
  right: 0;
}
.drawer-close {
  position: absolute;
  top: 24px; right: 24px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}
.drawer-header {
  margin-bottom: 24px;
}
.drawer-title {
  font-size: 28px;
  margin: 0 0 8px 0;
  font-family: 'Playfair Display', serif;
}
.drawer-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
.drawer-stat-card {
  background: #f9f9f9;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #eaeaea;
}
.drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.popular-searches {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 14px;
}
.popular-searches a {
  color: #0b6b52;
  text-decoration: none;
  font-weight: 500;
}

/* ETF Table & Card Toggle View */
.view-toggles {
  display: flex;
  gap: 8px;
  background: #f1f1f1;
  padding: 4px;
  border-radius: 6px;
}
.view-toggle-btn {
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
}
.view-toggle-btn.active {
  background: #fff;
  color: #111;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.etf-table-wrapper {
  transition: all 0.3s ease;
}

/* Compare and Favorite */
.action-cell {
  text-align: right;
}
.favorite-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: #ccc;
  cursor: pointer;
}
.favorite-btn:hover, .favorite-btn.active {
  color: #f5b041;
}
.compare-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #0b6b52;
  cursor: pointer;
}

/* Card View overrides for the table */
.card-view .etf-table {
  min-width: 100% !important;
  width: 100% !important;
}
.card-view .etf-table thead {
  display: none;
}
.card-view .etf-table tbody {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.card-view .etf-table tr {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  padding: 16px;
}
.card-view .etf-table td {
  border: none;
  padding: 6px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.card-view .etf-table td::before {
  content: attr(data-label);
  font-size: 11px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
}
.card-view .etf-table th:first-child,
.card-view .etf-table td:first-child {
  position: static;
  box-shadow: none;
}
.card-view .etf-table td:first-child {
  border-bottom: 1px solid #eaeaea;
  padding-bottom: 12px;
  margin-bottom: 12px;
  display: block;
}
.card-view .etf-table td:first-child::before {
  display: none;
}
.card-view .action-cell {
  justify-content: flex-end;
  margin-top: 8px;
}
.card-view .action-cell::before {
  display: none;
}

/* Skeleton Loading Animation */
@keyframes skeleton-pulse {
  0% { background-color: #f1f5f9; }
  50% { background-color: #e2e8f0; }
  100% { background-color: #f1f5f9; }
}

.skeleton-box {
  background-color: #f1f5f9;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

/* Mobile Responsiveness for Table & Cards */
@media (max-width: 768px) {
  .etf-table {
    min-width: 600px;
    width: 100%;
  }
  .etf-table th.hide-mobile,
  .etf-table td.hide-mobile {
    display: none;
  }
  .etf-table th:first-child,
  .etf-table td:first-child {
    position: static;
    box-shadow: none;
  }
  .card-view .etf-table {
    min-width: 100% !important;
    width: 100% !important;
  }
  .card-view .etf-table tbody {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Content Cards */
.content-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.content-card {
  background: #fff;
  border: 1px solid #eaeaea;
  padding: 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #111;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}
.content-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.content-card-icon {
  font-size: 24px;
}
/* FAB Compare Button */
.compare-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0b6b52;
  color: #fff;
  padding: 16px 24px;
  border-radius: 32px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(11, 107, 82, 0.4);
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s, background 0.2s;
  border: none;
}
.compare-fab:hover {
  transform: translateY(-2px);
  background: #095944;
}
.compare-fab.hidden {
  display: none;
}

/* Search Autocomplete */
.search-autocomplete {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.13), 0 2px 8px rgba(0,0,0,0.06);
  z-index: 200;
  display: none;
  max-height: 360px;
  overflow-y: auto;
  overflow-x: hidden;
}
.search-autocomplete.active {
  display: block;
  animation: acFadeIn 0.14s ease;
}
@keyframes acFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.autocomplete-header {
  padding: 8px 14px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #999;
  border-bottom: 1px solid #f4f4f4;
}
.autocomplete-footer {
  padding: 8px 14px;
  font-size: 11px;
  color: #bbb;
  border-top: 1px solid #f4f4f4;
  text-align: center;
}
.autocomplete-footer kbd {
  display: inline-block;
  padding: 1px 5px;
  font-size: 10px;
  font-family: inherit;
  background: #f3f3f3;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  color: #555;
}
.autocomplete-loading {
  padding: 16px 14px;
  font-size: 13px;
  color: #888;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ac-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #e0e0e0;
  border-top-color: #0b6b52;
  border-radius: 50%;
  display: inline-block;
  animation: acSpin 0.6s linear infinite;
}
@keyframes acSpin { to { transform: rotate(360deg); } }
.autocomplete-empty {
  padding: 16px 14px;
  font-size: 13px;
  color: #888;
}
.autocomplete-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #fafafa;
  transition: background 0.1s;
}
.autocomplete-item:last-of-type { border-bottom: none; }
.autocomplete-item:hover,
.autocomplete-item.highlighted {
  background: #f1f8f6;
}
/* Left: icon + text */
.ac-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}
.ac-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #0b6b52;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.ac-text { overflow: hidden; }
.ac-ticker {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  display: flex;
  align-items: center;
  gap: 5px;
}
.ac-name {
  font-size: 11px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}
/* Right: TER + logo */
.ac-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.ac-ter {
  font-size: 11px;
  font-weight: 600;
  color: #0b6b52;
  background: #eafaf1;
  border: 1px solid #b7e4d0;
  border-radius: 4px;
  padding: 2px 6px;
}
.ac-dist-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: #f3f3f3;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 1px 4px;
  color: #555;
}
.ac-provider-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  border-radius: 2px;
  opacity: 0.75;
}
.etf-search-container {
  position: relative;
}

/* Logos in Table / Drawer */
.provider-logo {
  width: 16px;
  height: 16px;
  border-radius: 2px;
  display: inline-block;
  background: #eaeaea;
  vertical-align: middle;
  margin-right: 6px;
}
.etf-icon {
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background: #0b6b52;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
  margin-right: 12px;
}
.ticker-cell-inner {
  display: flex;
  align-items: center;
}

/* Mobile Sidebar Toggle */
.mobile-filter-toggle {
  display: none;
  width: 100%;
  padding: 12px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-weight: 600;
  margin-bottom: 16px;
  cursor: pointer;
  text-align: center;
}
@media (max-width: 768px) {
  .mobile-filter-toggle {
    display: block;
  }
  .sidebar-filters {
    display: none;
  }
  .sidebar-filters.active {
    display: block;
  }
  .explorer-layout {
    grid-template-columns: 1fr;
  }
}


/* Provider Cards and Hub Specific Styles */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.card {
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.card-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: #1a1a1a;
    margin-bottom: 12px;
}
.card-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #555;
    margin-bottom: 20px;
    flex-grow: 1;
}
.card-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.tag {
    background: #eef7f5;
    color: #0b6b52;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}
.card-link {
    color: #0b6b52;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: auto;
}
.card-link:hover {
    text-decoration: underline;
}

/* Fix chevron overlay in top holdings */
#dyn-top-holdings ul li::before {
    display: none !important;
    content: "" !important;
}
