/* fc-pgn-validator.css
   Redesigned PGN Validator — FelixChess on Aegis XP.
   Requires main.css (base variables: --color-green, --radius-circle, etc.)
   Class prefix: fc-pv  (Felix Chess PGN Validator)
   ================================================================ */

/* ── Component-scoped custom properties ───────────────────────── */
.fc-pv {
    --fc-pv-bg:      #202020;
    --fc-pv-surf:    #161618;
    --fc-pv-surf2:   #1e1e21;
    --fc-pv-bdr:     rgba(255,255,255,0.07);
    --fc-pv-bdr2:    rgba(255,255,255,0.13);
    --fc-pv-tx:      rgba(255,255,255,0.87);
    --fc-pv-mut:     rgba(255,255,255,0.42);
    --fc-pv-mono:    'SF Mono','Fira Mono',ui-monospace,monospace;

    /* semantic colours */
    --fc-pv-total:   rgba(255,255,255,0.87);
    --fc-pv-valid:   #7ed97a;
    --fc-pv-error:   #ff3b30;
    --fc-pv-remark:  #5dd5e0;
    --fc-pv-special: #b7a6ff;
    --fc-pv-dup:     #ff9f40;
    --fc-pv-warn:    #f2d46b;

    background: var(--fc-pv-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    min-height: 645.8px;
    width: 100%;
    box-sizing: border-box;
}

/* ── Dark body section ────────────────────────────────────────── */
.fc-pv .fc-pv__body {
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    margin-inline: 0;
    min-height: inherit;
    display: flex;
    flex-direction: column;
}

.fc-pv .fc-pv__body-inner {
    padding-block: 32px 40px;
    flex: 1;
    width: 100%;
    box-sizing: border-box;
}

.fc-pv .fc-pv__feature-header {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) auto minmax(120px, 0.35fr);
    align-items: center;
    gap: 32px;
    margin-bottom: 28px;
}

.fc-pv .fc-pv__intro {
    grid-column: 1;
    max-width: 520px;
    padding-left: 20px;
}

.fc-pv .fc-pv__intro-title {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: 0;
}

.fc-pv .fc-pv__intro-subtitle {
    margin: 12px 0 0;
    max-width: 440px;
    color: rgba(255,255,255,0.58);
    font-size: 15px;
    line-height: 1.55;
}

.fc-pv .fc-pv__feature-controls {
    display: flex;
    grid-column: 2;
    justify-content: center;
    justify-self: center;
    min-width: 0;
    width: 100%;
}

/* ══════════════════════════════════════════════════════════════
   UPLOAD ROW
   ══════════════════════════════════════════════════════════════ */

.fc-pv .fc-pv__upload {
    display: grid;
    gap: 14px;
    place-items: start;
    width: 100%;
    max-width: 640px;
}

@media (min-width: 640px) {
    .fc-pv .fc-pv__upload {
        grid-template-columns: 52px auto; /* auto: only as wide as controls need */
        justify-content: end;
        place-items: start;
        align-items: center;
        gap: 20px;
    }
}

/* Upload icon circle */
.fc-pv .fc-pv__upload-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-circle, 50%);
    border: 2px solid rgba(182,255,59,0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.fc-pv .fc-pv__upload-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-circle, 50%);
}

.fc-pv .fc-pv__upload-controls {
    display: grid;
    gap: 12px;
    width: 100%;
}

/* Hidden native input */
.fc-pv .fc-pv__file-input {
    position: absolute;
    width: 1px; height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Chooser + filename row */
.fc-pv .fc-pv__file-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

/* Override main.css button shape for the pill-style chooser */
.fc-pv .fc-pv__choose-btn {
    border-radius: 20px !important;
    font-size: 11px !important;
    letter-spacing: 0.07em !important;
    padding: 8px 20px !important;
    white-space: nowrap;
}

/* Filename display */
.fc-pv .fc-pv__filename {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--fc-pv-mut);
    font-family: var(--fc-pv-mono);
}

.fc-pv.is-file-selected .fc-pv__filename {
    color: var(--fc-pv-tx);
}

.fc-pv .fc-pv__filename-ok {
    display: inline-flex;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.fc-pv .fc-pv__filename-ok img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Hint */
.fc-pv .fc-pv__limits {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.4;
    color: var(--fc-pv-mut);
}

.fc-pv .fc-pv__hint {
    font-size: 11.5px;
    color: var(--fc-pv-mut);
}

.fc-pv .fc-pv__limit-error {
    margin-top: 8px;
    font-size: 11.5px;
    line-height: 1.5;
    color: #ff4d4d;
}

.fc-pv .fc-pv__limit-error-msg {
    display: block;
}

.fc-pv .fc-pv__limit-error-cta {
    display: block;
    margin-top: 2px;
    opacity: 0.75;
}

.fc-pv .fc-pv__limit-error[hidden] {
    display: none;
}

.fc-pv .fc-pv__loading-msg {
    margin-top: 8px;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--fc-pv-mut);
    font-style: italic;
}

.fc-pv .fc-pv__loading-msg[hidden] {
    display: none;
}

/* ══════════════════════════════════════════════════════════════
   DOWNLOAD XLSX BUTTON
   Sits inline after the three action pills. Uses the same height
   and border treatment as pills but is icon-only — no label text.
   ══════════════════════════════════════════════════════════════ */

.fc-pv .fc-pv__download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid var(--fc-pv-bdr2);
    background: transparent;
    color: var(--fc-pv-mut);
    cursor: not-allowed;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
    flex-shrink: 0;
}

.fc-pv .fc-pv__download-btn svg {
    width: 16px;
    height: 16px;
    pointer-events: none;
}

/* Disabled state — matches pill disabled opacity */
.fc-pv .fc-pv__download-btn.is-disabled,
.fc-pv .fc-pv__download-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

/* Enabled state — after successful validation */
.fc-pv .fc-pv__download-btn.is-enabled {
    color: var(--fc-pv-tx);
    opacity: 1;
    cursor: pointer;
}

.fc-pv .fc-pv__download-btn.is-enabled:hover {
    border-color: rgba(255,255,255,0.26);
    color: #fff;
    background: rgba(255,255,255,0.06);
}

/* Downloading state — brief visual feedback while fetch is in flight */
.fc-pv .fc-pv__download-btn.is-downloading {
    opacity: 0.6;
    cursor: wait;
}

.fc-pv .fc-pv__pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
}

.fc-pv .fc-pv__pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 18px;
    border-radius: 20px;
    border: 1px solid var(--fc-pv-bdr2);
    background: transparent;
    color: var(--fc-pv-mut);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.fc-pv .fc-pv__pill:hover:not(:disabled) {
    border-color: rgba(255,255,255,0.26);
    color: var(--fc-pv-tx);
}

.fc-pv .fc-pv__pill:not(:disabled):not(.is-disabled),
.fc-pv .fc-pv__pill.is-enabled {
    color: var(--fc-pv-tx);
    opacity: 1;
    cursor: pointer;
    font-weight: 700;
}

.fc-pv .fc-pv__pill:not(:disabled):not(.is-disabled) .fc-pv__pill-label,
.fc-pv .fc-pv__pill.is-enabled .fc-pv__pill-label {
    color: inherit;
    opacity: 1;
    font-weight: inherit;
}

.fc-pv .fc-pv__pill.is-active {
    background: var(--color-green, #b6ff3b);
    color: #000;
    border-color: var(--color-green, #b6ff3b);
}

.fc-pv .fc-pv__pill:disabled,
.fc-pv .fc-pv__pill.is-disabled,
.fc-pv .fc-pv__pill[aria-disabled="true"] {
    color: var(--fc-pv-mut);
    opacity: 0.48;
    cursor: not-allowed;
}

.fc-pv .fc-pv__pill:disabled .fc-pv__pill-label,
.fc-pv .fc-pv__pill.is-disabled .fc-pv__pill-label,
.fc-pv .fc-pv__pill[aria-disabled="true"] .fc-pv__pill-label {
    color: inherit;
    opacity: 1;
}

/* Integrated count badge inside pill */
.fc-pv .fc-pv__pill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 50%;
    font-size: 9.5px;
    font-weight: 700;
    background: rgba(0,0,0,0.18);
}

.fc-pv .fc-pv__pill.is-active .fc-pv__pill-count {
    background: rgba(0,0,0,0.2);
    color: #000;
}

.fc-pv .fc-pv__pill-count[hidden] { display: none !important; }

/* Validate pill: label + spinner flex row */
.fc-pv .fc-pv__pill--validate {
    justify-content: center;
}

/* Spinner — hidden by default, shown when .is-loading is on root */
.fc-pv .fc-pv__pill-spinner {
    width: 12px; height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.22);
    border-top-color: rgba(0,0,0,0.82);
    display: none;
    animation: fc-pv-spin 0.8s linear infinite;
    flex-shrink: 0;
}

.fc-pv .fc-pv__pill--validate.is-active .fc-pv__pill-spinner {
    border-color: rgba(0,0,0,0.22);
    border-top-color: rgba(0,0,0,0.82);
}

.fc-pv.is-loading .fc-pv__pill-spinner {
    display: inline-block;
}

@keyframes fc-pv-spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════
   PANELS
   ══════════════════════════════════════════════════════════════ */

.fc-pv .fc-pv__panel {
    margin-top: 20px;
    box-sizing: border-box;
    padding-left: 30px;
    padding-right: 30px;
}

/* Important: panel[hidden] must be display:none, not just visibility hidden */
.fc-pv .fc-pv__panel[hidden] { display: none !important; }

/* ── Count bar ─────────────────────────────────────────────── */
.fc-pv .fc-pv__count-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--fc-pv-mut);
    margin-bottom: 12px;
}

.fc-pv .fc-pv__count-bar strong {
    color: var(--fc-pv-tx);
    font-weight: 500;
}

.fc-pv .fc-pv__count-sep {
    opacity: 0.32;
    user-select: none;
}

/* White/black win colouring in player count bar */
.fc-pv .fc-pv__count-white { color: var(--fc-pv-valid);  font-weight: 500; }
.fc-pv .fc-pv__count-black { color: var(--fc-pv-warn);   font-weight: 500; }

/* Duration badge */
.fc-pv .fc-pv__duration {
    font-family: var(--fc-pv-mono);
    font-size: 10.5px;
    background: var(--fc-pv-surf);
    border: 1px solid var(--fc-pv-bdr);
    border-radius: 3px;
    padding: 2px 7px;
    color: var(--fc-pv-mut);
}

/* ── Stat chips ────────────────────────────────────────────── */
.fc-pv .fc-pv__chips {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.fc-pv .fc-pv__chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 4px;
    background: var(--fc-pv-surf);
    border: 1px solid var(--fc-pv-bdr);
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
    line-height: 1;
}

.fc-pv .fc-pv__chip:hover {
    background: var(--fc-pv-surf2);
}

.fc-pv .fc-pv__chip.is-active {
    background: var(--fc-pv-surf2);
    border-color: var(--fc-pv-bdr2);
}

.fc-pv .fc-pv__chip-num {
    font-size: 18px;
    font-weight: 500;
    font-family: var(--fc-pv-mono);
    line-height: 1;
}

.fc-pv .fc-pv__chip-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fc-pv-mut);
    line-height: 1.25;
    white-space: nowrap;
}

/* Chip number colour variants */
.fc-pv .fc-pv__chip--total  .fc-pv__chip-num { color: var(--fc-pv-total); }
.fc-pv .fc-pv__chip--valid  .fc-pv__chip-num { color: var(--fc-pv-valid); }
.fc-pv .fc-pv__chip--error  .fc-pv__chip-num { color: var(--fc-pv-error); }
.fc-pv .fc-pv__chip--remark .fc-pv__chip-num { color: var(--fc-pv-remark); }
.fc-pv .fc-pv__chip--special .fc-pv__chip-num { color: var(--fc-pv-special); }

/* ── Section label (file name above accordion list) ─────────── */
.fc-pv .fc-pv__accordion-title {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--fc-pv-mut);
    margin-bottom: 8px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--fc-pv-bdr);
}

.fc-pv .fc-pv__accordion-wrap[hidden],
.fc-pv .fc-pv__lists-host[hidden],
.fc-pv .fc-pv__eco-host[hidden] { display: none !important; }

/* ══════════════════════════════════════════════════════════════
   ACCORDIONS  (shared by Validate and ECO group panels)
   ══════════════════════════════════════════════════════════════ */

.fc-pv .fc-pv__accordions {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Single accordion */
.fc-pv .fc-pv__acc {
    overflow: hidden;
    border: 1px solid var(--fc-pv-bdr);
    background: var(--fc-pv-surf);
}

/* Header row */
.fc-pv .fc-pv__acc-header {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    user-select: none;
    border-left: 4px solid var(--acc-color, #5dd5e0);
    border-radius: 0; /* no rounding on single-sided border */
}

.fc-pv .fc-pv__acc-title {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fc-pv-tx);
}

.fc-pv .fc-pv__acc-badge {
    width: 20px; height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9.5px;
    font-weight: 900;
    color: #000;
    background: var(--acc-color, #5dd5e0);
    flex-shrink: 0;
}

.fc-pv .fc-pv__acc-meta {
    font-size: 10px;
    color: var(--fc-pv-mut);
}

.fc-pv .fc-pv__acc-meta strong {
    color: rgba(255,255,255,0.65);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 9.5px;
}

.fc-pv .fc-pv__acc-chev {
    width: 20px; height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--fc-pv-bdr);
    font-size: 12px;
    color: var(--fc-pv-mut);
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

.fc-pv .fc-pv__acc[data-open="true"] .fc-pv__acc-chev {
    transform: rotate(180deg);
}

/* Body */
.fc-pv .fc-pv__acc-body {
    display: none;
    border-top: 1px solid var(--fc-pv-bdr);
}

.fc-pv .fc-pv__acc[data-open="true"] .fc-pv__acc-body {
    display: block;
}

/* Duplicate block description sub-header */
.fc-pv .fc-pv__acc-description {
    padding: 9px 14px;
    font-size: 11px;
    font-style: italic;
    color: rgba(255,255,255,0.52);
    border-bottom: 1px solid var(--fc-pv-bdr);
    background: var(--fc-pv-surf2);
}

/* ── Game rows ──────────────────────────────────────────── */
.fc-pv .fc-pv__row {
    padding: 9px 14px;
    border-top: 1px solid rgba(255,255,255,0.04);
    display: grid;
    gap: 3px;
    background: #18090e;  /* very dark burgundy — matches existing acc body tone */
}

.fc-pv .fc-pv__row:first-child { border-top: none; }

/* Duplicate row variant */
.fc-pv .fc-pv__row--duplicate {
    border-left: 3px solid var(--fc-pv-dup);
    padding-left: 11px;
}

.fc-pv .fc-pv__row-top {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .fc-pv .fc-pv__row-top {
        gap: 6px;
    }
}

.fc-pv .fc-pv__row-players {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: rgba(255,255,255,0.84);
    flex-shrink: 0;
}

.fc-pv .fc-pv__row-result {
    font-family: var(--fc-pv-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--fc-pv-mut);
    white-space: nowrap;
}

.fc-pv .fc-pv__row-event {
    font-size: 10px;
    color: var(--fc-pv-mut);
    flex: 1;
    text-align: right;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.fc-pv .fc-pv__row-round {
    font-size: 10px;
    color: var(--fc-pv-mut);
    font-family: var(--fc-pv-mono);
    white-space: nowrap;
}

.fc-pv .fc-pv__row-msg {
    font-size: 11px;
    color: rgba(255,255,255,0.62);
    font-weight: 500;
}

.fc-pv .fc-pv__row-detail {
    font-size: 10px;
    color: var(--fc-pv-mut);
    font-family: var(--fc-pv-mono);
    line-height: 1.45;
}

.fc-pv .fc-pv__row-detail--duplicate {
    color: var(--fc-pv-dup);
    font-weight: 700;
    font-size: 10.5px;
}

/* Show-more strip */
.fc-pv .fc-pv__showmore {
    padding: 9px 14px 11px;
    border-top: 1px solid var(--fc-pv-bdr);
    background: #18090e;
}

.fc-pv .fc-pv__showmore button {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.84);
    border-radius: 999px;
    padding: 5px 13px;
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.03em;
}

.fc-pv .fc-pv__showmore button:hover {
    background: rgba(255,255,255,0.14);
}

/* ══════════════════════════════════════════════════════════════
   PLAYERS TABLE
   ══════════════════════════════════════════════════════════════ */

.fc-pv .fc-pv__table-wrap {
    background: var(--fc-pv-surf);
    border: 1px solid var(--fc-pv-bdr);
    overflow-x: auto;
    margin-top: 2px;
}

.fc-pv .fc-pv__table-title {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 13px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--fc-pv-mut);
    border-bottom: 1px solid var(--fc-pv-bdr);
}

.fc-pv .fc-pv__table-link {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-decoration: underline;
    opacity: 0.75;
    padding: 0;
}

.fc-pv .fc-pv__table-link:hover { opacity: 1; }

.fc-pv .fc-pv__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.fc-pv .fc-pv__table th {
    padding: 7px 10px;
    text-align: left;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fc-pv-mut);
    border-bottom: 1px solid var(--fc-pv-bdr);
    background: var(--fc-pv-surf2);
    white-space: normal;
}

.fc-pv .fc-pv__table td {
    padding: 7px 10px;
    border-top: 1px solid rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.8);
}

.fc-pv .fc-pv__table tr:hover td {
    background: var(--fc-pv-surf2);
}

.fc-pv .fc-pv__table td.is-num,
.fc-pv .fc-pv__table th.is-num {
    text-align: right;
    font-family: var(--fc-pv-mono);
    font-size: 10.5px;
    white-space: nowrap;
}

/* Sortable column headers */
.fc-pv .fc-pv__th-sort { padding: 0; }

.fc-pv .fc-pv__sort-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    background: transparent;
    border: 0;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
}

.fc-pv .fc-pv__sort-icon { font-size: 11px; }
.fc-pv .fc-pv__sort-icon::before { content: "▲"; opacity: 0.5; }
.fc-pv .fc-pv__sort-icon::after  { content: "▼"; opacity: 0.5; }

.fc-pv th[data-sort-dir="asc"]  .fc-pv__sort-icon::before { opacity: 0.2; }
.fc-pv th[data-sort-dir="asc"]  .fc-pv__sort-icon::after  { opacity: 0.95; }
.fc-pv th[data-sort-dir="desc"] .fc-pv__sort-icon::before { opacity: 0.95; }
.fc-pv th[data-sort-dir="desc"] .fc-pv__sort-icon::after  { opacity: 0.2; }

/* ══════════════════════════════════════════════════════════════
   ECO OPENINGS PANEL
   ══════════════════════════════════════════════════════════════ */

/* Outer collapsible card */
.fc-pv .fc-pv__eco-card {
    background: var(--fc-pv-surf);
    border: 1px solid var(--fc-pv-bdr);
    overflow: hidden;
}

.fc-pv .fc-pv__eco-card-header {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    cursor: pointer;
    user-select: none;
    border-left: 4px solid var(--color-green, #b6ff3b);
    border-radius: 0;
}

.fc-pv .fc-pv__eco-card-title {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fc-pv-tx);
}

.fc-pv .fc-pv__eco-card-count {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--color-green, #b6ff3b);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.fc-pv .fc-pv__eco-card-meta {
    font-size: 10px;
    color: var(--fc-pv-mut);
}

.fc-pv .fc-pv__eco-card-meta strong {
    color: rgba(255,255,255,0.65);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 9.5px;
}

.fc-pv .fc-pv__eco-card-chev {
    width: 20px; height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--fc-pv-bdr);
    font-size: 12px;
    color: var(--fc-pv-mut);
    transition: transform 0.15s ease;
    flex-shrink: 0;
}

.fc-pv .fc-pv__eco-card[data-open="true"] .fc-pv__eco-card-chev {
    transform: rotate(180deg);
}

.fc-pv .fc-pv__eco-card-body {
    display: none;
    border-top: 1px solid var(--fc-pv-bdr);
}

.fc-pv .fc-pv__eco-card[data-open="true"] .fc-pv__eco-card-body {
    display: block;
}

/* Group accordions A–E inside the card */
.fc-pv .fc-pv__eco-accordions { display: grid; gap: 0; }

/* eco-group overrides: flush, no extra borders, no radius */
.fc-pv .fc-pv__eco-group {
    border-left: none;
    border-right: none;
    border-bottom: none;
    border-top: 1px solid var(--fc-pv-bdr);
    border-radius: 0;
}

.fc-pv .fc-pv__eco-group:first-child { border-top: none; }

/* Slightly darker body for group interiors */
.fc-pv .fc-pv__eco-group .fc-pv__acc-body {
    background: #111114;
}

.fc-pv .fc-pv__eco-empty {
    padding: 12px 14px;
    font-size: 11px;
    font-style: italic;
    color: rgba(255,255,255,0.28);
}

/* ECO entry rows */
.fc-pv .fc-pv__eco-row {
    display: grid;
    grid-template-columns: 62px 1fr auto;
    gap: 14px;
    align-items: start;
    padding: 9px 14px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.fc-pv .fc-pv__eco-row:first-child { border-top: none; }

@media (max-width: 720px) {
    .fc-pv .fc-pv__eco-row {
        grid-template-columns: 62px 1fr;
    }
    .fc-pv .fc-pv__eco-row-count {
        justify-self: end;
        grid-column: 2;
    }
}

.fc-pv .fc-pv__eco-codes {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.fc-pv .fc-pv__eco-code {
    display: inline-block;
    background: var(--badge-color, #5dd5e0);
    color: rgba(0,0,0,0.85);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.07em;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    font-family: var(--fc-pv-mono);
    width: fit-content;
}

.fc-pv .fc-pv__eco-scid {
    font-size: 9.5px;
    color: var(--fc-pv-mut);
    font-family: var(--fc-pv-mono);
    letter-spacing: 0.04em;
}

.fc-pv .fc-pv__eco-name {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.84);
    line-height: 1.3;
}

.fc-pv .fc-pv__eco-moves {
    font-family: var(--fc-pv-mono);
    font-size: 10px;
    color: var(--fc-pv-mut);
    line-height: 1.4;
    margin-top: 2px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.fc-pv .fc-pv__eco-row-count {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.fc-pv .fc-pv__eco-count-badge {
    display: inline-block;
    background: var(--badge-color, #5dd5e0);
    color: rgba(0,0,0,0.85);
    font-size: 13px;
    font-weight: 900;
    padding: 3px 11px;
    border-radius: 999px;
    min-width: 36px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.fc-pv .fc-pv__eco-count-label {
    font-size: 8.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fc-pv-mut);
}

/* "No ECO codes" amber bar */
.fc-pv .fc-pv__eco-nobar {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    background: var(--fc-pv-surf);
    border: 1px solid var(--fc-pv-bdr);
    border-left: 4px solid var(--fc-pv-dup);
    border-radius: 0;
}

.fc-pv .fc-pv__eco-nobar-title {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fc-pv-tx);
}

.fc-pv .fc-pv__eco-nobar-count {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--fc-pv-dup);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    color: #000;
    font-variant-numeric: tabular-nums;
}

.fc-pv .fc-pv__eco-nobar-meta {
    font-size: 10px;
    color: var(--fc-pv-mut);
}

.fc-pv .fc-pv__eco-nobar-meta strong {
    color: rgba(255,255,255,0.7);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Detect / warn note strip */
.fc-pv .fc-pv__eco-detect-note {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 14px;
    background: var(--fc-pv-surf);
    border: 1px solid var(--fc-pv-bdr);
    border-top: none;
    color: rgba(255,255,255,0.6);
    font-size: 11px;
    font-weight: 600;
}

.fc-pv .fc-pv__eco-detect-note--warn {
    border-left: 4px solid var(--fc-pv-dup);
    color: rgba(255,200,130,0.85);
    border-radius: 0;
}

.fc-pv .fc-pv__eco-detect-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.88);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.fc-pv .fc-pv__eco-detect-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.15);
}

.fc-pv .fc-pv__eco-detect-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 980px) {
    .fc-pv .fc-pv__feature-header {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 24px;
    }

    .fc-pv .fc-pv__intro,
    .fc-pv .fc-pv__intro-subtitle {
        max-width: none;
    }

    .fc-pv .fc-pv__intro,
    .fc-pv .fc-pv__feature-controls {
        grid-column: 1;
    }

    .fc-pv .fc-pv__feature-controls {
        justify-content: flex-start;
        justify-self: stretch;
    }

    .fc-pv .fc-pv__upload {
        max-width: none;
    }

    @media (min-width: 640px) {
        .fc-pv .fc-pv__upload {
            justify-content: start;
        }
    }
}

@media (max-width: 700px) {
    .fc-pv .fc-pv__body-inner {
        padding-block: 28px 36px;
    }

    .fc-pv .fc-pv__upload {
        place-items: stretch;
    }

    .fc-pv .fc-pv__file-row,
    .fc-pv .fc-pv__pills {
        align-items: flex-start;
    }
}
