/*
 * Component — specifications
 *
 * Collapsed to a fixed height with a fade, expanded by the toggle.
 *
 * The clamp lives in .is-clamped, which JS adds only when the content actually
 * overflows. Without JS the full table is readable — the predecessor clamped in
 * CSS unconditionally, so a JS failure left the list permanently truncated with
 * no way to open it.
 */

.tr-specs {
    position: relative;
    margin-block-start: 40px;
}

.tr-specs__content {
    position: relative;
}

.tr-specs__content.is-clamped {
    max-height: 320px;
    overflow: hidden;
}

.tr-specs__group + .tr-specs__group {
    margin-block-start: 26px;
}

.tr-specs__group-title {
    margin-block-end: 12px;
    font-family: var(--tr-font-ka-head), var(--tr-font-display);
    font-size: 18px;
    line-height: 1.3;
    color: var(--tr-text-strong);
}

.tr-specs__list {
    margin: 0;
}

.tr-specs__row {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding-block: 10px;
    border-block-end: 1px solid rgba(0, 0, 0, 0.08);
}

.tr-specs__row:last-child { border-block-end: 0; }

.tr-specs__name {
    flex: 0 0 42%;
    margin: 0;
    font-size: 14px;
    color: var(--tr-text);
}

.tr-specs__value {
    flex: 1 1 auto;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--tr-text-strong);
}

.tr-specs__row--no-name .tr-specs__value {
    flex-basis: 100%;
    font-weight: 400;
}

/* ── Fade ── */

.tr-specs__fade {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 90px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--tr-white));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tr-specs__content.is-clamped .tr-specs__fade { opacity: 1; }

/* ── Toggle ── */

.tr-specs__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-block-start: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--tr-brand);
}

.tr-specs__toggle:focus-visible {
    outline: 2px solid var(--tr-brand);
    outline-offset: 3px;
}

.tr-specs__toggle-arrow {
    width: 9px;
    height: 9px;
    border-inline-end: 2px solid currentColor;
    border-block-end: 2px solid currentColor;
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 0.2s ease;
}

.tr-specs__toggle[aria-expanded="true"] .tr-specs__toggle-arrow {
    transform: rotate(-135deg) translate(-2px, -2px);
}

@media (max-width: 600px) {
    .tr-specs__row { flex-direction: column; gap: 2px; }
    .tr-specs__name { flex-basis: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .tr-specs__fade,
    .tr-specs__toggle-arrow { transition: none; }
}
