/* ------------------------------------------------------------------
 * Old Product Versions v4 — all selectors are namespaced .gplopv-*
 * and scoped under .gplopv-root so theme/WooCommerce rules can't
 * reach in. Nothing here leaks out to the rest of the page either.
 *
 * Structure: a bordered panel split into a white header strip and a
 * tinted body. No background pattern — behind white cards it only
 * ever read as noise; the header strip gives the section its identity
 * instead.
 * ------------------------------------------------------------------ */
.gplopv-root {
    /* Straight from the theme's palette, with gpltimes.com's own
       values as fallbacks. */
    --gplopv-accent: var(--main-color, #1a8fc4);
    --gplopv-accent-soft: var(--soft-main-light, rgba(26, 143, 196, .08));
    --gplopv-dark: #555;
    --gplopv-dark-hover: #444;
    --gplopv-ink: #1b2027;
    --gplopv-muted: #79818d;
    --gplopv-line: #e4e8ee;
    --gplopv-soft: #eef0f4;
    --gplopv-body: #f7f9fb;

    margin: 28px 0 8px;
    border: 1px solid var(--gplopv-line);
    border-radius: 16px;
    overflow: hidden;
    font-family: inherit;
    color: var(--gplopv-ink);
    background: #fff;
}
.gplopv-root *,
.gplopv-root *::before,
.gplopv-root *::after { box-sizing: border-box; }

/* ---------- header strip ---------- */
.gplopv-root .gplopv-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 14px 18px;
    background: #fff;
    border-bottom: 1px solid var(--gplopv-line);
}
.gplopv-root .gplopv-head-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 9px;
    background: var(--gplopv-accent-soft);
    color: var(--gplopv-accent);
}
.gplopv-root .gplopv-head-icon svg { width: 17px; height: 17px; }
.gplopv-root .gplopv-head-title {
    margin: 0;
    padding: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--gplopv-ink);
    letter-spacing: -0.015em;
}
.gplopv-root .gplopv-count {
    display: inline-block;
    margin-left: auto;
    padding: 4px 11px;
    border-radius: 50px;
    background: var(--gplopv-soft);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    color: #616a76;
    white-space: nowrap;
}

/* ---------- body ---------- */
.gplopv-root .gplopv-body {
    padding: 16px;
    background: var(--gplopv-body);
}
.gplopv-root .gplopv-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.gplopv-root.gplopv-2col .gplopv-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ---------- card ---------- */
.gplopv-root .gplopv-card {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    margin: 0;
    padding: 13px 14px;
    background: #fff;
    border: 1px solid #e8ecf2;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.gplopv-root .gplopv-card:hover {
    border-color: var(--gplopv-accent);
    box-shadow: 0 6px 18px rgba(16, 24, 40, .08);
    transform: translateY(-1px);
}
/* The leading tile anchors the row so a short line of text doesn't
   leave the card looking hollow. */
.gplopv-root .gplopv-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 10px;
    background: var(--gplopv-accent-soft);
    color: var(--gplopv-accent);
}
.gplopv-root .gplopv-icon svg { width: 19px; height: 19px; }
.gplopv-root .gplopv-card-main {
    flex: 1 1 auto;
    min-width: 0;
}

/* ---------- version line ---------- */
.gplopv-root .gplopv-ver {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 4px;
}
.gplopv-root .gplopv-pname {
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--gplopv-ink);
    letter-spacing: -0.012em;
    word-break: break-word;
}
.gplopv-root .gplopv-vnum {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 50px;
    background: var(--gplopv-accent-soft);
    color: var(--gplopv-accent);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.gplopv-root .gplopv-vnum::before {
    content: "v";
    opacity: .5;
    font-weight: 600;
}
/* "Dokan Pro 5.0.13" needs no "v"; a bare version still gets one. */
.gplopv-root .gplopv-vnum.gplopv-vplain::before { content: none; }
/* Fallback: no version parsed, so the whole name shows as plain text. */
.gplopv-root .gplopv-vnum.gplopv-vname {
    padding: 0;
    background: none;
    font-size: 13.5px;
    color: var(--gplopv-ink);
    white-space: normal;
    word-break: break-word;
}
.gplopv-root .gplopv-vnum.gplopv-vname::before { content: none; }
.gplopv-root .gplopv-tag {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 50px;
    background: var(--gplopv-soft);
    color: var(--gplopv-dark);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
}

/* ---------- meta line ---------- */
.gplopv-root .gplopv-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--gplopv-muted);
    font-variant-numeric: tabular-nums;
}
.gplopv-root .gplopv-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.gplopv-root .gplopv-i {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    opacity: .6;
}
.gplopv-root .gplopv-sep {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: .45;
}

/* ---------- buttons ---------- */
.gplopv-root .gplopv-card-act { flex: 0 0 auto; }
.gplopv-root a.gplopv-btn {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid transparent;
    border-radius: 50px;
    background: var(--gplopv-accent);
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    transition: filter .18s ease, opacity .18s ease;
}
.gplopv-root a.gplopv-btn:hover,
.gplopv-root a.gplopv-btn:focus {
    filter: brightness(1.08);
    color: #fff !important;
    text-decoration: none !important;
}
.gplopv-root a.gplopv-btn:focus-visible {
    outline: 2px solid var(--gplopv-accent);
    outline-offset: 2px;
}
/* Join Now is the non-member's primary action, so it carries the same
   weight as Download — a visitor only ever renders one of the two. */
.gplopv-root a.gplopv-join {
    box-shadow: 0 3px 10px var(--soft-main, rgba(26, 143, 196, .25));
}
.gplopv-root a.gplopv-dl.gplopv-loading {
    opacity: .65;
    pointer-events: none;
}

/* ---------- load more ---------- */
.gplopv-root .gplopv-more-wrap {
    display: flex;
    justify-content: center;
    margin: 16px 0 2px;
}
.gplopv-root button.gplopv-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 13px 28px;
    border: 1px solid transparent;
    border-radius: 50px;
    background: var(--gplopv-dark);
    color: #fff;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.4;
    text-transform: none;
    cursor: pointer;
    box-shadow: none;
    transition: background-color .18s ease;
}
.gplopv-root button.gplopv-more:hover:not([disabled]) {
    background: var(--gplopv-dark-hover);
    color: #fff;
}
.gplopv-root button.gplopv-more:focus-visible {
    outline: 2px solid var(--gplopv-dark);
    outline-offset: 2px;
}
.gplopv-root button.gplopv-more[disabled] {
    opacity: .6;
    cursor: default;
}
.gplopv-root button.gplopv-more .gplopv-i {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    opacity: .9;
}
.gplopv-root button.gplopv-more[disabled] .gplopv-i {
    animation: gplopv-spin 1s linear infinite;
}
@keyframes gplopv-spin { to { transform: rotate(360deg); } }

/* Newly loaded cards fade in */
.gplopv-root .gplopv-new { animation: gplopv-fade .28s ease both; }
@keyframes gplopv-fade {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media screen and (max-width: 640px) {
    .gplopv-root.gplopv-2col .gplopv-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .gplopv-root .gplopv-head { padding: 13px 14px; }
    .gplopv-root .gplopv-body { padding: 13px; }
    .gplopv-root .gplopv-card { padding: 12px; gap: 11px; }
    .gplopv-root .gplopv-icon {
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
    }
    .gplopv-root .gplopv-pname { font-size: 14px; }
    .gplopv-root .gplopv-meta { font-size: 12px; }
    .gplopv-root a.gplopv-btn { padding: 8px 16px; }
    .gplopv-root button.gplopv-more { padding: 12px 26px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .gplopv-root .gplopv-card,
    .gplopv-root a.gplopv-btn,
    .gplopv-root button.gplopv-more { transition: none; }
    .gplopv-root .gplopv-new { animation: none; }
    .gplopv-root button.gplopv-more[disabled] .gplopv-i { animation: none; }
}
