/* In-article GPU benchmark graph */
.gwcg-widget {
    --gwcg-border: #e0e4ef;
    --gwcg-blue:   #037cff;
    --gwcg-blue-2: #0a5bd3;
    --gwcg-ink:    #142033;
    width: 100%;
    margin: 22px 0;
    padding: 0 0 14px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.07);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
    /* no overflow:hidden — the search dropdown needs to spill over the foot */
}

/* ---- heading: blue banner ---- */
.gwcg-head { margin-bottom: 12px; }
.gwcg-head-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 16px;
    background: linear-gradient(135deg, var(--gwcg-blue) 0%, var(--gwcg-blue-2) 100%);
    color: #fff;
    border-radius: 13px 13px 0 0; /* keep rounded top now the widget no longer clips */
}
.gwcg-kicker {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}
.gwcg-head-actions { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; }
.gwcg-fs,
.gwcg-sort-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s ease;
}
.gwcg-fs:hover,
.gwcg-sort-btn:hover { background: rgba(255, 255, 255, 0.28); }
.gwcg-subtitle {
    display: block;
    margin: 8px 16px 0;
    font-size: 0.84rem;
    font-weight: 600;
    color: #516078;
}

/* ---- controls ---- */
.gwcg-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin: 0 16px 12px;
}
.gwcg-control { display: flex; flex-direction: column; gap: 3px; min-width: 120px; flex: 1 1 120px; }
.gwcg-control-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: #788; font-weight: 700; }
.gwcg-control select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--gwcg-border);
    border-radius: 7px;
    background: #fff;
    font-size: 0.85rem;
    color: var(--gwcg-ink);
}
.gwcg-control select option:disabled { color: #b7c0cf; }

/* ---- sort (compact icon + dropdown menu) ---- */
.gwcg-sort { position: relative; }
.gwcg-sort-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 30;
    min-width: 220px;
    padding: 5px;
    background: #fff;
    border: 1px solid var(--gwcg-border);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
}
.gwcg-sort-opt {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--gwcg-ink);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.gwcg-sort-opt:hover { background: #eef5ff; }
.gwcg-sort-opt.is-active { background: rgba(3, 124, 255, 0.1); color: var(--gwcg-blue); }
.gwcg-sort-opt.is-active::after { content: " ✓"; }

/* ---- chart ---- */
.gwcg-chart-wrap { position: relative; width: 100%; height: 240px; padding: 0 16px; box-sizing: border-box; }
.gwcg-nodata {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: #8893a5;
    font-size: 0.9rem;
    font-style: italic;
}

/* ---- custom key (legend) — led by the purple focus card(s) ---- */
.gwcg-key {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 7px 14px;
    margin: 12px 16px 0;
    padding-top: 11px;
    border-top: 1px solid #eef1f6;
}
.gwcg-key-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #516078;
}
.gwcg-key-item.is-focus {
    font-weight: 800;
    color: #6a1b9a;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(142, 36, 170, 0.1);
}
.gwcg-key-dot { width: 11px; height: 11px; border-radius: 3px; flex: 0 0 auto; }
.gwcg-key-item.is-focus .gwcg-key-dot { border-radius: 50%; }
.gwcg-key-hint { font-size: 0.72rem; color: #8893a5; font-style: italic; }

/* ---- add a GPU (prominent, centred) ---- */
/* Fixed height so swapping the button for the field doesn't resize the widget. */
.gwcg-add { margin: 14px 16px 0; display: flex; align-items: center; justify-content: center; min-height: 40px; }
.gwcg-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 18px;
    border: 1px dashed var(--gwcg-blue);
    border-radius: 999px;
    background: rgba(3, 124, 255, 0.06);
    color: var(--gwcg-blue);
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.15s ease, box-shadow 0.15s ease;
}
.gwcg-add-btn:hover { background: rgba(3, 124, 255, 0.12); box-shadow: 0 2px 8px rgba(3, 124, 255, 0.18); }
.gwcg-add-btn svg { display: block; }
/* The button swaps in place into this field — same centred slot, no reflow. */
.gwcg-add-field {
    position: relative;
    display: inline-block;
    width: min(340px, 92%);
    text-align: left;
}
.gwcg-search {
    width: 100%;
    height: 40px;
    padding: 0 16px;
    border: 1px solid var(--gwcg-blue);
    border-radius: 999px;
    font-size: 0.85rem;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(3, 124, 255, 0.12);
    outline: none;
}
.gwcg-results {
    list-style: none;
    margin: 6px 0 0;
    padding: 4px;
    border: 1px solid var(--gwcg-border);
    border-radius: 10px;
    background: #fff;
    max-height: 240px;
    overflow: auto;
    position: absolute;
    z-index: 25;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
}
.gwcg-results li {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 0.85rem;
}
.gwcg-results li:hover { background: #eef5ff; }
.gwcg-result-logo { width: 22px; height: 15px; object-fit: contain; flex: 0 0 auto; }
.gwcg-result-name { color: var(--gwcg-ink); font-weight: 600; }

/* ---- 4-card limit chooser modal ---- */
.gwcg-modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; }
.gwcg-modal[hidden] { display: none; }
.gwcg-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); }
.gwcg-modal-box {
    position: relative;
    width: min(440px, 92vw);
    max-height: 86vh;
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.4);
    padding: 22px 22px 18px;
    box-sizing: border-box;
}
.gwcg-modal-x {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: #8893a5;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 7px;
}
.gwcg-modal-x:hover { background: #f0f2f6; color: #142033; }
.gwcg-modal-title { margin: 0 28px 6px 0; font-size: 1.02rem; font-weight: 800; color: var(--gwcg-ink); line-height: 1.3; }
.gwcg-modal-sub { margin: 0 0 14px; font-size: 0.84rem; color: #516078; }
.gwcg-modal-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.gwcg-modal-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border: 1px solid var(--gwcg-border);
    border-radius: 9px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gwcg-ink);
    cursor: pointer;
}
.gwcg-modal-item:hover { background: #f6f8fb; }
.gwcg-modal-item input { width: 17px; height: 17px; flex: 0 0 auto; accent-color: var(--gwcg-blue); cursor: pointer; }
.gwcg-modal-item input:disabled { cursor: not-allowed; }
.gwcg-modal-logo { width: 26px; height: 17px; object-fit: contain; flex: 0 0 auto; }
.gwcg-modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.gwcg-modal-cancel {
    padding: 9px 16px;
    border: 1px solid var(--gwcg-border);
    border-radius: 999px;
    background: #fff;
    color: #516078;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
}
.gwcg-modal-cancel:hover { background: #f0f2f6; }
.gwcg-modal-go {
    padding: 9px 18px;
    border-radius: 999px;
    background: var(--gwcg-blue);
    color: #fff;
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}
.gwcg-modal-go:hover { background: var(--gwcg-blue-2); }
.gwcg-modal-go.is-disabled { opacity: 0.45; pointer-events: none; }

/* ---- foot: note (left) + compare link (bottom-right) ---- */
.gwcg-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px 16px;
    margin: 16px 16px 0;
    padding-top: 12px;
    border-top: 1px solid #eef1f6;
}
.gwcg-note {
    margin: 0;
    flex: 1 1 240px;
    max-width: 72%;
    font-size: 0.72rem;
    line-height: 1.45;
    color: #8893a5;
    font-style: italic;
}
.gwcg-compare-link {
    flex: 0 0 auto;
    margin-left: auto;
    align-self: flex-end;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gwcg-blue);
    text-decoration: none;
    white-space: nowrap;
}
.gwcg-compare-link:hover { text-decoration: underline; }

.gwcg-empty {
    margin: 18px 0;
    padding: 12px 16px;
    border: 1px dashed var(--gwcg-border);
    border-radius: 10px;
    color: #516078;
    font-size: 0.9rem;
}

/* ---- full-screen ---- */
.gwcg-ic-close { display: none; }
.gwcg-widget.gwcg-isfs {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* anchor to top — no centred whitespace */
    margin: 0;
    border-radius: 0;
    background: #fff;
    overflow: auto;
}
.gwcg-widget.gwcg-isfs .gwcg-ic-expand { display: none; }
.gwcg-widget.gwcg-isfs .gwcg-ic-close { display: block; }
.gwcg-widget.gwcg-isfs .gwcg-head-bar { border-radius: 0; }
/* the add box sits at the bottom in full screen — open results upward so they
   don't render off the bottom edge */
.gwcg-widget.gwcg-isfs .gwcg-results { top: auto; bottom: 100%; margin: 0 0 6px; }

@media (max-width: 600px) {
    .gwcg-control { flex: 1 1 calc(50% - 10px); min-width: 0; }
    .gwcg-foot { flex-direction: column; align-items: stretch; }
    .gwcg-note { max-width: 100%; }
    .gwcg-compare-link { margin-left: 0; align-self: flex-start; }
}

/* ============================================================
   GPU "X vs Y" comparison pages — verdict + links appended
   after the editor's copy on single gpu_vs posts
   ============================================================ */
.gwc-vs-extra { margin: 26px 0 0; }
.gwc-vs-verdict {
    margin: 22px 0;
    padding: 18px 20px;
    border: 1px solid rgba(3, 124, 255, 0.25);
    border-left: 4px solid #037cff;
    border-radius: 12px;
    background: rgba(3, 124, 255, 0.04);
}
.gwc-vs-verdict h2 { margin: 0 0 8px; font-size: 1.15rem; }
.gwc-vs-verdict p { margin: 0 0 8px; }
.gwc-vs-verdict p:last-child { margin-bottom: 0; }
.gwc-vs-reviews,
.gwc-vs-related { margin: 22px 0; }
.gwc-vs-reviews h3,
.gwc-vs-related h3 { margin: 0 0 10px; font-size: 1rem; text-transform: none !important; }
/* review links stay as pills */
.gwc-vs-reviews ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 12px; }
.gwc-vs-reviews a {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #e0e4ef;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #142033;
    text-decoration: none;
}
.gwc-vs-reviews a:hover { border-color: #037cff; color: #037cff; }
/* related comparisons reuse the homepage widget card grid (.gwc-vsw-*) */

/* vs-page: hide the resolution sweep + the raw "Results Summary" table
   (both kept on the main /gpu-compare/ tool). Performance-across-games stays. */
.gwc-vs-compare #gwc-sweep-card,
.gwc-vs-compare #gwc-debug-wrap { display: none !important; }

/* per-card "Build a PC with…" sections — one column per GPU, side by side */
.gwc-vs-cardbuilds { margin: 30px 0; }
.gwc-vs-cardbuilds > h2 { margin: 0 0 14px; font-size: 1.25rem; }
.gwc-vs-cardbuild-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 22px;
    align-items: start;
}
.gwc-vs-cardbuild { min-width: 0; }
.gwc-vs-cardbuild h3 { margin: 10px 0 12px; font-size: 1.05rem; }
.gwc-vs-embed {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}
.gwc-vs-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.gwc-vs-build {
    display: flex;
    flex-direction: column;
    margin-top: 12px;
    border: 1px solid #e0e4ef;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #142033;
    background: #fff;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.gwc-vs-build:hover { box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12); transform: translateY(-2px); }
/* 16:9 to match the YouTube embed, so article-only and video cards are equal height */
.gwc-vs-build-img { display: block; width: 100%; padding-top: 56.25%; background-size: cover; background-position: center; background-color: #eef1f6; }
.gwc-vs-build-body { display: block; padding: 12px 14px; color: #142033; text-decoration: none; }
.gwc-vs-build-kicker { display: block; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: #037cff; margin-bottom: 4px; }
.gwc-vs-build-title { display: block; font-weight: 700; font-size: 0.95rem; line-height: 1.3; }
.gwc-vs-build-exc { display: block; margin-top: 5px; font-size: 0.82rem; color: #516078; line-height: 1.4; }
a.gwc-vs-build-body:hover .gwc-vs-build-title { text-decoration: underline; }
/* combined card: the video sits in the thumbnail slot (card already clips corners) */
.gwc-vs-build--video .gwc-vs-embed { border-radius: 0; }

/* ============================================================
   Popular GPU Comparisons — homepage widget grid
   ============================================================ */
.gwc-vsw { margin: 24px 0; }
.gwc-vsw-title { margin: 0 0 14px; font-size: 1.3rem; }
.gwc-vsw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.gwc-vsw-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e4ef;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: #142033;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.gwc-vsw-card:hover { box-shadow: 0 10px 26px rgba(15, 23, 42, 0.14); transform: translateY(-2px); }
.gwc-vsw-thumb { display: block; width: 100%; padding-top: 52%; background-size: cover; background-position: center; background-color: #eef1f6; }
.gwc-vsw-name {
    display: block;
    padding: 12px 14px;
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.3;
}
