/* --- Styles for SEC Filings Page --- */

/* Filters */
.bq-filings-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 25px;
    padding: 20px;
    margin-bottom: 25px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.bq-filter-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-grow: 1;
}

.bq-filter-item label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.bq-filter-item select {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #fff;
    min-width: 200px;
}

/* OVERRIDE: Remove generic first-column sticky behavior for SEC Filings table */
#bq-sec-filings-table th:first-child,
#bq-sec-filings-table td:first-child {
    position: static !important;
    left: auto !important;
    z-index: auto !important;
    border-right: none !important;
    box-shadow: none !important;
}

/* Table Column Widths & Alignment */
#bq-sec-filings-table th.sno-col,
#bq-sec-filings-table td.sno-col {
    width: 50px;
    min-width: 50px;
    text-align: center;
}

#bq-sec-filings-table th.form-type-col,
#bq-sec-filings-table td.form-type-col {
    min-width: 100px;
    width: 100px;
}

#bq-sec-filings-table th.url-col,
#bq-sec-filings-table td.url-col {
    width: 70px;
    text-align: center;
}

/* URL Icon Style */
#bq-sec-filings-table .url-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    color: #0073aa;
    font-size: 20px;
    text-decoration: none;
    transition: color 0.2s;
}

#bq-sec-filings-table .url-icon:hover {
    color: #005a87;
}

/* Sticky "Form Type" Column (2nd column) in Main Table */
#bq-sec-filings-table th:nth-child(2),
#bq-sec-filings-table td:nth-child(2) {
    position: -webkit-sticky;
    position: sticky;
    left: 0;
    z-index: 2;
    background-color: #ffffff;
    border-right: 1px solid #dee2e6;
    box-shadow: 2px 0 5px -2px rgba(0,0,0,0.1);
}

#bq-sec-filings-table thead th:nth-child(2) {
    background-color: #f8f9fa;
    z-index: 3;
}

/* #bq-sec-filings-table tbody tr:nth-of-type(even) td:nth-child(2) {
    background-color: #f8f9fa;
} */

#bq-sec-filings-table tbody tr:hover td:nth-child(2) {
    background-color: #f1f8ff;
}

/* Sticky Header Wrapper - SEC Filings Specific */
.bq-sticky-header-wrapper {
    border-left: 1px solid #ded9d9;
    border-right: 1px solid #ded9d9;
}

/* Sticky Header Table - Allow transform on individual cell */
.bq-sticky-header-wrapper table {
    position: relative;
}

/* Form Type Column in Cloned Header - Enable absolute positioning within transformed table */
.bq-sticky-header-wrapper th:nth-child(2) {
    position: absolute; /* Changed to absolute for precise positioning */
    top: 0;
    z-index: 11;
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    box-shadow: 2px 0 5px -2px rgba(0,0,0,0.1);
}

/* Ensure first column is NOT sticky in cloned header */
.bq-sticky-header-wrapper th:first-child {
    position: static !important;
    left: auto !important;
    z-index: auto !important;
    border-right: none !important;
    box-shadow: none !important;
}

/* Pagination Controls */
.bq-pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.bq-pagination-controls .page-btn,
.bq-pagination-controls .dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #dee2e6;
    background-color: #fff;
    color: #0073aa;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.bq-pagination-controls .page-btn:hover {
    background-color: #f0f2f5;
    border-color: #ccc;
}

.bq-pagination-controls .page-btn.active {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
    cursor: default;
}

.bq-pagination-controls .page-btn.disabled {
    color: #aaa;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

/* Responsive */
@media (max-width: 768px) {
    .bq-filings-filters {
        flex-direction: column;
    }
    .bq-filter-item select {
        width: 100%;
    }
}