body {
    font-family: Arial, sans-serif;
}

.alert,
#alertBox {
    transition: opacity 0.5s ease-in-out;
}

/* Only affect alert fade; do not apply to Bootstrap .tab-pane.fade */
.alert.fade,
#alertBox.fade {
    opacity: 0;
}

.menu-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1100;
}

.offcanvas-end {
    width: 250px;
}

.table-container {
    margin-top: 20px;
}

.final-block-details {
    margin-top: 1rem;
}

.final-block-table-wrap {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
}

.final-block-table-wrap table {
    border-collapse: collapse;
    width: 100%;
}

.final-block-table-wrap th,
.final-block-table-wrap td {
    border: 1px solid #dee2e6;
    padding: 0.35rem 0.5rem;
}

.tag-field {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-danger,
.btn-success {
    padding: 5px 10px;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.5;
    border-radius: 0.2rem;
    width: 20rem;
}

.copy-cell-btn,
.copy-sorted-btn.btn-xs {
    width: auto;
    min-width: 2rem;
}

.copy-cell-btn.copy-btn-flash,
.copy-sorted-btn.copy-btn-flash,
.copy-cell-btn.copy-btn-active,
.copy-sorted-btn.copy-btn-active {
    background-color: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

.tooltip-legend .tooltip-inner {
    white-space: pre-line;
    text-align: left;
}

th {
    resize: horizontal;
    overflow: hidden;
    min-width: 50px;
    max-width: 400px;
    white-space: nowrap;
}

.catalog-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    margin-bottom: 20px;
}

/* Блоки #output в одном стиле с каталогом (CssCatalogs): граница, отступы, курсор */
.catalog-item {
    width: 100%;
    padding: 10px 20px;
    border-bottom: 1px solid #e4e4e2;
    box-sizing: border-box;
    background: #fff;
    cursor: pointer;
    transition: background 0.15s;
}

.catalog-item:last-child {
    border-bottom: none;
}

.catalog-item:hover {
    background-color: #f5f5f5;
}

.catalog-title {
    font-size: 16px;
    font-weight: bold;
}

.catalog-description,
.catalog-partnumber {
    font-size: 14px;
}

.catalog-description {
    color: #666;
}

.catalog-partnumber {
    color: #333;
}

.catalog-item.not-found,
.catalog-item.not-found:hover {
    background-color: #f1f1f1;
    border-bottom: 1px solid #e4e4e2;
    cursor: default;
}

.table-light {
    background-color: #f9f9f9;
}

.table-info {
    background-color: #8ab9db;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #dee2e6;
}

.input-focus {
    border: 2px solid #65b0fa;
    background-color: #e7f1ff;
    transition: all 0.3s ease;
}

.block {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.query-layout {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.query-main-col {
    flex: 1 1 auto;
    min-width: 0;
}

.query-delay-col {
    flex: 0 0 auto;
    padding-right: 21px;
}

.query-delay-col .form-control {
    max-width: 120px;
}

.query-row {
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0;
    padding: 0 21px 0 0;
}

.headless-options-inline {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: nowrap;
}

.headless-options-inline .form-check {
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .headless-options-inline {
        flex-wrap: wrap;
    }
}

.spoiler-toggle {
    margin: 10px 0;
    padding: 6px 12px;
    background-color: #e2e2e2;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.spoiler-content {
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
}

/* ------------------ Табличные ряды ------------------ */

.table-container {
    margin-top: 30px;
}

.sorted-names-row {
    font-size: 1.1rem;
    font-weight: bold;
}

.table-sm td, .table-sm th {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
}

.table td, .table th {
    vertical-align: middle;
    text-align: start;
}





.data-row.header {
    padding: 10px 20px;
    width: 100%;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    color: #4a4a4a;
    background-color: #f2efe9;
    box-sizing: border-box;
    z-index: 2;
}

.row-container {
    width: 100%;
}

.row {
    display: flex;
    align-items: flex-end;
    padding: 12px 20px 8px;
    box-sizing: border-box;
    max-width: 100%;
    transition: background 0.2s ease;
    position: relative;
}

.name-container {
    display: flex;
    width: 35%;
    gap: 7px;
    color: #363636;
}

.name-container .art {
    font-weight: bold;
}

.name-container .partno {
    color: gray;
    font-size: 12px;
    line-height: 23px;
}

.row .descr {
    width: 50%;
    max-width: 400px;
    color: #363636;
}

.row .info {
    width: auto !important;
    max-width: none;
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    padding: 3px;
    background: #f5f5f5;
    border-radius: 3px;
    white-space: nowrap;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.row .info span {
    width: 16px;
    height: 16px;
    display: inline-block;
    margin: 3px;
}

.info .appl {
    background-image: url(/static/img/inform10.png);
    background-repeat: no-repeat;
    background-position: -32px 0;
}

/* ------------------ Ссылки ------------------ */

html a {
    text-decoration: none;
    color: #256892;
    transition: background-color 0.3s ease;
}

/* ------------------ подсветка текста в таблице ------------------ */

.sort-arrow {
    margin-left: 5px;
    font-size: 0.8em;
    color: #6c757d;
}

.text-high {
    color: #198754;
}

.text-low {
    color: #dc3545;
}

/* Результаты по источнику: оригинал — зелёный, аналог — чёрный */
.result-original,
.table-container td.result-original,
.table-container .result-original,
.table-container table td.result-original {
    color: #198754;
}

.result-analog,
.table-container td.result-analog,
.table-container .result-analog,
.table-container table td.result-analog {
    color: #212529;
}

/* Плейсхолдеры в полях ввода — приглушённые, чтобы отличаться от введённого текста */
.form-control::placeholder {
    color: #999;
    opacity: 0.65;
}

/* Обёртка контента под спойлером (извлечённый блок разметки с сайта) */
.render-block-spoiler-container {
    max-height: 60vh;
    overflow: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 12px;
    margin-top: 8px;
    background: #fff;
    box-sizing: border-box;
    width: 100%;
}

/* Блок «блок экзист» — по ширине основного контента, контейнер ограничивает float */
.render-block-details {
    width: 100%;
    box-sizing: border-box;
    margin-top: 1rem;
}

/* --------------- Блок каталогов (из docs/CssCatalogs.css) --------------- */
.page-blocks {
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    margin-bottom: 20px;
    border-radius: 3px;
}

.page-blocks h1 {
    margin: 20px;
}

.page-blocks--padding {
    padding: 20px;
}

.page-blocks--padding h1 {
    margin: 0 0 20px 0;
}

#catalogsSection .catalogs,
#notFoundSection .catalogs,
.catalogs {
    margin: 0;
    padding: 0;
    list-style: none;
}

.catalogs li {
    border-bottom: 1px solid #e4e4e2;
    float: left;
    width: 100%;
}

.catalogs li a {
    float: left;
    width: 100%;
    padding: 10px 20px;
    line-height: 30px;
    box-sizing: border-box;
    text-decoration: none;
    cursor: pointer;
}

.catalogs li a:hover {
    background-color: #f5f5f5;
}

.catalogs li a span {
    float: left;
    width: 250px;
}

.catalogs li a dd {
    float: left;
    color: gray;
    margin: 0;
}

.catalog-item--not-found {
    padding: 10px 20px;
    cursor: default;
    background-color: #f1f1f1;
    border: 1px solid #ccc;
}

.catalog-item--not-found:hover {
    background-color: #f1f1f1;
}

@media only screen and (max-width: 850px) {
    .page-blocks--padding {
        padding: 10px;
    }
}

/* Опциональная обёртка каталога (из docs/CssCatalogs.css) */
#cat-wrapper {
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    margin-bottom: 20px;
    border-radius: 3px;
    padding: 20px;
    float: left;
    width: 100%;
}

#cat-wrapper h1 {
    float: left;
    margin: 0 0 20px 0;
}

#cat-wrapper .catalogs {
    margin: 0;
    padding: 0;
}

#cat-wrapper .catalogs li {
    list-style: none;
    border-bottom: 1px solid #e4e4e2;
    float: left;
    width: 100%;
}

#cat-wrapper .catalogs li a {
    float: left;
    width: 100%;
    padding: 10px 20px;
    line-height: 30px;
    box-sizing: border-box;
    text-decoration: none;
    cursor: pointer;
}

#cat-wrapper .catalogs li a:hover {
    background-color: #f5f5f5;
}

#cat-wrapper .catalogs li a span {
    float: left;
    width: 250px;
}

#cat-wrapper .catalogs li a dd {
    float: left;
    color: gray;
    margin: 0;
}


