/* TMD-220: VIN-каталог. Цвета - тема сайта blueRedDarkTemplateTheme (синий #1c6cae, красный #dd2518). */

.vc {
    --vc-blue: #1c6cae;
    --vc-blue-dark: #16568b;
    --vc-red: #dd2518;
    --vc-red-dark: #b81f14;
    --vc-text: #1f2328;
    --vc-muted: #6b7280;
    --vc-border: #dde2e8;
    --vc-panel: #eef1f5;
    --vc-row-on: #fdecea;
    color: var(--vc-text);
    font-size: 14px;
    line-height: 1.4;
    margin: 0 0 40px;
}

.vc *, .vc *::before, .vc *::after { box-sizing: border-box; }
.vc-noscroll { overflow: hidden; }
.vc [hidden] { display: none !important; }

/* ---------------- общие элементы */

.vc-title {
    font-size: 24px;
    font-weight: 600;
    margin: 10px 0 18px;
    padding: 0 0 14px 12px;
    border-left: 4px solid var(--vc-red);
    border-bottom: 1px solid var(--vc-border);
    line-height: 1.2;
}

.vc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    padding: 0 18px;
    border-radius: 4px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    white-space: nowrap;
    background: #fff;
    line-height: 1;
}
.vc-btn-danger { background: var(--vc-red); color: #fff !important; }
.vc-btn-danger:hover { background: var(--vc-red-dark); }
.vc-btn-primary { background: var(--vc-blue); color: #fff !important; }
.vc-btn-primary:hover { background: var(--vc-blue-dark); }
.vc-btn-outline { border-color: #c7ced6; color: var(--vc-blue) !important; }
.vc-btn-outline:hover { border-color: var(--vc-blue); }

.vc-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: var(--vc-muted);
    cursor: pointer;
    border-radius: 4px;
    padding: 0;
}
.vc-icon-btn:hover { color: var(--vc-blue); background: rgba(28, 108, 174, .08); }

.vc-link { color: var(--vc-blue) !important; text-decoration: underline; }

.vc-input {
    width: 100%;
    height: 38px;
    border: 1px solid #c7ced6;
    border-radius: 4px;
    padding: 0 12px;
    font-size: 14px;
    background: #fff;
    color: var(--vc-text);
}
.vc-input:focus { outline: none; border-color: var(--vc-blue); box-shadow: 0 0 0 2px rgba(28, 108, 174, .15); }

.vc-input-group { display: flex; width: 100%; }
.vc-input-group .vc-input { border-radius: 4px 0 0 4px; flex: 1 1 auto; min-width: 0; }
.vc-input-group .vc-btn { border-radius: 0 4px 4px 0; flex: 0 0 auto; }

.vc-mono, .vc-vin-input { font-family: "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace; }

.vc-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 28px 0;
    color: var(--vc-muted);
}
.vc-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid #d6dde5;
    border-top-color: var(--vc-blue);
    border-radius: 50%;
    animation: vc-spin .8s linear infinite;
    flex: 0 0 auto;
}
@keyframes vc-spin { to { transform: rotate(360deg); } }

.vc-notice {
    background: #f6f8fa;
    border: 1px solid var(--vc-border);
    border-radius: 6px;
    padding: 16px 18px;
    margin: 6px 0;
}

.vc-placeholder {
    border: 1px dashed #c7ced6;
    border-radius: 6px;
    color: var(--vc-muted);
    padding: 60px 20px;
    text-align: center;
}

.vc-crumbs { color: var(--vc-muted); font-size: 13px; margin: 0 0 4px; }
.vc-crumbs a { color: var(--vc-blue); }
.vc-section-title, .vc-unit-title { font-size: 20px; font-weight: 600; margin: 0 0 14px; }
.vc-code { color: var(--vc-blue); font-weight: 600; }
.vc-unit-title .vc-code { color: var(--vc-muted); }

.vc-oem { color: var(--vc-blue) !important; text-decoration: underline; font-weight: 600; }

.vc-mobile-only { display: none; }

/* ---------------- ввод VIN */

.vc-vin-form { max-width: 580px; }
.vc-vin-input { font-size: 16px; letter-spacing: .04em; height: 42px; }
.vc-vin-form .vc-btn { height: 42px; padding: 0 30px; }
.vc-hint { color: var(--vc-muted); font-size: 13px; margin-top: 8px; }
.vc-hint-error { color: var(--vc-red); }
.vc-search-body { margin-top: 18px; }
.vc-lead { margin: 0 0 12px; }

.vc-vehicle-list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.vc-vehicle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--vc-border);
    border-radius: 6px;
    padding: 14px 16px;
}
.vc-vehicle-row-name { font-size: 16px; font-weight: 600; }
.vc-vehicle-row-params { color: var(--vc-muted); font-size: 13px; margin-top: 4px; }

/* ---------------- шапка автомобиля */

.vc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--vc-panel);
    border-radius: 6px;
    padding: 14px 18px;
    margin: 10px 0 16px;
}
.vc-head-main { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; min-width: 0; }
.vc-head-name { font-size: 20px; font-weight: 600; }
.vc-head-vin { display: flex; align-items: center; gap: 6px; color: var(--vc-muted); font-size: 13px; position: relative; }
.vc-head-vin .vc-mono { color: var(--vc-text); font-size: 14px; letter-spacing: .04em; }
.vc-copy-msg {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 5;
    background: #fff;
    border: 1px solid var(--vc-border);
    border-radius: 4px;
    padding: 6px 10px;
    color: var(--vc-red);
    width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}
.vc-head-actions { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }

/* ---------------- режимы и поиск */

.vc-toolbar { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.vc-modes { display: flex; flex: 0 0 auto; position: relative; }
.vc-mode {
    height: 38px;
    padding: 0 16px;
    border: 1px solid #c7ced6;
    background: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    color: var(--vc-text);
}
.vc-mode:first-child { border-radius: 4px 0 0 4px; }
.vc-mode:nth-child(2) { border-radius: 0 4px 4px 0; border-left: 0; }
.vc-mode.vc-active { background: var(--vc-blue); border-color: var(--vc-blue); color: #fff; }
.vc-mode[aria-disabled="true"] { color: #a7b0ba; cursor: not-allowed; background: #f6f7f9; }
.vc-mode-hint {
    position: absolute;
    top: 44px;
    left: 0;
    z-index: 5;
    width: 280px;
    background: #fff;
    border: 1px solid var(--vc-border);
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}
.vc-part-search { flex: 1 1 auto; }
.vc-field-error { color: var(--vc-red); font-size: 13px; margin-top: 4px; }

/* ---------------- колонки: дерево + содержимое */

.vc-columns { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 20px; align-items: start; }
.vc-search-columns { grid-template-columns: 290px minmax(0, 1fr); }
.vc-search-columns.vc-search-empty { grid-template-columns: minmax(0, 1fr); }
.vc-sidebar { background: var(--vc-panel); border-radius: 6px; padding: 8px; }
.vc-filter { padding: 4px 2px 8px; }
.vc-back { display: none; }

.vc-tree-list { list-style: none; margin: 0; padding: 0; }
.vc-tree-node {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 34px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: var(--vc-text);
    border-radius: 4px;
    padding-top: 6px;
    padding-bottom: 6px;
    padding-right: 8px;
}
.vc-tree-node:hover { background: rgba(28, 108, 174, .08); }
.vc-tree-root > .vc-tree-branch > .vc-tree-node { font-weight: 600; }
.vc-tree-name { flex: 1 1 auto; }
.vc-caret {
    width: 8px;
    height: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
    margin-right: 4px;
    flex: 0 0 auto;
    transition: transform .15s;
}
.vc-open > .vc-tree-node > .vc-caret { transform: rotate(45deg); }
.vc-tree-arrow { display: none; }
.vc-selected > .vc-tree-node { background: var(--vc-blue); color: #fff; }
.vc-tree-empty { padding: 10px; color: var(--vc-muted); }

/* ---------------- карточки узлов */

.vc-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    overflow: hidden;
}
.vc-thumb-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.vc-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--vc-panel);
    color: var(--vc-muted);
    font-size: 13px;
}

.vc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.vc-tile {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--vc-border);
    border-radius: 6px;
    overflow: hidden;
    color: var(--vc-text) !important;
    text-decoration: none !important;
    background: #fff;
}
.vc-tile:hover { border-color: var(--vc-blue); box-shadow: 0 2px 8px rgba(28, 108, 174, .12); }
.vc-tile .vc-thumb { height: 150px; border-bottom: 1px solid var(--vc-border); padding: 8px; }
.vc-tile-title { padding: 10px 12px; font-size: 13px; }
.vc-tile-title b { color: var(--vc-blue); }

.vc-gcard {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 16px;
    border: 1px solid var(--vc-border);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
    background: #fff;
}
.vc-gcard-thumb { height: 120px; border: 1px solid var(--vc-border); border-radius: 4px; }
.vc-gcard-title { display: block; font-size: 15px; font-weight: 600; color: var(--vc-text) !important; text-decoration: none !important; margin-bottom: 6px; }
.vc-gcard-title:hover { color: var(--vc-blue) !important; }
.vc-mini { width: 100%; border-collapse: collapse; }
.vc-mini td { border-top: 1px solid #eef0f3; padding: 7px 6px; vertical-align: top; }
.vc-mini .vc-c-pos { width: 34px; }
.vc-mini .vc-c-oem { width: 110px; }
.vc-mini .vc-c-qty { width: 40px; text-align: right; }
.vc-more-toggle {
    border: 0;
    background: transparent;
    color: var(--vc-blue);
    font-weight: 600;
    cursor: pointer;
    padding: 8px 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.vc-caret-down {
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
}
.vc-more-open .vc-caret-down { transform: rotate(-135deg) translateY(-2px); }
.vc-more { display: none; }
.vc-more-open .vc-more { display: table; }

/* ---------------- поиск внутри автомобиля */

.vc-results { border: 1px solid var(--vc-border); border-radius: 6px; overflow: hidden; }
.vc-result-list { list-style: none; margin: 0; padding: 0; }
.vc-result { padding: 10px 12px; border-top: 1px solid #eef0f3; cursor: pointer; }
.vc-result:first-child { border-top: 0; }
.vc-result:hover { background: #f6f8fa; }
.vc-result.vc-selected { background: var(--vc-row-on); }
.vc-result-name { font-size: 13px; margin-top: 2px; }
.vc-result-unit-name { font-size: 12px; color: var(--vc-muted); margin-top: 2px; }
.vc-results .vc-notice, .vc-results .vc-loading { margin: 0; border: 0; padding: 16px; }

/* ---------------- узел: схема и таблица */

.vc-schema { border: 1px solid var(--vc-border); border-radius: 6px; background: #fff; margin-bottom: 16px; }
.vc-schema-viewport {
    position: relative;
    height: 460px;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
    user-select: none;
}
.vc-schema-viewport.vc-grabbing { cursor: grabbing; }
.vc-schema-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.vc-schema-img { display: block; max-width: none; pointer-events: none; }
.vc-area {
    position: absolute;
    border: 2px solid transparent;
    border-radius: 50%;
    background: transparent;
    padding: 0;
    cursor: pointer;
}
.vc-area:hover { border-color: rgba(28, 108, 174, .7); background: rgba(28, 108, 174, .1); }
.vc-area-on, .vc-area-on:hover { border-color: var(--vc-red); background: rgba(221, 37, 24, .25); box-shadow: 0 0 0 3px rgba(221, 37, 24, .25); }
.vc-schema-tools { display: flex; gap: 8px; justify-content: flex-end; padding: 8px 10px; border-bottom: 1px solid var(--vc-border); }
.vc-schema-tools .vc-btn { height: 34px; padding: 0 12px; font-size: 13px; }

/* страница узла: схема слева, таблица справа */
.vc-unit-page .vc-unit-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.vc-unit-page .vc-schema-holder { position: sticky; top: 16px; }
.vc-unit-page .vc-schema { margin-bottom: 0; }
.vc-unit-parts { position: relative; }
@media (max-width: 1023px) {
    .vc-unit-page .vc-unit-body { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .vc-unit-page .vc-schema-holder { position: static; }
    .vc-unit-page .vc-schema { margin-bottom: 16px; }
}

.vc-popover {
    position: absolute;
    right: 8px;
    z-index: 50;
    width: 340px;
    max-width: calc(100% - 16px);
    background: #fff;
    border: 1px solid var(--vc-border);
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(20, 24, 30, .18);
    padding: 14px 16px;
}
.vc-popover-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.vc-popover .vc-attrs dd { font-weight: 400; }
.vc-popover-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.vc-popover-foot .vc-btn { height: 34px; padding: 0 14px; }

.vc-table-wrap { border: 1px solid var(--vc-border); border-radius: 6px; overflow: hidden; }
.vc-table { width: 100%; border-collapse: collapse; }
.vc-table th { background: var(--vc-panel); text-align: left; font-weight: 600; font-size: 13px; color: var(--vc-muted); padding: 9px 10px; }
.vc-table td { border-top: 1px solid #eef0f3; padding: 9px 10px; vertical-align: middle; cursor: pointer; }
.vc-table tbody tr:hover td { background: #f8f9fb; }
.vc-table tr.vc-row-on td { background: var(--vc-row-on); font-weight: 600; }
.vc-table .vc-c-pos { width: 50px; }
.vc-table .vc-c-oem { width: 150px; }
.vc-table .vc-c-qty { width: 70px; text-align: right; }
.vc-table .vc-c-info { width: 46px; text-align: center; }
.vc-pos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 4px;
    border: 1.5px solid #9aa4af;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 600;
}
.vc-row-on .vc-pos { background: var(--vc-red); border-color: var(--vc-red); color: #fff; }

/* ---------------- окна и боковая панель */

.vc-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(20, 24, 30, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.vc-dialog {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
    color: #1f2328;
    font-size: 14px;
}
.vc-dialog-head { font-size: 18px; font-weight: 600; padding: 18px 20px; border-bottom: 1px solid #dde2e8; }
.vc-dialog-body { padding: 8px 20px; overflow: auto; flex: 1 1 auto; }
.vc-dialog-foot { padding: 14px 20px; border-top: 1px solid #dde2e8; display: flex; justify-content: flex-end; }
.vc-overlay .vc-btn { display: inline-flex; align-items: center; height: 38px; padding: 0 18px; border-radius: 4px; border: 1px solid #c7ced6; background: #fff; color: #1c6cae; font-weight: 600; cursor: pointer; }

.vc-drawer { justify-content: flex-end; padding: 0; }
.vc-drawer .vc-dialog { max-width: 420px; height: 100%; max-height: none; border-radius: 0; }

.vc-attrs { display: grid; grid-template-columns: minmax(120px, 40%) 1fr; margin: 0; }
.vc-attrs dt, .vc-attrs dd { margin: 0; padding: 9px 0; border-bottom: 1px solid #eef0f3; }
.vc-attrs dt { color: #6b7280; padding-right: 12px; }
.vc-attrs dd { font-weight: 600; word-break: break-word; }

.vc-fullscreen { position: fixed; inset: 0; z-index: 10000; background: #fff; display: flex; flex-direction: column; }
.vc-fullscreen-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #1c1e20;
    color: #fff;
    padding: 10px 14px;
    font-size: 14px;
}
.vc-fullscreen-title { flex: 1 1 auto; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-fs-btn { background: transparent; border: 0; color: #fff; cursor: pointer; padding: 6px 10px; font-size: 14px; font-weight: 600; }
.vc-fs-btn:hover { background: rgba(255, 255, 255, .12); border-radius: 4px; }
.vc-fullscreen-body { flex: 1 1 auto; position: relative; }
.vc-fullscreen-body .vc-schema { border: 0; border-radius: 0; margin: 0; height: 100%; }
.vc-fullscreen-body .vc-schema-viewport { height: 100%; }
.vc-fullscreen .vc-area { position: absolute; border: 2px solid transparent; border-radius: 50%; background: transparent; padding: 0; cursor: pointer; }
.vc-fullscreen .vc-area-on { border-color: #dd2518; background: rgba(221, 37, 24, .25); }

/* ---------------- телефон: от 375 пикселей без горизонтальной прокрутки (требование 39) */

@media (max-width: 767px) {
    .vc-title { font-size: 20px; }
    .vc-head { flex-direction: column; align-items: stretch; padding: 14px; }
    .vc-head-main { flex-direction: column; align-items: flex-start; gap: 8px; }
    .vc-head-actions { justify-content: space-between; border-top: 1px solid var(--vc-border); padding-top: 12px; }
    .vc-toolbar { flex-direction: column-reverse; align-items: stretch; gap: 10px; }
    .vc-modes { width: 100%; }
    .vc-mode { flex: 1 1 50%; padding: 0 8px; }

    .vc-columns, .vc-search-columns { display: block; }
    .vc-has-selection .vc-sidebar { display: none; }
    .vc-columns:not(.vc-has-selection) .vc-content { display: none; }
    .vc-search-columns .vc-result-unit { display: none; }
    .vc-sidebar { background: transparent; padding: 0; }
    .vc-tree-node { min-height: 44px; border-bottom: 1px solid #eef0f3; border-radius: 0; }
    .vc-tree-leaf .vc-tree-arrow {
        display: block;
        width: 8px;
        height: 8px;
        border-right: 1.5px solid var(--vc-blue);
        border-bottom: 1.5px solid var(--vc-blue);
        transform: rotate(-45deg);
        flex: 0 0 auto;
    }
    .vc-back {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        border: 0;
        background: transparent;
        color: var(--vc-blue);
        font-weight: 600;
        padding: 6px 0 10px;
        cursor: pointer;
        font-size: 14px;
    }
    .vc-back::before { content: "‹"; font-size: 20px; line-height: 1; }

    .vc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .vc-tile .vc-thumb { height: 120px; }
    .vc-gcard { grid-template-columns: minmax(0, 1fr); }
    .vc-gcard-thumb { height: 160px; }
    .vc-mini .vc-c-oem { width: auto; }

    .vc-schema-viewport { height: 320px; }
    .vc-desktop-only { display: none !important; }

    .vc-mobile-only { display: block; }
    th .vc-mobile-only { display: inline; }
    .vc-table .vc-c-name { display: none; }
    .vc-table .vc-c-oem { width: auto; }
    .vc-table .vc-c-pos { width: 44px; }
    .vc-table .vc-c-qty { width: 54px; }
    .vc-table td { padding: 10px 6px; }
    .vc-mobile-name { font-weight: 400; margin-top: 2px; }

    .vc-vehicle-row { flex-direction: column; align-items: stretch; }
    .vc-drawer .vc-dialog { max-width: none; }
    .vc-overlay:not(.vc-drawer) { padding: 0; align-items: stretch; }
    .vc-overlay:not(.vc-drawer) .vc-dialog { max-width: none; max-height: none; border-radius: 0; }
}
