/* Ensure the HTML hidden attribute is respected even when a class sets display. */
[hidden] { display: none !important; }

.scholar-sync-container {
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

#scholar-sync-search {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

#scholar-sync-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

#scholar-sync-list li {
    font-size: 18px;
    padding: 10px;
    border-bottom: 1px solid #ccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#scholar-sync-list li:last-child {
    border-bottom: none;
}

#scholar-sync-list li:hover {
    background-color: #f5f5f5;
}

.scholar-sync-user-profile:hover {
    background-color: #f5f5f5;
}

.scholar-sync-title, .scholar-sync-citations {
    margin: 0;
}

.scholar-sync-citations {
    font-size: 0.8em;
}

.scholar-sync-title a, .scholar-sync-citations a {
    color: #1a0dab;
    text-decoration: none;
}

.scholar-sync-title a:visited, .scholar-sync-citations a:visited {
    color: #660099;
    text-decoration: none;
}

.scholar-sync-authors, .scholar-sync-publications {
    margin: 0;
    color: #777777;
    font-size: 0.8em;
}

.scholar-sync-search-container {
    position: relative;
}

#scholar-sync-clear-search {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 8px;
    background-color: transparent;
    border: none;
    cursor: pointer;
}

#scholar-sync-clear-search i {
    color: gray;
}

.scholar-sync-index-section {
    width: 2%;
    text-align: left;
    min-width: fit-content;
    margin-right: 20px;
}

.scholar-sync-title-section {
    width: 78%;
}

.scholar-sync-citations-section, .scholar-sync-year-section {
    width: 10%;
    text-align: center;
}

#scholar-sync-list li:first-child .scholar-sync-title-section,
#scholar-sync-list li:first-child .scholar-sync-citations-section,
#scholar-sync-list li:first-child .scholar-sync-year-section {
    text-decoration: underline;
}

.scholar-sync-results-number-container {
    margin-bottom: 10px;
    font-size: 20px;
    text-transform: uppercase;
}

.scholar-sync-author-preview-body {
    background: #fff;
    border: 1px solid #ccd0d4;
    color: #444;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin: 2em auto;
    padding: 1em 2em;
    max-width: 700px;
}

.scholar-sync-user-profile {
    display: flex;
    width: 100%;
    margin-bottom: 30px;
    align-items: center;
}

.scholar-sync-user-details {
    flex: 1;
    text-align: left;
}

.scholar-sync-user-name {
    font-weight: bold;
    font-size: large;
}

.scholar-sync-user-interests {
    margin-top: 5px;
}

.scholar-sync-after-gradiant {
    position: relative;
}
.scholar-sync-after-gradiant img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
}

/* ── Image shadow override (shadow="0") ──────────────────────── */
.scholar-sync-container[data-image-shadow="0"] .scholar-sync-after-gradiant img,
.scholar-sync-container[data-image-shadow="0"] .scholar-sync-author-chip img {
    box-shadow: none;
}

/* ── Square image shape overrides ────────────────────────────── */
.scholar-sync-container[data-image-shape="square"] .scholar-sync-after-gradiant img,
.scholar-sync-container[data-image-shape="square"] .scholar-sync-author-chip img {
    border-radius: 6px;
}
.scholar-sync-container[data-image-shape="square"] .scholar-sync-after-gradiant::after {
    border-radius: 6px;
}

ul.scholar-sync-interests-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

ul.scholar-sync-interests-list li {
    display: inline;
}

ul.scholar-sync-interests-list li:not(:last-child)::after {
    content: ", ";
}

.scholar-sync-container-authors {
    width: 100%;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-evenly;
}

.scholar-sync-container-authors > .scholar-sync-user-profile {
    width: 320px;
}

.scholar-sync-container-authors .scholar-sync-affiliations {
    font-size: smaller;
}

.scholar-sync-author-preview-html {
    background: #e8e8ed;
}

.scholar-sync-sidenav {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1;
    top: 0;
    left: 0;
    background-color: #111;
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
}
.scholar-sync-sidenav table {
    width: inherit;
}

.scholar-sync-sidenav td {
    color: white;
    font-size: large;

}

.scholar-sync-sidenav input[type="button"],
.scholar-sync-sidenav input[type="submit"]
{
    color: black;
    background-color: white;
    transition-duration: 0.4s;
    border-radius: 10px;
    width: 95%;
    height: 30px;
    display: block;
    font-size: large;
    align-content: baseline;
    font-weight: bold;
    margin-top: 30px;
}

.scholar-sync-sidenav input[type="button"]:hover,
.scholar-sync-sidenav input[type="submit"]:hover {
    background-color: gray;
}

.scholar-sync-sidenav input[type="button"]:active,
.scholar-sync-sidenav input[type="submit"]:active {
    background-color: darkblue;
}

.scholar-sync-sidenav a {
    padding: 8px 8px 8px 32px;
    text-decoration: none;
    font-size: 25px;
    color: #818181;
    display: block;
    transition: 0.3s;
}

.scholar-sync-sidenav a:hover {
    color: #f1f1f1;
}

.scholar-sync-sidenav .closebtn {
    position: absolute;
    top: -15px;
    right: 21px;
    font-size: 46px;
    margin-left: 50px;
    font-weight: 800;
}

.scholar-sync-sidenav .go-home {
    position: absolute;
    top: 10px;
    left: -20px;
}

.scholar-sync-sidenav table {
    width: 100%;
    margin-right: 5px;
    margin-left: 5px;
}


#topButton {
    position: fixed;
    top: 10px;
    left: 10px;
    background-color: #000000;
    color: #fff;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

@media screen and (max-height: 450px) {
    .scholar-sync-sidenav {padding-top: 15px;}
    .scholar-sync-sidenav a {font-size: 18px;}
}

/* ── Group Grid view ──────────────────────────────────────────── */
.scholar-sync-group-grid {
    display: grid;
    gap: 20px;
    padding: 10px 0;
}

.scholar-sync-group-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px;
    box-sizing: border-box;
}

.scholar-sync-group-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-bottom: 8px;
}

.scholar-sync-group-card img.circle {
    border-radius: 50%;
}

.scholar-sync-group-card img.square {
    border-radius: 4px;
}

.scholar-sync-group-card img.with-shadow {
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
}

.scholar-sync-group-card-name {
    font-weight: 600;
    font-size: 0.95em;
    margin-bottom: 4px;
}

.scholar-sync-group-card-sub {
    font-size: 0.8em;
    color: #666;
    margin-top: 2px;
}

/* ── Group Research Feed view ────────────────────────────────── */
.scholar-sync-group-feed {
    list-style: none;
    padding: 0;
    margin: 0;
}

.scholar-sync-group-feed-item {
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.scholar-sync-group-feed-item:last-child {
    border-bottom: none;
}

.scholar-sync-group-feed-item .scholar-sync-title {
    margin: 0 0 4px;
    font-size: 1em;
}

.scholar-sync-group-feed-item .scholar-sync-authors,
.scholar-sync-group-feed-item .scholar-sync-publications {
    margin: 2px 0;
    font-size: 0.82em;
    color: #555;
}

.scholar-sync-group-feed-item .scholar-sync-citations {
    font-size: 0.78em;
    color: #888;
    margin: 4px 0 0;
}

.scholar-sync-loading,
.scholar-sync-error,
.scholar-sync-group-empty {
    color: #888;
    font-style: italic;
    padding: 10px 0;
}

/* ── Search row (input + Search button side by side) ─────── */
.scholar-sync-search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.scholar-sync-search-row .scholar-sync-search-container {
    flex: 1;
    margin-bottom: 0;
}

#scholar-sync-search-btn {
    padding: 9px 18px;
    background: #1a0dab;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    white-space: nowrap;
    flex-shrink: 0;
}

#scholar-sync-search-btn:hover {
    background: #1558d6;
}

/* ── Controls bar (results info + per-page selector) ──────── */
.scholar-sync-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #555;
}

.scholar-sync-perpage-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.scholar-sync-perpage-container select {
    padding: 3px 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

/* ── Pagination ───────────────────────────────────────────── */
.scholar-sync-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    margin: 20px 0 10px;
}

.scholar-sync-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #d0d5dd;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #344054;
    transition: background 0.15s, border-color 0.15s;
    line-height: 1;
}

.scholar-sync-page-btn:hover:not([disabled]) {
    background: #f2f4f7;
    border-color: #98a2b3;
}

.scholar-sync-page-btn.active {
    background: #1a0dab;
    border-color: #1a0dab;
    color: #fff;
}

.scholar-sync-page-btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

.scholar-sync-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    color: #888;
    font-size: 14px;
}

/* ── Feed search controls (group feed shortcode) ─────────── */
.scholar-sync-feed-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.wps-feed-search {
    flex: 1;
    min-width: 160px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.wps-feed-search-btn {
    padding: 6px 14px;
    background: #1a0dab;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.wps-feed-search-btn:hover {
    background: #1558d6;
}

.wps-feed-clear-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #888;
    padding: 0 2px;
    line-height: 1;
}

.wps-feed-clear-btn:hover {
    color: #333;
}

@media screen and (min-width: 1200px) {
    .scholar-sync-index-section {
        width: 2%;
        min-width: fit-content;
        text-align: left;
    }
    .scholar-sync-title-section {
        width: 83%;
    }
    .scholar-sync-citations-section, .scholar-sync-year-section {
        width: 7.5%;
    }

}

/* ── Feed card redesign ───────────────────────────────── */
.scholar-sync-feed-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.scholar-sync-article-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    background: #fff;
}

.scholar-sync-article-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.scholar-sync-article-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1a73e8;
    text-decoration: none;
    margin-bottom: 12px;
    line-height: 1.4;
}
.scholar-sync-article-title:hover { text-decoration: underline; }

.scholar-sync-article-authors {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.scholar-sync-author-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.scholar-sync-author-chip img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
}

.scholar-sync-author-chip span,
.scholar-sync-chip-name-link {
    font-size: 11px;
    color: #555;
    text-align: center;
    max-width: 60px;
    word-break: break-word;
}

.scholar-sync-chip-name-link {
    text-decoration: none;
    display: block;
}
.scholar-sync-chip-name-link:hover {
    text-decoration: underline;
    color: #1a73e8;
}

.scholar-sync-authors-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.scholar-sync-authors-toggle-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #777;
    letter-spacing: 2px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
}
.scholar-sync-authors-toggle-label {
    font-size: 11px;
    color: #555;
}
.scholar-sync-authors-toggle:hover .scholar-sync-authors-toggle-icon {
    background: #d4d4d4;
}

/* ── Article actions layout ─────────────────────────── */
.scholar-sync-actions-row {
    display: flex;
    align-items: center;
}

.scholar-sync-actions-row .scholar-sync-cited-by {
    margin-left: auto; /* pushes cited-by to the right; Cite stays left */
}

.scholar-sync-cite-btn {
    font-size: 12px;
    padding: 4px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
}
.scholar-sync-cite-btn:hover { background: #f5f5f5; }

.scholar-sync-cite-panel {
    margin-top: 10px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 4px;
}

.scholar-sync-cite-text {
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 8px;
    color: #333;
    white-space: pre-wrap;
}

.scholar-sync-copy-cite-btn {
    font-size: 12px;
    padding: 4px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}
.scholar-sync-copy-cite-btn:hover { background: #f5f5f5; }

/* ── Mobile responsive ────────────────────────────────────── */
@media (max-width: 600px) {

    /* Body wrapper on preview page */
    .scholar-sync-author-preview-body {
        margin: 0;
        padding: 12px;
        border: none;
        border-radius: 0;
        max-width: 100%;
    }

    /* Stack author header vertically: photo on top, details below */
    .scholar-sync-user-profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 20px;
    }

    .scholar-sync-user-details {
        text-align: center;
        margin-top: 12px;
    }

    /* Slightly smaller photo on mobile */
    .scholar-sync-after-gradiant img {
        width: 80px;
        height: 80px;
    }
    .scholar-sync-after-gradiant::after {
        width: 68px;
        height: 68px;
    }

    /* Article cards */
    .scholar-sync-article-card {
        padding: 12px;
    }

    .scholar-sync-article-title {
        font-size: 14px;
    }

    /* Search button */
    #scholar-sync-search-btn {
        padding: 9px 12px;
        font-size: 14px;
    }

    /* Pagination buttons: slightly smaller */
    .scholar-sync-page-btn {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }
}

/* ── Cited-by badge ──────────────────────────────────────── */
.scholar-sync-cited-by {
    font-size: 12px;
    color: #5f6368;
}
.scholar-sync-cited-by a {
    color: #1a73e8;
    text-decoration: none;
}
.scholar-sync-cited-by a:hover {
    text-decoration: underline;
}