/* Product specs card — Views/Content/_ProductSpecs.cshtml */

.pspec {
    --ps-text: #1f2937;
    --ps-muted: #6b7280;
    --ps-border: #e5e7eb;
    --ps-track: #eef0f4;
    background: #fff;
    border: 1px solid var(--ps-border);
    border-radius: 14px;
    padding: 18px 20px 14px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.pspec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.pspec-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--ps-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pspec-title i { color: var(--tt-accent, #ff6b35); }

.pspec-style {
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.pspec-style-1 { background: #fff1eb; color: #d9531e; }   /* offensive */
.pspec-style-2 { background: #e8f6ee; color: #1e8a4c; }   /* defensive */
.pspec-style-3 { background: #e8eef5; color: #3a6ea5; }   /* all-round */

.pspec-rows {
    display: grid;
    gap: 14px;
}

/* label | value on one line, bar under it */
.pspec-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    row-gap: 6px;
}

.pspec-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pspec-label i {
    width: 16px;
    text-align: center;
    color: var(--ps-muted);
}

.pspec-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--ps-text);
    font-variant-numeric: tabular-nums;
}

.pspec-value small {
    font-size: 12px;
    font-weight: 500;
    color: var(--ps-muted);
}

.pspec-bar,
.pspec-scale { grid-column: 1 / -1; }

.pspec-bar {
    height: 8px;
    border-radius: 4px;
    background: var(--ps-track);
    overflow: hidden;
}

.pspec-bar span {
    display: block;
    height: 100%;
    border-radius: 4px;
    animation: pspec-grow .8s cubic-bezier(.2, .8, .2, 1) both;
    transform-origin: right center;
}

[dir="ltr"] .pspec-bar span { transform-origin: left center; }

.pspec-bar-speed span { background: linear-gradient(90deg, #f7931e, #ff6b35); }
.pspec-bar-spin span { background: linear-gradient(90deg, #6f9bd0, #3a6ea5); }
.pspec-bar-control span { background: linear-gradient(90deg, #48c78e, #1e8a4c); }

@keyframes pspec-grow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* soft -> hard scale */
.pspec-scale-track {
    position: relative;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to left, #dbe6f1, #7f9bb8 55%, #2c3e50);
}

[dir="ltr"] .pspec-scale-track { background: linear-gradient(to right, #dbe6f1, #7f9bb8 55%, #2c3e50); }

.pspec-scale-cut {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    margin-inline-start: -1px;
    background: rgba(255, 255, 255, .85);
}

.pspec-scale-marker {
    position: absolute;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-inline-start: -9px;
    margin-top: -9px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--ps-text);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

.pspec-scale-legend {
    position: relative;
    height: 16px;
    margin-top: 6px;
    font-size: 11px;
    color: var(--ps-muted);
}

.pspec-scale-legend span {
    position: absolute;
    top: 0;
    text-align: center;
    white-space: nowrap;
}

.pspec-level {
    margin-inline-start: 6px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.pspec-level-1 { background: #e6f0fa; color: #3a6ea5; }
.pspec-level-2 { background: #e8edf2; color: #4d6175; }
.pspec-level-3 { background: #e3e7ec; color: #2c3e50; }

.pspec-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--ps-border);
}

.pspec-note {
    margin: 0;
    font-size: 12px;
    color: var(--ps-muted);
}

.pspec-similar {
    font-size: 13px;
    font-weight: 700;
    color: var(--tt-accent, #ff6b35);
    text-decoration: none;
    white-space: nowrap;
}

.pspec-similar:hover { color: var(--tt-accent-dark, #e2541f); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
    .pspec-bar span { animation: none; }
}
