.sedar-filings {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Filter bar */
.sedar-filings-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #EDEEF4;
  border-bottom: 1px solid #ddd;
  flex-shrink: 0;
}

.sedar-filings-filter-bar label {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.sedar-category-select {
  flex: 1;
  max-width: 320px;
  padding: 0.3rem 0.5rem;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
}

.sedar-category-select:focus {
  outline: none;
  border-color: #4a90d9;
  box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.2);
}

/* Search */
.sedar-search-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  max-width: 360px;
}

.sedar-search-input-plain {
  flex: 1;
  padding: 0.3rem 0.5rem;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: white;
}

.sedar-search-input-plain:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sedar-search-input-plain:focus {
  outline: none;
  border-color: #4a90d9;
  box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.2);
}

.sedar-search-status {
  font-size: 11px;
  color: #888;
  white-space: nowrap;
  font-style: italic;
}

/* Search highlight */
.sedar-highlight {
  background-color: #fff3cd;
  color: #856404;
  padding: 0 2px;
  border-radius: 2px;
}

/* Content area */
.sedar-filings-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Table */
.sedar-filings-table {
  font-size: 12px;
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  background-color: #f7f7f7;
}

.sedar-filings-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.sedar-filings-table th {
  background-color: #EDEEF4;
  font-weight: 700;
  text-align: left;
  font-size: 13px;
  padding: 0.5rem;
  border-bottom: 1px solid #ddd;
}

.sedar-filings-table td {
  padding: 0.4rem 0.5rem;
  background-color: white;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
  overflow: hidden;
}

.sedar-filings-table tbody tr:hover td {
  background-color: #f5f8fc;
}

/* Column widths */
.sedar-col-date { width: 90px; white-space: nowrap; }
.sedar-col-desc { /* takes remaining space */ }
.sedar-col-actions { width: 80px; }

/* Filing description */
.sedar-filing-description {
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sedar-filing-excerpt {
  font-size: 11px;
  color: #666;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Action links */
.sedar-actions-row { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.sedar-link-btn { display: inline-flex; align-items: center; justify-content: center; padding: 2px; border-radius: 3px; text-decoration: none; transition: opacity 0.15s; line-height: 1; }
.sedar-link-btn sl-icon { font-size: 24px; }
.sedar-link-view { color: #e67e22; }
.sedar-link-view:hover { opacity: 0.7; }
.sedar-link-pdf { color: #c0392b; }
.sedar-link-pdf:hover { opacity: 0.7; }

/* Pagination */
.sedar-pagination { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem; border-top: 1px solid #ddd; background-color: #fafafa; flex-shrink: 0; }
.sedar-pagination-info { font-size: 12px; color: #666; }
.sedar-pagination-buttons { display: flex; align-items: center; gap: 0.5rem; }
.sedar-page-indicator { font-size: 12px; color: #444; min-width: 80px; text-align: center; }
.sedar-page-btn { padding: 0.25rem 0.6rem; font-size: 12px; border: 1px solid #ccc; border-radius: 4px; background-color: white; cursor: pointer; transition: background-color 0.15s; }
.sedar-page-btn:hover:not(:disabled) { background-color: #e8e8e8; }
.sedar-page-btn:disabled { opacity: 0.4; cursor: default; }

/* Loading state */
.sedar-filings-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 1rem; gap: 1rem; color: #888; font-size: 13px; }
.sedar-spinner { width: 28px; height: 28px; border: 3px solid #e0e0e0; border-top-color: #4a90d9; border-radius: 50%; animation: sedar-spin 0.8s linear infinite; }
@keyframes sedar-spin { to { transform: rotate(360deg); } }

/* Empty state */
.sedar-filings-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 1rem; color: #888; font-size: 13px; text-align: center; gap: 0.5rem; }
.sedar-filings-empty-icon { font-size: 32px; opacity: 0.5; }


/* ===========================================================
   Company Profile Redesign Overrides
   Scoped under #cp-redesign so the details panel is unaffected
   =========================================================== */

#cp-redesign .sedar-filings {
  font-family: 'Inter', sans-serif;
  flex: 1;
  min-height: 0;
}

#cp-redesign .sedar-filings-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* Pagination sticks to bottom */
#cp-redesign .sedar-filings .cp-pagination {
  flex-shrink: 0;
}

/* Filter bar */
#cp-redesign .sedar-filings-filter-bar {
  background: transparent;
  border-bottom: none;
  padding: 0.5rem 1rem;
  align-items: center;
  gap: 0.75rem;
}

#cp-redesign .sedar-filings-filter-bar label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #586064;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

#cp-redesign .sedar-sl-select {
  max-width: 300px;
  flex: 0 0 auto;
}

#cp-redesign .sedar-search-wrapper {
  max-width: 320px;
}

#cp-redesign .sedar-search-input {
  flex: 1;
}

#cp-redesign .sedar-search-input::part(base) {
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  border: 1px solid #abb3b7;
  border-radius: 0.375rem;
  background: #ffffff;
}

#cp-redesign .sedar-search-input::part(base):focus-within {
  border-color: #005db5;
  box-shadow: 0 0 0 2px rgba(0, 93, 181, 0.15);
}

#cp-redesign .sedar-search-input[disabled]::part(base) {
  opacity: 0.5;
}

#cp-redesign .sedar-search-status {
  font-size: 0.6875rem;
  color: #586064;
}

#cp-redesign .sedar-highlight {
  background-color: #e8f4fd;
  color: #005db5;
}

#cp-redesign .sedar-sl-select::part(combobox) {
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  border: 1px solid #abb3b7;
  border-radius: 0.375rem;
  background: #ffffff;
}

#cp-redesign .sedar-sl-select::part(combobox):focus-within {
  border-color: #005db5;
  box-shadow: 0 0 0 2px rgba(0, 93, 181, 0.15);
}

/* Table */
#cp-redesign .sedar-filings-table {
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
}

#cp-redesign .sedar-col-date {
  width: 110px;
}

#cp-redesign .sedar-filings-table th {
  background: #e2e9ec;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #586064;
  padding: 0.75rem 1rem;
  border: none;
}

#cp-redesign .sedar-filings-table td {
  padding: 0.9rem 1rem;
  color: #2b3437;
  border: none;
}

#cp-redesign .sedar-filings-table tbody tr:nth-child(odd) td {
  background: #ffffff;
}

#cp-redesign .sedar-filings-table tbody tr:nth-child(even) td {
  background: #f8f9fa;
}

#cp-redesign .sedar-filings-table tbody tr:hover td {
  background: #f1f4f6;
}

/* Filing description */
#cp-redesign .sedar-filing-description {
  font-weight: 600;
  font-size: 0.8125rem;
  color: #2b3437;
  margin-bottom: 0.2rem;
}

#cp-redesign .sedar-filing-excerpt {
  font-size: 0.75rem;
  color: #586064;
  line-height: 1.5;
}

/* Action links */
#cp-redesign .sedar-link-btn sl-icon {
  font-size: 22px;
}

#cp-redesign .sedar-link-view {
  color: #005db5;
}

#cp-redesign .sedar-link-pdf {
  color: #9f403d;
}

/* Pagination — redesign uses cp-pagination classes from main CSS, no overrides needed */

/* Loading */
#cp-redesign .sedar-filings-loading {
  color: #586064;
  font-size: 0.8125rem;
}

#cp-redesign .sedar-spinner {
  border-color: #e2e9ec;
  border-top-color: #005db5;
}

/* Empty state */
#cp-redesign .sedar-filings-empty {
  color: #586064;
  font-size: 0.8125rem;
}

/* Mobile: stack filter bar vertically, full-width controls */
@media (max-width: 600px) {
  #cp-redesign .sedar-filings-filter-bar {
    flex-wrap: wrap;
  }

  #cp-redesign .sedar-sl-select {
    max-width: none;
    flex: 1 1 100%;
  }

  #cp-redesign .sedar-search-wrapper {
    max-width: none;
    flex: 1 1 100%;
  }
}
