/**
 * Styles for the standalone admin preview pages (individual author, authors list, group).
 * This file is linked directly by the preview pages (ob_start/exit pattern) and is NOT
 * enqueued via wp_enqueue_style, so it is never loaded on normal admin pages.
 */

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: #f0f0f1;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
}

/* ── Sliding panel ─────────────────────────────────── */
#wps-panel {
    position: fixed;
    top: 0; left: 0;
    width: 300px;
    height: 100vh;
    background: #fff;
    box-shadow: 4px 0 24px rgba(0,0,0,0.18);
    z-index: 300;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
#wps-panel.is-closed { transform: translateX(-100%); }

.wps-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    height: 52px;
    background: linear-gradient(135deg, #1a1f36 0%, #2c3260 100%);
    flex-shrink: 0;
}
.wps-panel-back {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 8px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.wps-panel-back:hover { background: rgba(255,255,255,0.12); color: #fff; }
.wps-panel-back svg { display: block; }

.wps-panel-title {
    flex: 1;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.wps-panel-close {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border: none; background: transparent;
    border-radius: 8px;
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    font-size: 18px; line-height: 1;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.wps-panel-close:hover { background: rgba(255,255,255,0.12); color: #fff; }

.wps-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 18px;
}
.wps-panel-body label {
    display: block;
    margin: 14px 0 5px;
    font-weight: 600;
    color: #1d2327;
}
.wps-panel-body label:first-child { margin-top: 0; }
.wps-panel-body input[type="range"],
.wps-panel-body input[type="number"],
.wps-panel-body select {
    width: 100%;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 5px 8px;
    font-size: 13px;
    background: #fff;
}
.wps-panel-body input[type="range"] {
    padding: 0;
    border: none;
    accent-color: #2271b1;
    cursor: pointer;
}

/* ── Columns slider row (group grid preview) ────────── */
.wps-columns-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.wps-columns-row input[type="range"] { flex: 1; }
.wps-columns-badge {
    min-width: 28px;
    text-align: center;
    font-weight: 700;
    color: #2271b1;
    font-size: 15px;
}

.wps-checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 500 !important;
    cursor: pointer;
}
.wps-checkbox-label input[type="checkbox"] {
    width: 16px; height: 16px;
    accent-color: #2271b1;
    cursor: pointer;
    flex-shrink: 0;
}

.wps-shortcode-box {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e0e0e0;
}
.wps-shortcode-box input[type="text"] {
    width: 100%;
    font-family: monospace;
    font-size: 11px;
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 6px 8px;
    color: #1d2327;
}
.wps-copy-btn {
    margin-top: 8px;
    width: 100%;
    padding: 7px 12px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.wps-copy-btn:hover { background: #135e96; }

/* ── Create Page box ──────────────────────────────── */
.wps-create-page-box {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}
.wps-create-page-box label {
    display: block;
    margin: 0 0 6px;
    font-weight: 600;
    color: #1d2327;
    font-size: 13px;
}
.wps-create-page-box input[type="text"] {
    width: 100%;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 13px;
    background: #fff;
    margin-bottom: 8px;
}
.wps-create-page-result {
    display: none;
    margin-top: 10px;
    font-size: 12px;
}
.wps-create-page-result.is-visible {
    display: block;
}
.wps-create-page-result .wps-create-page-link {
    margin-right: 12px;
}

/* ── Toggle button (shown when panel closed) ─────── */
#wps-toggle {
    position: fixed;
    top: 18px; left: 18px;
    z-index: 299;
    display: flex; align-items: center; gap: 9px;
    padding: 10px 16px 10px 12px;
    background: linear-gradient(135deg, #1a1f36 0%, #2c3260 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    opacity: 0; pointer-events: none;
    transform: translateX(-12px);
    transition: opacity 0.3s cubic-bezier(0.4,0,0.2,1),
                transform 0.3s cubic-bezier(0.4,0,0.2,1),
                background 0.15s;
}
#wps-toggle.is-visible { opacity: 1; pointer-events: auto; transform: translateX(0); }
#wps-toggle:hover { background: linear-gradient(135deg, #2c3260 0%, #3d4a8a 100%); }
#wps-toggle svg { display: block; flex-shrink: 0; }

/* ── Main content area (group preview) ────────────── */
#wps-main {
    min-height: 100vh;
    padding: 28px;
}
#wps-main h2 {
    margin: 0 0 20px;
    font-size: 22px;
    color: #1d2327;
}
#wps-main h2 small {
    font-size: 14px;
    font-weight: 400;
    color: #787c82;
}

/* Content containers (shared across all three preview types) */
.scholar-sync-author-preview-body .scholar-sync-container,
.scholar-sync-author-preview-body .scholar-sync-container-authors,
#scholar-sync-group-preview-container {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    padding: 24px;
    min-height: 200px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

@media (max-width: 480px) {
    #wps-panel { width: 85vw; }
    .scholar-sync-author-preview-body .scholar-sync-container,
    .scholar-sync-author-preview-body .scholar-sync-container-authors { padding: 14px; }
}

/* Spacing between stacked checkbox labels in the display-options panel */
.wps-checkbox-label-spaced {
    margin-top: 12px;
}
