/* Game performance estimates. Scoped to the configurator summary; the module is omitted when the shop setting is off. */
.cfg-games-launch {
    display: inline-flex; align-items: center; margin: 14px 0 0; padding: 0;
    border: 0; background: none; color: var(--pc-ink); font: 600 15px/1.3 var(--pc-font);
    text-decoration: underline; text-decoration-color: #b4b4bb; text-underline-offset: 4px; cursor: pointer;
}
.cfg-games-launch:hover { text-decoration-color: currentColor; }
.cfg-games-launch--compact { margin-top: 10px; font-size: 14px; }

.cfg-sum__tabs {
    display: none; gap: 4px; margin: 0 0 12px; padding: 0; border-bottom: 1px solid var(--pc-line);
}
.cfg-sum__tab {
    margin: 0 0 -1px; padding: 8px 12px 10px; border: 0; border-radius: 12px 12px 0 0;
    background: none; color: var(--pc-muted); font: 600 14px/1.2 var(--pc-font); cursor: pointer;
}
.cfg-sum__tab[aria-selected="true"] { color: var(--pc-ink); box-shadow: inset 0 -2px 0 var(--pc-red); }
@media (min-width: 1024px) {
    .cfg-sum__tabs { display: flex; }
    .cfg:has(.cfg-bar.is-shown) .cfg-sum__card:has(.cfg-sum__stage) {
        max-height: calc(100dvh - var(--cfg-head) - var(--cfg-bar-h) - 112px);
    }
}

.cfg-games { margin: 0; color: var(--pc-ink); }
.cfg-games__title { margin: 0; font: 750 16px/1.3 var(--pc-font); letter-spacing: -.015em; }
.cfg-games__title:focus { outline: none; }
.cfg-games__title:focus-visible { outline: 2px solid #111111; outline-offset: 3px; border-radius: 4px; }
.cfg-games__sub { margin: 3px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--pc-ink-2); }
.cfg-games__hardware {
    display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px;
    margin: 8px 0 0; padding: 4px 8px; border-radius: 6px;
    background: var(--pc-plate); font-size: 11.5px; line-height: 1.4; color: var(--pc-ink-2);
}
.cfg-games__hardware span { overflow-wrap: anywhere; }
.cfg-games__hardware span strong { color: var(--pc-ink); }

/* Refined Segmented Control */
.cfg-games__resolutions {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px;
    margin: 14px 0 12px; padding: 3px; border: 1px solid var(--pc-line);
    border-radius: 10px; background: var(--pc-plate);
}
.cfg-games__resolutions label {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-width: 0; min-height: 38px; margin: 0; padding: 6px 4px;
    border: 1px solid transparent; border-radius: 7px; background: transparent;
    color: var(--pc-ink-2); font-size: 12.5px; font-weight: 700; line-height: 1.2;
    text-align: center; cursor: pointer; transition: all 0.15s ease;
}
.cfg-games__resolutions label:hover { background: #ffffff; color: var(--pc-ink); }
.cfg-games__resolutions label:has(input:checked),
.cfg-games__resolutions label:has(input:checked):hover {
    border-color: #111113; background: #111113; color: #ffffff;
    box-shadow: 0 2px 6px rgba(17, 17, 19, .15);
}
.cfg-games__resolutions label:has(input:focus-visible) { outline: 2px solid #111111; outline-offset: 2px; }
.cfg-games__resolutions input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.cfg-games__preview {
    margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: var(--pc-plate);
    font-size: 12px; line-height: 1.45; color: var(--pc-ink);
}
.cfg-games__status { margin: 0 0 8px; font-size: 12.5px; line-height: 1.45; color: var(--pc-ink-2); }
.cfg-games__error { margin: 0 0 8px; font-size: 12.5px; line-height: 1.45; color: #9f1239; }
.cfg-games__retry { min-height: 38px; margin: 0 0 8px; font-size: 13px; }

/* Game list & items */
.cfg-games__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.cfg-games__item {
    margin: 0; border: 1px solid var(--pc-line); border-radius: 10px;
    background: #ffffff; transition: border-color 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
}
.cfg-games__item:hover { border-color: var(--pc-line-strong); box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
.cfg-games__item:has(.cfg-games__toggle[aria-expanded="true"]) {
    border-color: #94a3b8; box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.cfg-games__toggle {
    display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; align-items: center; gap: 8px;
    width: 100%; min-height: 58px; margin: 0; padding: 8px 10px; border: 0; background: none;
    color: var(--pc-ink); font: inherit; text-align: left; cursor: pointer;
}
.cfg-games__cover {
    display: block; width: 44px; height: 44px; border-radius: 7px; background: var(--pc-plate);
    object-fit: cover; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.cfg-games__name {
    display: flex; flex-direction: column; gap: 2px; min-width: 0;
    overflow-wrap: break-word; font-size: 13.5px; font-weight: 700; line-height: 1.25;
}
.cfg-games__edition { font-size: 11.5px; font-weight: 500; line-height: 1.25; color: var(--pc-muted); }

/* Performance Meter Bar within row */
.cfg-games__meta {
    display: flex; align-items: center; gap: 6px; margin-top: 3px;
}
.cfg-games__meter {
    display: flex; gap: 2px; width: 44px; height: 4px; border-radius: 999px; overflow: hidden;
}
.cfg-games__meter-seg {
    flex: 1; background: #e2e8f0; border-radius: 1px;
}
.cfg-games__item:has(.cfg-games__tier--ultra) .cfg-games__meter-seg:nth-child(-n+4) { background: #10b981; }
.cfg-games__item:has(.cfg-games__tier--high) .cfg-games__meter-seg:nth-child(-n+3) { background: #06b6d4; }
.cfg-games__item:has(.cfg-games__tier--medium) .cfg-games__meter-seg:nth-child(-n+2) { background: #f59e0b; }
.cfg-games__item:has(.cfg-games__tier--low) .cfg-games__meter-seg:nth-child(1),
.cfg-games__item:has(.cfg-games__tier--below_target) .cfg-games__meter-seg:nth-child(1) { background: #ef4444; }

/* Tier Badges */
.cfg-games__tier {
    justify-self: end; max-width: 120px; padding: 4px 8px; border: 1px solid transparent; border-radius: 7px;
    font-size: 11.5px; font-weight: 750; line-height: 1.2; text-align: center; letter-spacing: -0.01em;
}
.cfg-games__tier--unknown,
.cfg-games__tier--pending { border-style: dashed; border-color: var(--pc-line-strong); background: transparent; color: var(--pc-ink-2); }
.cfg-games__tier--upcoming { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.cfg-games__tier--below_target { border-color: #fed7aa; background: #fff7ed; color: #9a3412; }
.cfg-games__tier--low { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.cfg-games__tier--medium { border-color: #fde68a; background: #fffbeb; color: #b45309; }
.cfg-games__tier--high { border-color: #a5f3fc; background: #ecfeff; color: #0e7490; }
.cfg-games__tier--ultra { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.cfg-games__tier--unplayable { border-color: #fecdd3; background: #fff1f2; color: #9f1239; }

/* Interactive chevron indicator */
.cfg-games__chevron {
    color: #94a3b8; transition: transform 0.2s ease; flex-shrink: 0;
}
.cfg-games__item:has(.cfg-games__toggle[aria-expanded="true"]) .cfg-games__chevron {
    transform: rotate(180deg);
}

.cfg-games__reserve {
    display: flex; align-items: center; min-height: 58px; font-size: 12.5px; line-height: 1.4; color: var(--pc-ink-2);
}
.cfg-games__more {
    display: block; width: 100%; min-height: 40px; margin: 6px 0 0; padding: 8px 0; border: 0; background: none;
    color: var(--pc-ink); font: 600 13px/1.3 var(--pc-font); text-align: center; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.cfg-games__more:hover { color: var(--pc-red); }

/* Details (Modern Spec Grid Accordion Body) */
.cfg-games__detail {
    padding: 10px 12px 14px; font-size: 12.5px; line-height: 1.45; color: var(--pc-ink);
    background: #fafafa; border-top: 1px solid var(--pc-line);
}
.cfg-games__detail dl {
    margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px;
}
.cfg-games__detail .cfg-games__spec-box {
    display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px;
    background: #ffffff; border: 1px solid var(--pc-line);
}
.cfg-games__detail .cfg-games__spec-role {
    margin: 0; font-size: 10px; font-weight: 750; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--pc-muted);
}
.cfg-games__detail .cfg-games__spec-name {
    display: block; min-width: 0; margin: 0; font-size: 12px; font-weight: 750; color: var(--pc-ink);
    overflow-wrap: anywhere; line-height: 1.3;
}
.cfg-games__detail .cfg-games__spec-value { display: grid; min-width: 0; gap: 2px; margin: 0; }
.cfg-games__detail .cfg-games__spec-rating {
    margin: 2px 0 0; font-size: 11.5px; font-weight: 600; line-height: 1.35;
    color: var(--pc-ink-2);
}
.cfg-games__detail .cfg-games__spec-rating--high, .cfg-games__detail .cfg-games__spec-rating--ultra { color: #047857; }
.cfg-games__detail .cfg-games__spec-rating--medium { color: #92400e; }
.cfg-games__detail .cfg-games__spec-rating--low, .cfg-games__detail .cfg-games__spec-rating--below_target,
.cfg-games__detail .cfg-games__spec-rating--unplayable { color: #b91c1c; }

.cfg-games__detail ul { margin: 10px 0 0; padding: 0; list-style: none; }
.cfg-games__detail li { display: grid; grid-template-columns: 6px minmax(0, 1fr); gap: 8px; margin: 0 0 6px; font-size: 12px; }
.cfg-games__detail li::before { content: ""; width: 5px; height: 5px; margin-top: .55em; border-radius: 50%; background: var(--cfg-games-marker, var(--pc-muted)); }
.cfg-games__detail--high,
.cfg-games__detail--ultra { --cfg-games-marker: #15803d; }
.cfg-games__detail--medium { --cfg-games-marker: #b45309; }
.cfg-games__detail--low,
.cfg-games__detail--below_target,
.cfg-games__detail--unplayable { --cfg-games-marker: #be123c; }
.cfg-games__context {
    margin: 10px 0 0; padding-top: 8px; border-top: 1px dashed var(--pc-line);
    font-size: 11.5px; line-height: 1.45; color: var(--pc-ink-2);
}

/* Note / Disclaimer styling */
.cfg-games__note {
    margin: 12px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--pc-muted);
}
.cfg-games__note summary {
    font-weight: 600; color: var(--pc-ink-2); cursor: pointer; user-select: none;
    margin-bottom: 4px;
}
.cfg-games__note summary:hover { color: var(--pc-ink); }

/* Popover overlay on Desktop (if desktop popover is triggered) */
.cfg-games__popover {
    position: fixed; z-index: 80; box-sizing: border-box; width: min(400px, calc(100vw - 32px));
    max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain;
    padding: 16px 18px; border: 1px solid var(--pc-line); border-radius: 12px; background: #ffffff;
    box-shadow: 0 16px 36px -12px rgba(17, 17, 17, .24);
}
.cfg-games__popover-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 12px; margin-bottom: 10px; }
.cfg-games__popover-title { flex: 1 1 160px; min-width: 0; margin: 0; font: 700 15.5px/1.3 var(--pc-font); color: var(--pc-ink); overflow-wrap: anywhere; }
.cfg-games__popover-head .cfg-games__tier { flex: 0 0 auto; max-width: 160px; margin-top: 1px; }
.cfg-games__popover .cfg-games__detail { padding: 0; font-size: 13px; line-height: 1.5; background: none; border-top: none; }
.cfg-games__popover .cfg-games__detail dl { display: flex; flex-direction: column; gap: 8px; }
.cfg-games__popover .cfg-games__detail .cfg-games__spec-box {
    display: grid; grid-template-columns: 80px minmax(0, 1fr); align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 6px; background: #fafafa; border: 1px solid var(--pc-line);
}
.cfg-games__popover .cfg-games__detail .cfg-games__spec-value { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.cfg-games__popover .cfg-games__detail .cfg-games__spec-role { font-size: 10px; }
.cfg-games__popover .cfg-games__detail .cfg-games__spec-name { font-size: 13px; }
.cfg-games__popover .cfg-games__detail .cfg-games__spec-rating { margin: 0; font-size: 12px; }
.cfg-games__popover .cfg-games__context {
    margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--pc-line);
    font-size: 11.5px; line-height: 1.45;
}

@media (max-width: 1023px) {
    .pc-listing #cfg-panel-igre[hidden] { display: block !important; }
    .cfg-games { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--pc-line); }
    .cfg-games__popover { display: none !important; }
    .cfg-games__resolutions input { width: 16px; height: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .cfg-games, .cfg-games *, .cfg-sum__tab, .cfg-games__popover { transition: none !important; animation: none !important; }
}

.cfg-games__resolution-advice { display: none; }
.cfg-games__resolutions:has(input[value="4k"]:checked) + .cfg-games__resolution-advice { display: block; }
