/* ── GPU Cloud configurator ── */

.gpu-config {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 1.5rem;
    align-items: start;
}

.gpu-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.gpu-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.gpu-panel-title {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}

.gpu-panel-body {
    padding: 1.25rem;
}

/* ── Filters ── */

.gpu-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.gpu-filters .form-control,
.gpu-filters .form-select {
    font-size: 0.8125rem;
    padding: 0.4rem 0.6rem;
    width: auto;
    min-width: 130px;
}

.gpu-tier-toggle {
    display: inline-flex;
    background: var(--border-light);
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
}

.gpu-tier-toggle button {
    border: 0;
    background: transparent;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.gpu-tier-toggle button.is-active {
    background: #fff;
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

/* ── GPU cards ── */

.gpu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
    gap: 0.75rem;
}

.gpu-tile {
    position: relative;
    text-align: left;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.gpu-tile:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.gpu-tile.is-selected {
    border-color: #f55036;
    box-shadow: 0 0 0 3px rgba(245, 80, 54, 0.14);
}

.gpu-tile[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.gpu-tile-name {
    display: block;
    font-weight: 700;
    font-size: 0.9375rem;
    letter-spacing: -0.015em;
    margin-bottom: 0.35rem;
}

.gpu-tile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.6rem;
}

.gpu-chip {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--border-light);
    color: var(--text-secondary);
    white-space: nowrap;
}

.gpu-chip--vram {
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
}

.gpu-chip--secure {
    background: rgba(34, 197, 94, 0.13);
    color: #16803c;
}

.gpu-chip--value {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.gpu-tile-price {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 1.0625rem;
    letter-spacing: -0.02em;
}

.gpu-tile-price small {
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.gpu-tile-alt {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.gpu-grid-empty {
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ── Config controls ── */

.gpu-field {
    margin-bottom: 1.1rem;
}

.gpu-field:last-child {
    margin-bottom: 0;
}

.gpu-field-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.gpu-field-value {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--text-primary);
}

.gpu-field-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    line-height: 1.45;
}

.gpu-range {
    width: 100%;
    accent-color: #f55036;
}

.gpu-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.gpu-stepper button {
    border: 0;
    background: #fff;
    width: 34px;
    height: 34px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
}

.gpu-stepper button:hover:not([disabled]) {
    background: var(--border-light);
    color: var(--text-primary);
}

.gpu-stepper button[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
}

.gpu-stepper output {
    min-width: 42px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    font-size: 0.9375rem;
}

/* ── Estimate panel ── */

.gpu-estimate {
    position: sticky;
    top: 88px;
}

.gpu-estimate-total {
    padding: 1.1rem 1.25rem;
    background: var(--mkt-dark);
    color: var(--mkt-text-on-dark);
}

.gpu-estimate-total-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.gpu-estimate-total-value small {
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.7;
    letter-spacing: 0;
}

.gpu-estimate-total-sub {
    font-size: 0.8125rem;
    color: var(--mkt-text-muted-on-dark);
    margin-top: 0.2rem;
}

.gpu-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0;
    font-size: 0.8438rem;
}

.gpu-line + .gpu-line {
    border-top: 1px dashed var(--border);
}

.gpu-line-label {
    color: var(--text-secondary);
}

.gpu-line-value {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    white-space: nowrap;
}

.gpu-line--total {
    font-size: 0.9375rem;
    font-weight: 700;
    border-top: 1px solid var(--border);
    margin-top: 0.25rem;
    padding-top: 0.6rem;
}

.gpu-line--total .gpu-line-label {
    color: var(--text-primary);
    font-weight: 700;
}

.gpu-projection {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.gpu-projection div {
    background: var(--border-light);
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
}

.gpu-projection dt {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.gpu-projection dd {
    margin: 0.1rem 0 0;
    font-size: 0.9375rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.gpu-panel .mkt-btn-primary {
    background: var(--text-primary);
    color: #fff;
    box-shadow: none;
    padding: 0.8rem 1.25rem;
    font-size: 0.9rem;
}

.gpu-panel .mkt-btn-primary:hover {
    background: #333;
    color: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

.gpu-budget-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gpu-budget-row .input-group {
    max-width: 140px;
}

.gpu-runway {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ── VRAM fit ── */

.gpu-fit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.gpu-fit-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    background: #fff;
}

.gpu-fit-card dt {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.gpu-fit-card dd {
    margin: 0.2rem 0 0;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.gpu-fit-card span {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* ── Spec table ── */

.gpu-spec-list {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.4rem 1rem;
    font-size: 0.8438rem;
}

.gpu-spec-list dt {
    color: var(--text-muted);
    font-weight: 500;
}

.gpu-spec-list dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

@media (max-width: 991px) {
    .gpu-config {
        grid-template-columns: minmax(0, 1fr);
    }

    .gpu-estimate {
        position: static;
    }
}
