/* =========================================================
   Warm Contour — Tech Card
   File: /local/components/warmcontour/cards/tech.card/style.css
   ========================================================= */


/* ---------- base ---------- */

.wc-tech-card,
.wc-tech-card * {
    box-sizing: border-box;
}

.wc-tech-card {
    width: 100%;
    max-width: 410px;
    min-height: 416px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 20px;
    border-radius: 10px;
    background: #fff;
    color: #111;
    text-decoration: none;
}

.wc-tech-card:focus-visible {
    outline: 2px solid #b30000;
    outline-offset: 2px;
}


/* ---------- head ---------- */

.wc-tech-card__head {
    width: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.wc-tech-card__name{
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wc-tech-card__logo {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
}

.wc-tech-card__logo img {
    max-width: 56px;
    max-height: 56px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

.wc-tech-card__name-value {
    max-width: 170px;
    display: block;
    overflow: hidden;
    color: #111;
    font-size: 17px;
    line-height: 1.15;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ---------- rank icon ---------- */

.wc-tech-card__rank {
    width: 32px;
    height: 32px;
    flex: 0 0 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wc-tech-card__rank img {
    width: 32px;
    height: 32px;
    display: block;
    object-fit: contain;
}


/* Backward compatibility: if old ribbon markup remains */

.wc-tech-card__ribbon {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: transparent;
    font-size: 0;
    line-height: 0;
    text-shadow: none;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.wc-tech-card__ribbon::before,
.wc-tech-card__ribbon::after {
    display: none;
    content: none;
}

.wc-tech-card__ribbon span {
    display: none;
}

.wc-tech-card__ribbon--1 {
    background-image: url('/local/components/warmcontour/portal.main/templates/.default/icons/first.png');
}

.wc-tech-card__ribbon--2 {
    background-image: url('/local/components/warmcontour/portal.main/templates/.default/icons/second.png');
}

.wc-tech-card__ribbon--3 {
    background-image: url('/local/components/warmcontour/portal.main/templates/.default/icons/third.png');
}


/* ---------- KPI stats ---------- */

.wc-tech-card__stats {
    width: 100%;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 5px;
}

.wc-tech-card__stat {
    min-width: 0;
    flex: 1 1 0;
    
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 15px;
    padding: 10px;
    border-radius: 5px;
    background: #f8f9fb;
}

.wc-tech-card__stat span {
    display: block;
    color: #616776;
    font-size: 12px;
    line-height: 1.15;
    font-weight: 500;
}

.wc-tech-card__stat-value {
    display: block;
    color: #000;
    font-size: 16px;
    line-height: 1.15;
    font-weight: 500;
}

.wc-tech-card__stat-value em {
    color: #616776;
    font-style: normal;
    font-weight: 500;
}


/* ---------- rows ---------- */

.wc-tech-card__rows {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.wc-tech-card__row {
    width: 100%;
    min-height: 52px;
    display: grid;
    grid-template-columns: minmax(90px, 1fr) auto auto;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f3f5;
}

.wc-tech-card__row:last-child {
    border-bottom: 0;
}

.wc-tech-card__row span {
    color: #616776;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 500;
}

.wc-tech-card__row-score {
    color: #000;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 500;
}

.wc-tech-card__status {
    min-width: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 11px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1;
    font-style: normal;
    font-weight: 500;
    white-space: nowrap;
}

.wc-tech-card__status--excellent {
    background: #e9f8ef;
    color: #1f7a3a;
}

.wc-tech-card__status--good {
    background: #f0faf2;
    color: #267a34;
}

.wc-tech-card__status--neutral {
    background: #f5f6f8;
    color: #616776;
}

/* Цвета как у отчёта технадзора на странице компании (.pb-tech-report__score--ok/--bad). */
.wc-tech-card__status--ok {
    background: rgba(68, 84, 106, .08);
    color: #44546a;
}

.wc-tech-card__status--bad {
    background: rgba(179, 0, 0, .08);
    color: #b30000;
}


/* ---------- button ---------- */

/* «Подробнее» — .wpa-btn.wpa-btn--block общего слоя (ui.css, 18.11.2026; была тёмно-серой #616776).
   Вся карточка — ссылка, поэтому кнопка светлеет при наведении на карточку. */
.wc-tech-card__button {
    margin-top: auto;
}

.wc-tech-card:hover .wc-tech-card__button {
    background: var(--tc-field-bg-hover, #f1f3f6);
}


/* ---------- responsive ---------- */

@media (max-width: 1500px) {
    .wc-tech-card {
        padding: 18px;
        gap: 18px;
    }

    .wc-tech-card__name {
        max-width: 120px;
    }

    .wc-tech-card__stat {
        padding: 10px 8px;
    }

    .wc-tech-card__stat span {
        font-size: 12px;
    }

    .wc-tech-card__row {
        gap: 10px;
        grid-template-columns: minmax(82px, 1fr) auto auto;
    }
}

@media (max-width: 760px) {
    .wc-tech-card {
        max-width: none;
    }

    .wc-tech-card__name {
        max-width: 190px;
    }
}

/* ---------- brand / company name ---------- */

.wc-tech-card__brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wc-tech-card__name {
    max-width: 170px;
    display: block;
    overflow: hidden;
    color: #111;
    font-size: 17px;
    line-height: 1.12;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1500px) {
    .wc-tech-card__name {
        max-width: 120px;
    }
}

@media (max-width: 760px) {
    .wc-tech-card__name {
        max-width: 190px;
    }
}

/* ---------- 2026-10-26: название целиком, подписи не вылезают ----------
   Название компании — до двух строк (раньше обрезалось многоточием на 120–190 px: «Goodw…»).
   Плитка с цифрой не уже самого длинного слова подписи («Технадзоров» вылезало за край):
   при нехватке места сжимается соседняя, где подпись из нескольких слов; цифры — по низу. */

.wc-tech-card__brand {
    flex: 1 1 auto;
}

.wc-tech-card__name {
    max-width: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow-wrap: anywhere;
    font-weight: 500;
    white-space: normal;
}

.wc-tech-card__stat {
    min-width: auto;
    justify-content: space-between;
    gap: 10px;
}

@media (max-width: 1500px) {
    .wc-tech-card__name {
        max-width: none;
    }
}

@media (max-width: 760px) {
    .wc-tech-card__name {
        max-width: none;
    }
}
