/* ==========================================================================
   База параметров EzCad — стили контентной части.
   Шапка, футер и меню стилизуются темой сайта (epika), здесь только контент.
   Палитра сайта: #fb440e (акцент), #2a2a2a (тёмный), #f5f5f5 (светлый фон).
   ========================================================================== */

/* --- Рекламные блоки (Adfinity, как на maket.laserbiz.ru) ------------------ */
.adfinity_block_16209 {
    margin: 18px 0;
}

.adfinity_block_16209:empty {
    margin: 0;
}

/* --- Обёртка страницы ---------------------------------------------------- */
.ezcad-page {
    padding: 0 0 55px;
}

.ezcad-page .breadcrumbs {
    margin: 0 0 14px;
}

.ezcad-page .breadcrumbs span {
    color: #8a8a8a;
}

.ezcad-page h1.category-name {
    margin: 0 0 12px;
}

.ezcad-lead {
    max-width: 820px;
    margin: 0 0 22px;
    color: #6c6c6c;
    font-size: 15px;
    line-height: 1.55;
}

/* --- Панель с таблицей --------------------------------------------------- */
.ezcad-panel {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
    overflow: hidden;
}

.ezcad-panel-head {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.ezcad-panel-title {
    margin: 0;
    font-family: 'Roboto Condensed', 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    color: #2a2a2a;
    line-height: 1.2;
}

.ezcad-panel-title i {
    color: #fb440e;
    margin-right: 6px;
}

/* поле поиска DataTables, перенесённое в шапку панели */
.ezcad-panel-head .dataTables_filter {
    float: none;
    text-align: left;
    margin: 0;
}

.ezcad-panel-head .dataTables_filter label {
    font-weight: 400;
    color: #8a8a8a;
    font-size: 12.5px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.ezcad-panel-head .dataTables_filter input {
    width: 260px;
    max-width: 100%;
    height: 38px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    font-size: 14px;
    color: #2a2a2a;
    background: #fff;
    box-shadow: none;
    -webkit-transition: border-color .2s;
    transition: border-color .2s;
}

.ezcad-panel-head .dataTables_filter input:focus {
    border-color: #fb440e;
    outline: none;
    box-shadow: 0 0 0 2px rgba(251, 68, 14, .12);
}

/* --- Таблица ------------------------------------------------------------- */
.ezcad-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#ezcadTable.dataTable {
    width: 100% !important;
    margin: 0 !important;
    border-collapse: collapse !important;
    font-size: 14px;
    color: #3a3a3a;
}

#ezcadTable thead th {
    padding: 13px 14px;
    background: #2a2a2a;
    border: none;
    border-bottom: 1px solid #2a2a2a;
    color: #fff;
    font-family: 'Roboto Condensed', 'Roboto', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
    vertical-align: middle;
}

#ezcadTable thead th.col-toggle {
    width: 44px;
    padding-left: 16px;
}

/* убираем штатные картинки сортировки, рисуем свои */
#ezcadTable thead th.sorting,
#ezcadTable thead th.sorting_asc,
#ezcadTable thead th.sorting_desc,
#ezcadTable thead th.sorting_asc_disabled,
#ezcadTable thead th.sorting_desc_disabled {
    background-image: none !important;
    cursor: pointer;
    position: relative;
    padding-right: 26px;
}

#ezcadTable thead th.sorting:after {
    content: '\2195';
    position: absolute;
    right: 10px;
    top: 50%;
    margin-top: -8px;
    font-size: 11px;
    opacity: .45;
}

#ezcadTable thead th.sorting_asc:after {
    content: '\25b2';
    position: absolute;
    right: 10px;
    top: 50%;
    margin-top: -6px;
    font-size: 9px;
    color: #fb440e;
    opacity: 1;
}

#ezcadTable thead th.sorting_desc:after {
    content: '\25bc';
    position: absolute;
    right: 10px;
    top: 50%;
    margin-top: -6px;
    font-size: 9px;
    color: #fb440e;
    opacity: 1;
}

#ezcadTable > tbody > tr > td {
    padding: 11px 14px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
    line-height: 1.45;
}

#ezcadTable tbody tr {
    cursor: pointer;
    -webkit-transition: background-color .15s;
    transition: background-color .15s;
}

#ezcadTable tbody tr:hover {
    background: #fff6f2;
}

#ezcadTable tbody tr.shown {
    background: #fff6f2;
}

#ezcadTable tbody tr.shown td {
    border-bottom-color: #f5d3c5;
}

/* первая колонка — кнопка раскрытия */
#ezcadTable tbody td.details-control {
    width: 44px;
    padding: 11px 14px 11px 16px;
    text-align: center;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    -webkit-user-select: none;
    user-select: none;
}

#ezcadTable tbody td.details-control span.ezcad-toggle {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 21px;
    border-radius: 50%;
    background: #fb440e;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    -webkit-transition: background-color .15s, -webkit-transform .2s;
    transition: background-color .15s, transform .2s;
}

#ezcadTable tbody tr:hover td.details-control span.ezcad-toggle {
    background: #d63808;
}

#ezcadTable tbody tr.shown td.details-control span.ezcad-toggle {
    background: #2a2a2a;
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
}

#ezcadTable tbody td .ezcad-vid {
    font-weight: 600;
    color: #2a2a2a;
}

#ezcadTable tbody td .ezcad-laser {
    color: #8a8a8a;
    font-size: 12.5px;
}

/* --- Раскрытая строка с параметрами -------------------------------------- */
.child-wrapper {
    padding: 16px 18px 14px;
    margin: 4px 0 8px;
    background: #fafafa;
    border: 1px solid #eee;
    border-left: 3px solid #fb440e;
    border-radius: 4px;
    overflow-x: auto;
}

.child-title {
    margin: 0 0 12px;
    font-family: 'Roboto Condensed', 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #2a2a2a;
}

.child-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 13px;
    color: #3a3a3a;
}

.child-table thead th {
    padding: 0 10px 9px;
    border-bottom: 1px solid #e2e2e2;
    background: transparent !important;
    color: #8a8a8a !important;
    font-family: 'Roboto Condensed', 'Roboto', sans-serif;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    white-space: nowrap;
    text-align: left;
    vertical-align: bottom;
}

.child-table tbody td {
    padding: 9px 10px;
    border-bottom: 1px dashed #e6e6e6;
    vertical-align: middle;
}

.child-table tbody tr:last-child td {
    border-bottom: none;
}

.child-table tbody tr:hover td {
    background: #fff;
}

.child-table th:first-child,
.child-table td:first-child {
    padding-left: 0;
}

.child-table th:last-child,
.child-table td:last-child {
    max-width: 260px;
    white-space: normal;
    word-wrap: break-word;
}

.child-table .text-muted {
    color: #b5b5b5;
}

.child-table img.preview-img {
    height: 40px;
    width: auto;
    border: 1px solid #e2e2e2;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    -webkit-transition: border-color .15s;
    transition: border-color .15s;
}

.child-table img.preview-img:hover {
    border-color: #fb440e;
}

.child-table img.type-icon {
    height: 22px;
    width: auto;
    padding: 1px;
    border: 1px solid #e6e6e6;
    border-radius: 3px;
    background: #fff;
    vertical-align: middle;
}

/* --- Подвал таблицы (инфо, пагинация) ------------------------------------ */
.ezcad-panel .dataTables_wrapper {
    padding: 0;
}

.ezcad-panel .ezcad-foot {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: space-between;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 18px;
    border-top: 1px solid #eee;
}

.ezcad-panel .ezcad-foot > div {
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    text-align: center;
}

.ezcad-panel .ezcad-foot .dataTables_length,
.ezcad-panel .ezcad-foot .dataTables_info {
    color: #8a8a8a;
    font-size: 12.5px;
    font-style: normal;
    font-weight: 400;
    white-space: nowrap;
}

.ezcad-panel .ezcad-foot .dataTables_length select {
    height: 32px;
    padding: 2px 6px;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    color: #2a2a2a;
    background: #fff;
    font-size: 13px;
}

.ezcad-panel .dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-block;
    min-width: 34px;
    height: 34px;
    line-height: 32px;
    margin: 0 3px 0 0;
    padding: 0 10px;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    background: #fff;
    color: #555 !important;
    font-size: 13px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    -webkit-transition: background-color .15s, border-color .15s, color .15s;
    transition: background-color .15s, border-color .15s, color .15s;
}

.ezcad-panel .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #2a2a2a;
    border-color: #2a2a2a;
    color: #fff !important;
}

.ezcad-panel .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.ezcad-panel .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #fb440e;
    border-color: #fb440e;
    color: #fff !important;
    font-weight: 600;
}

.ezcad-panel .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.ezcad-panel .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    background: #fff;
    border-color: #eee;
    color: #ccc !important;
    cursor: default;
}

.ezcad-panel .dataTables_wrapper .dataTables_paginate .ellipsis {
    display: inline-block;
    padding: 0 6px;
    color: #aaa;
    line-height: 34px;
}

.ezcad-panel .dataTables_wrapper .dataTables_processing {
    top: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(255, 255, 255, .85);
    color: #2a2a2a;
    font-size: 14px;
    line-height: 200px;
}

/* --- Примечание под таблицей --------------------------------------------- */
.ezcad-note {
    margin: 16px 0 0;
    color: #8a8a8a;
    font-size: 13px;
    line-height: 1.5;
}

.ezcad-note i {
    color: #fb440e;
    margin-right: 5px;
}

/* --- Модальное окно с изображением --------------------------------------- */
.ezcad-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 20px;
    background: rgba(0, 0, 0, .82);
    cursor: zoom-out;
}

.ezcad-modal.is-open {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
}

.ezcad-modal img {
    max-width: 92vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}

.ezcad-modal .ezcad-modal-close {
    position: absolute;
    top: 12px;
    right: 18px;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    opacity: .8;
}

.ezcad-modal .ezcad-modal-close:hover {
    opacity: 1;
}

/* --- Заглушка «загрузка» -------------------------------------------------- */
.ezcad-loading {
    padding: 40px 18px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* --- Адаптив -------------------------------------------------------------- */
@media (max-width: 767px) {
    .ezcad-page {
        padding-bottom: 35px;
    }

    .ezcad-panel-head {
        padding: 14px;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
        flex-direction: column;
        -webkit-align-items: stretch;
        align-items: stretch;
        gap: 10px;
    }

    .ezcad-panel-head .dataTables_filter,
    .ezcad-panel-head .dataTables_filter label {
        width: 100%;
    }

    .ezcad-panel-head .dataTables_filter input {
        width: 100%;
        height: 38px;
    }

    .ezcad-panel-title {
        font-size: 16px;
    }

    #ezcadTable {
        min-width: 640px;
    }

    #ezcadTable thead th,
    #ezcadTable tbody td {
        padding: 10px;
        font-size: 13px;
    }

    .ezcad-panel .ezcad-foot {
        padding: 12px 14px;
        -webkit-justify-content: center;
        justify-content: center;
    }

    .ezcad-panel .ezcad-foot .dataTables_length {
        -webkit-box-flex: 1;
        -webkit-flex: 0 0 100%;
        flex: 0 0 100%;
        text-align: left;
    }
}

@media (max-width: 560px) {
    #ezcadTable th:nth-child(5),
    #ezcadTable td:nth-child(5),
    #ezcadTable th:nth-child(6),
    #ezcadTable td:nth-child(6) {
        display: none;
    }

    #ezcadTable {
        min-width: 420px;
    }
}
