.smc-dashboard,
.smc-contenders {
    margin: 1.5rem 0;
}

.smc-balance {
    display: inline-block;
    padding: .5rem .75rem;
    border: 1px solid #d8d8d8;
    border-radius: 4px;
    font-weight: 700;
    background: #f8f8f8;
}

.smc-market-balance {
    margin: 0 0 1rem;
    padding: .65rem .8rem;
    border: 1px solid #d8d8d8;
    border-radius: 4px;
    background: #f8f8f8;
}

.smc-muted {
    color: #666;
    margin-bottom: .5rem;
}

.smc-card-grid .cell {
    margin-bottom: .5rem;
}

.smc-market-filters {
    flex-wrap: wrap;
    margin: 0 0 1rem;
}

.smc-market-sort {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .5rem;
    margin: -.5rem 0 1rem;
}

.smc-market-sort label,
.smc-market-sort select {
    margin-bottom: 0;
}

.smc-market-sort select {
    width: auto;
    min-width: 10rem;
}

.smc-market-filters .button {
    margin-bottom: .35rem;
}

.smc-market-filters .button:not(.hollow) {
    color: #fff;
}

.smc-part-card {
    height: 100%;
}

.smc-list-card-grid .smc-part-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 5rem;
    margin-bottom: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.smc-part-image {
    position: relative;
}

.smc-list-card-grid .smc-part-image {
    flex: 0 0 5.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .85rem .75rem;
    margin-right: .5rem;
    background: #fff;
}

.smc-part-image img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #efefef;
}

.smc-list-card-grid .smc-part-image img {
    width: 3.2rem;
    height: 3.2rem;
    aspect-ratio: 1;
    object-fit: contain;
    background: transparent;
}

.smc-list-card-grid .smc-part-image svg {
    width: 3.25rem;
    height: 3.25rem;
    fill: #050505;
}

.smc-rating-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 7.25rem;
    padding: .25rem .75rem;
    border: 1px solid #cfcfcf;
    border-radius: 999px;
    color: inherit;
    background: #fff;
    font-size: .92rem;
    font-weight: 400;
    line-height: 1.15;
}

.smc-list-card-grid .card-section {
    flex: 1 1 auto;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: stretch;
    padding: .85rem 1rem .85rem .25rem;
}

.smc-part-card h4 {
    margin-bottom: .15rem;
}

.smc-list-card-grid .smc-part-card h4,
.smc-list-card-grid .smc-part-card p,
.smc-list-card-grid .smc-part-specs .smc-stat {
    margin-bottom: 0;
}

.smc-part-content {
    flex: 1 1 auto;
    min-width: 0;
}

.smc-part-heading {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
    margin-bottom: .65rem;
}

.smc-part-heading h4 {
    min-width: 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.25;
}

.smc-type-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.9rem;
    padding: .35rem .9rem;
    border-radius: 999px;
    border: 1px solid #d8d8d8;
    background: #f8f8f8;
    color: inherit;
    font-weight: 700;
    line-height: 1;
}

.smc-type-chassis {
    background: #4f6872;
    border-color: #4f6872;
    color: #fff;
}

.smc-type-engine {
    background: #8a2630;
    border-color: #8a2630;
    color: #fff;
}

.smc-type-radiator {
    background: #2e6f95;
    border-color: #2e6f95;
    color: #fff;
}

.smc-type-gearbox {
    background: #c8a23a;
    border-color: #c8a23a;
    color: #111;
}

.smc-type-supercharger {
    background: #6b4aa0;
    border-color: #6b4aa0;
    color: #fff;
}

.smc-type-complete-car {
    background: #2f704f;
    border-color: #2f704f;
    color: #fff;
}

.smc-part-specs {
    min-width: 0;
}

.smc-part-price {
    white-space: nowrap;
    text-align: right;
    font-weight: 700;
}

.smc-part-side {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: .8rem;
    min-width: 10rem;
}

.smc-part-actions {
    display: flex;
    justify-content: flex-end;
}

.smc-part-card form {
    margin: 0;
}

.smc-list-card-grid .button,
.smc-list-card-grid .button-group,
.smc-list-card-grid .smc-part-actions form {
    margin-bottom: 0;
}

.smc-list-card-grid .button-group {
    justify-content: flex-end;
}

.smc-list-card-grid .button {
    white-space: nowrap;
    min-width: 4.75rem;
}

.smc-list-card-grid .button.secondary {
    background: #f3f3f3;
    border-color: #cfcfcf;
    color: #222;
}

.smc-list-card-grid .button.alert {
    background: #111;
    border-color: #111;
    color: #fff;
}

.smc-stat {
    font-size: .9rem;
}

@media screen and (max-width: 640px) {
    .smc-list-card-grid .smc-part-card {
        align-items: flex-start;
    }

    .smc-list-card-grid .card-section {
        flex-direction: column;
        gap: .75rem;
        padding: .75rem;
    }

    .smc-part-heading {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: .5rem;
    }

    .smc-part-side {
        align-items: flex-start;
        min-width: 0;
    }

    .smc-list-card-grid .button-group {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .smc-part-actions {
        justify-content: flex-start;
    }
}

.smc-disabled-slot {
    opacity: .58;
}

.smc-setup-form {
    margin: 1.25rem 0 2rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.smc-setup-summary {
    min-height: 2.5rem;
    padding: .55rem .8rem;
    border: 1px solid #d8d8d8;
    border-radius: 4px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.smc-save-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.smc-save-row .button {
    margin-bottom: 0;
}

.smc-spec-table th {
    width: 11rem;
}

.smc-contender-row {
    padding: 1rem 0;
    border-bottom: 1px solid #ddd;
}

.smc-contender-row-current {
    margin: 0 -.75rem;
    padding: 1rem .75rem;
    border: 1px solid #8cb6d8;
    border-radius: 4px;
    background: #f0f7fc;
}

.smc-contender-row h3 {
    margin-bottom: .35rem;
}
