.csp-documents {
    width: 100%;
}

.csp-documents-parent-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.csp-documents-parent-button {
    min-height: 46px;
    padding: 10px 22px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    color: #222;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.csp-documents-parent-button:hover,
.csp-documents-parent-button:focus-visible {
    border-color: #222;
}

.csp-documents-parent-button.is-active {
    border-color: #222;
    background: #222;
    color: #fff;
}

.csp-documents-filters {
    display: grid;
    grid-template-columns: 1fr 400px auto;
    gap: 14px;
    margin-bottom: 24px;
}

.csp-documents-search,
.csp-documents-category,
.csp-documents-reset {
    min-height: 54px;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    background: #fff;
    font-size: 16px;
}

.csp-documents-search {
    padding: 0 18px;
}

.csp-documents-category {
    padding: 0 14px;
}

.csp-documents-category {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M5 7.5L10 12.5L15 7.5' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.csp-documents-reset {
    padding: 0 22px;
    cursor: pointer;
}

.csp-documents-table-wrap {
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.csp-documents-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.csp-documents-table th {
    background: #f4f5f6;
    text-align: left;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 20px;
}

.csp-documents-table td {
    padding: 22px 20px;
    border-top: 1px solid #e8e8e8;
    vertical-align: middle;
}

.csp-document-title {
    font-weight: 700;
    text-decoration: none;
}

.csp-document-download {
    font-weight: 700;
    text-decoration: none;
}

.csp-documents-pagination {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

.csp-documents-page {
    min-width: 42px;
    height: 42px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
}

.csp-documents-page.is-active {
    background: #222;
    color: #fff;
    border-color: #222;
}

.csp-documents.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

.csp-documents-bulk-actions {
    display: none;
}

.csp-documents-table {
    table-layout: fixed;
}

/* Default table with Type column:
   Checkbox | Name | Type | Category | Download
*/
.csp-documents-table.has-type-col .csp-documents-select-col {
    width: 2%;
}

.csp-documents-table.has-type-col .csp-document-name-col {
    width: 43%;
}

.csp-documents-table.has-type-col .csp-document-type-col {
    width: 10%;
}

.csp-documents-table.has-type-col .csp-document-category-col {
    width: 30%;
}

.csp-documents-table.has-type-col .csp-document-download-col {
    width: 15%;
}

/* Table without Type column:
   Checkbox | Name | Category | Download
*/
.csp-documents-table:not(.has-type-col) .csp-documents-select-col {
    width: 2%;
}

.csp-documents-table:not(.has-type-col) .csp-document-name-col {
    width: 58%;
}

.csp-documents-table:not(.has-type-col) .csp-document-category-col {
    width: 25%;
}

.csp-documents-table:not(.has-type-col) .csp-document-download-col {
    width: 15%;
}

@media (max-width: 992px) {
    
    .csp-documents-filters {
		display: flex;
		flex-direction: column;
	}
	
    .csp-documents-table,
    .csp-documents-table tbody,
    .csp-documents-table td,
    .csp-documents-table tr {
        display: block;
    }

    .csp-documents-table thead {
        display: none;
    }
	
	.csp-documents-table tbody {
		padding: 0 20px 20px;
	}
	
	.csp-documents-table  .csp-documents-select-col {
		display: none;
	}
	
	.csp-documents-table tr {
		border-bottom: 1px solid #e8e8e8;
		padding: 20px 0;
	}

    .csp-documents-table td {
        border: none;
        width: 100% !important;
        max-width: none;
    }

}
