/* Publications Table Wrapper */
.ypv-publications-wrapper {
    width: 100%;
    margin: 20px 0;
}

/* Filters Section */
.ypv-publications-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ypv-filter-search,
.ypv-filter-category {
    flex: 1;
    min-width: 250px;
}

.ypv-pub-search-wrap {
    position: relative;
    width: 100%;
}

.ypv-publications-filters input[type="text"],
.ypv-publications-filters select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    background-color: #fff;
    outline: none;
    transition: border-color 0.2s ease;
}

.ypv-pub-search-wrap .ypv-pub-search {
    padding-right: 42px;
}

.ypv-pub-search-clear {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #888;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.ypv-pub-search-clear span {
    display: block;
    margin-top: -2px;
}

.ypv-pub-search-clear:hover,
.ypv-pub-search-clear:focus {
    color: #633A8B;
    background-color: rgba(99, 58, 139, 0.1);
    outline: none;
}

.ypv-pub-search-clear[hidden] {
    display: none !important;
}

.ypv-publications-filters input[type="text"]:focus,
.ypv-publications-filters select:focus {
    border-color: #633A8B;
}

/* Table Container */
.ypv-publications-table-container {
    width: 100%;
    overflow-x: auto;
}

/* Publications Table */
.ypv-publications-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin: 0;
}

/* Table Header */
.ypv-publications-table thead tr th {
    color: #fff !important;
    background-color: #633A8B !important;
    padding: 20px 15px;
    text-align: left;
    font-family: "Assistant", Sans-serif;
    font-size: 20px;
    font-weight: bold;
    line-height: 30px;
    letter-spacing: 0.5px;
    border-right: 2px solid #fff;
}

.ypv-publications-table thead tr th:last-child {
    border-right: none;
}

/* Table Body */
.ypv-publications-table tbody tr td {
    padding: 20px 15px;
    vertical-align: middle;
    color: #3C3C3C;
    font-family: "Assistant", Sans-serif;
    font-size: 16px;
    font-weight: normal;
    line-height: 30px;
    letter-spacing: 1px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
}

.ypv-publications-table tbody tr td:last-child {
    border-right: none;
}

.ypv-publications-table tbody tr:last-child td {
    border-bottom: none;
}

/* Alternate row background (odd rows) */
.ypv-publications-table tbody > tr:nth-child(2n+1) td {
    color: #3C3C3C !important;
    background-color: #F7F7F7 !important;
}

/* Alternate row background (even rows) */
.ypv-publications-table tbody > tr:nth-child(2n) td {
    color: #3C3C3C !important;
    background-color: #f2f2f2 !important;
}

/* Column widths (optional, you can adjust) */
.ypv-publications-table .ypv-col-no {
    width: 70px;
    text-align: center;
}

.ypv-publications-table .ypv-col-collaborative {
    width: auto;
    min-width: 95px;
    white-space: nowrap;
    font-size: 16px;
}

.ypv-publications-table .ypv-col-year {
    width: 100px;
    text-align: center;
}

/* Row links — inherit row color, purple on hover */
.ypv-publications-table tbody tr td a {
    color: inherit;
    text-decoration: none;
}

.ypv-publications-table tbody tr td a:hover {
    color: #633A8B !important;
}

/* Loader */
.ypv-pub-loader {
    color: #633A8B;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .ypv-publications-filters {
        flex-direction: column;
    }
    .ypv-publications-table thead tr th,
    .ypv-publications-table tbody tr td {
        padding: 15px 10px;
        font-size: 14px;
    }
}