/**
 * All of the CSS for your admin-specific functionality should be
 * included in this file.
 */
.scholar-sync-alert {
    color: red;
}

/* ── More Options panel (Add New Author page) ─────────────────── */
#more-options-toggle {
    cursor: pointer;
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    color: #2271b1;
    text-decoration: none;
    user-select: none;
    background: none;
    border: none;
    padding: 0;
}

#more-options-toggle:hover {
    color: #135e96;
    text-decoration: underline;
}

#more-options-arrow {
    display: inline-block;
    transition: transform 0.2s;
}

.scholar-sync-arrow-open {
    transform: rotate(180deg);
}

#more-options-panel {
    margin-top: 10px;
    padding: 14px 16px;
    border: 1px solid #dcdcde;
    background: #f9f9f9;
    max-width: 500px;
}

#more-options-panel ul {
    margin: 0 0 12px 0;
    padding: 0;
    list-style: none;
}

#more-options-panel ul li {
    margin-bottom: 8px;
    font-size: 13px;
}

#scholar-url-section {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid #dcdcde;
}

#scholar-url-section .scholar-steps {
    margin: 0 0 10px 0;
    padding: 0;
    list-style: decimal;
    padding-left: 18px;
    font-size: 13px;
    color: #3c434a;
}

#scholar-url-section .scholar-steps li {
    margin-bottom: 4px;
}

#scholar-url-input {
    width: 360px;
    max-width: 100%;
}

.scholar-sync-upgrade-notice {
    background-color: #fff8e1;
    border-left: 4px solid #ffb900;
    color: #3c434a;
    padding: 10px 14px;
    margin-top: 8px;
    font-size: 14px;
}

.scholar-sync-upgrade-notice a {
    font-weight: 600;
}

.nav-tabs {
    float: left;
    width: 100%;
    margin: 0;
    list-style-type: none;
    border-bottom: 1px solid transparent;
}

.nav-tabs > li {
    float: left;
    margin-bottom: -1px;
}

.nav-tabs > li > a {
    margin-right: 2px;
    line-height: 1.5;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 4px 4px 0 0;
    float: left;
    text-decoration: none;
}

.nav-tabs > li > a:hover {
    border-color: #eee #eee #ddd;
}

.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
    color: #555;
    cursor: default;
    background-color: #fff;
    border-color: transparent;
}

.tab-content::after {
    content: '';
    display: table;
    clear: both;
}

.tab-content > .tab-pane {
    float: left;
    width: 100%;
    display: none;
}

.tab-content > .tab-pane.active {
    display: block;
    background-color: #fff;
    box-shadow: 0 5px 4px -2px rgba(0, 0, 0, 0.15);
    padding-bottom: 70px;
}

.tab-pane > form {
    padding: 10px;
}

.top-header {
   padding-left: 10px;
}

#wpcontent {
    margin-right: 10px;
}



.toast {
    position: fixed;
    bottom: 20px;
    right: -300px;
    background-color: #333;
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    transition: right .3s ease-in-out;
}

.toast--visible {
    right: 20px;
}

.scholar-sync-actions {
    margin-top: 10px;
    display: flex;
    align-items: baseline;
}

.row-actions .preview {
    float: none;
}

.disabled-href {
    color: #a0a5aa;
    background: #f7f7f7;
    border-color: #ddd;
    pointer-events: none;
}

/* ── Group view-type selector ─────────────────────────────────── */
.scholar-sync-view-type-selector {
    display: flex;
    gap: 16px;
}

.scholar-sync-view-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    color: #555;
    transition: border-color .15s, color .15s;
    min-width: 110px;
}

.scholar-sync-view-option:hover {
    border-color: #007cba;
    color: #007cba;
}

.scholar-sync-view-option.active {
    border-color: #007cba;
    background: #f0f8ff;
    color: #007cba;
    font-weight: 600;
}

.scholar-sync-view-label {
    margin-top: 6px;
    font-size: 12px;
}

.scholar-sync-view-example {
    margin-top: 6px;
    font-size: 11px;
    color: #007cba;
    text-decoration: underline;
}

.scholar-sync-view-example:hover {
    color: #005a8e;
}

/* ── Dual listbox ─────────────────────────────────────────────── */
.scholar-sync-dual-listbox {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.scholar-sync-dual-listbox .wdl-col-list { width: auto; }
.scholar-sync-dual-listbox .wdl-col-btns { width: 44px; }

.scholar-sync-dual-listbox td {
    padding: 2px 4px;
    vertical-align: top;
}

.scholar-sync-dual-listbox .wdl-buttons-cell {
    vertical-align: middle;
    text-align: center;
}

.scholar-sync-dual-listbox .wdl-buttons-cell .button {
    display: block;
    width: 32px;
    margin: 3px auto;
    text-align: center;
    padding-left: 0;
    padding-right: 0;
}

.scholar-sync-dual-listbox select {
    min-height: 200px;
}

/* Members UI: reordering (up/down arrows) only applies to the grid/directory
   view, where member order is meaningful. In the feed/list view it is hidden,
   and the helper text drops the "reorder" wording. */
.scholar-sync-members-ui.is-feed .scholar-sync-move-btn,
.scholar-sync-members-ui.is-feed .scholar-sync-reorder-text,
.scholar-sync-members-ui.is-grid .scholar-sync-simple-text {
    display: none;
}

/* "Can't find the author? Add Manually" hint below the search workflow. */
.scholar-sync-manual-hint {
    margin-top: 18px;
    color: #50575e;
}
.scholar-sync-manual-link {
    text-decoration: underline;
}

/* General styles for the instruction window */
#instruction-window {
    position: absolute;
    top: 100px;
    left: 100px;
    width: 300px;
    background: #f8f9fa;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #333;
}

/* Header styles */
#instruction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #007bff;
    color: white;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    cursor: grab;
}

#instruction-header:active {
    cursor: grabbing;
}

/* Title styles */
#instruction-title {
    font-weight: bold;
}

/* Close button styles */
#close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

#close-btn:hover {
    color: #ccc;
}

/* Body styles */
#instruction-body {
    padding: 15px;
    line-height: 1.6;
}

@media (max-width: 782px) {
    #instruction-window {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        box-sizing: border-box;
        margin-top: 12px;
    }
}

/* ── 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;
}

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

.scholar-sync-cite-btn {
    font-size: 12px;
    padding: 4px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}
.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; }

/* ── Cited-by badge (single author view) ─────────────────── */
.scholar-sync-cited-by {
    font-size: 12px;
    color: #5f6368;
    margin: 6px 0;
}
.scholar-sync-cited-by a {
    color: #1a73e8;
    text-decoration: none;
}
.scholar-sync-cited-by a:hover {
    text-decoration: underline;
}

.column-authors a {
    text-decoration: none;
}
.column-authors a:hover {
    text-decoration: underline;
}

.scholar-sync-form-actions {
    white-space: nowrap;
}

.scholar-sync-meta-label {
    color: #666;
    font-size: 12px;
    margin-right: 16px;
}
.scholar-sync-meta-input {
    width: 130px;
    background: #f0f0f1;
    border: 1px solid #ddd;
    color: #666;
    font-size: 12px;
    padding: 2px 6px;
}

.scholar-sync-sync-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f0f0f1;
    color: #5f6368;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    cursor: pointer;
}
.scholar-sync-sync-badge:hover,
.scholar-sync-sync-badge:focus {
    background: #dcdcde;
}
.scholar-sync-sync-explain {
    max-width: 480px;
    margin-top: 6px;
    padding: 8px 10px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    color: #50575e;
    font-size: 12px;
}
.scholar-sync-sync-explain label {
    display: block;
    margin-top: 6px;
}

#scholar-sync-thumbnail-preview {
    margin-top: 8px;
    width: 80px;
    height: 80px;
    object-fit: cover;
    display: block;
}
/* Articles list table column widths */
.column-year, .column-cite { width: 100px !important; text-align: left; }

/* ── Sync history table ───────────────────────────────── */
.scholar-sync-sync-table { border-collapse: collapse; max-width: 860px; width: 100%; font-size: 13px; }
.scholar-sync-sync-table th,
.scholar-sync-sync-table td { padding: 10px 14px; border: 1px solid #e0e0e0; vertical-align: middle; text-align: left; }
.scholar-sync-sync-table thead th { background: #f6f7f7; font-weight: 600; color: #1d2327; white-space: nowrap; }
.scholar-sync-sync-table tbody tr:nth-child(even) { background: #f9f9f9; }
.scholar-sync-sync-table tbody tr:hover { background: #f0f6fc; }
.scholar-sync-sync-table .col-date { white-space: nowrap; width: 140px; }
.scholar-sync-sync-table .col-type { width: 90px; }
.scholar-sync-sync-table .col-outcome { width: 130px; }
.scholar-sync-sync-table .col-num { width: 80px; }
.scholar-sync-sync-table .col-msg { color: #666; }

/* ── Article image field (edit article tab) ───────────── */
#scholar-sync-article-image-preview {
    max-width: 100px;
    max-height: 100px;
    object-fit: cover;
    display: block;
    margin-top: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* display:block above outranks the UA [hidden] rule; restore it explicitly */
#scholar-sync-article-image-preview[hidden] {
    display: none;
}
