

/* Start:/local/components/fiamm/battery.cabracks_1.2/templates/.default/style.css?179328304011332*/
/* ============================================================
   Обёртка страницы
   ============================================================ */

.battery-direct {
    max-width: 1400px;
    margin: 20px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #fafafa;
    border-radius: 8px;
}

.rack-cab-select h3 {
    margin: 20px 0 20px;
    font-size: 18px;
    color: #555;
    font-weight: 300;
    text-transform: uppercase;
}

.battery-direct h2 {
    font-size: 18px;
    margin: 24px 0 12px;
}

.battery-direct h3 {
    font-size: 15px;
    margin: 16px 0 8px;
    color: #555;
}

/* ============================================================
   Форма
   ============================================================ */

.direct-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    column-gap: 24px;
    row-gap: 16px;
    margin-bottom: 24px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    grid-auto-flow: column;
}

.direct-form .form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 0;
}

.direct-form .form-row:nth-child(odd)  { grid-column: 1; }
.direct-form .form-row:nth-child(even) { grid-column: 2; }

.direct-form label {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    margin-bottom: 5px;
    min-width: 0;
}

.direct-form select,
.direct-form input[type="number"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 8px 30px 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%23999' d='M0 0l5 6 5-6z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px 6px;
    min-height: 38px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    cursor: pointer;
}

.direct-form input[type="number"] {
    background-image: none;
    padding: 8px 10px;
    cursor: text;
}

.direct-form select:hover,
.direct-form input[type="number"]:hover {
    border-color: #004377;
}

.direct-form select:focus,
.direct-form input[type="number"]:focus {
    outline: none;
    border-color: #004377;
    box-shadow: 0 0 0 2px rgba(0, 67, 119, 0.2);
}

.direct-form .form-actions {
    grid-column: 1 / span 2;
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.direct-form button {
    padding: 10px 24px;
    background: #e21d21;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.direct-form button:hover {
    background: #b71c1c;
}

/* Картинка в 3-й колонке формы */
.direct-form .form-image {
    grid-column: 3;
    grid-row: 1 / span 4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.direct-form .form-image img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

@media (max-width: 1280px) {
    .direct-form {
        grid-template-columns: 1fr 1fr;
    }
    .direct-form .form-image {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .direct-form {
        grid-template-columns: 1fr;
    }
    .direct-form .form-row:nth-child(odd),
    .direct-form .form-row:nth-child(even) {
        grid-column: 1;
    }
    .direct-form .form-actions {
        grid-column: 1;
    }
}

/* ============================================================
   Сообщения
   ============================================================ */

.direct-error {
    background: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-left: 4px solid #e21d21;
    border-radius: 4px;
    margin-bottom: 20px;
}

.direct-no-results {
    background: #fdf0f1;
    padding: 16px 20px;
    border-radius: 5px;
    color: #d21e21;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* ============================================================
   Таблицы
   ============================================================ */

.direct-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 13px;
    margin-bottom: 20px;
}

.direct-table th,
.direct-table td {
    border: 1px solid #e0e0e0;
    padding: 8px 10px;
    text-align: center;
    vertical-align: middle;
}

.direct-table th:first-child,
.direct-table td:first-child {
    text-align: left;
}

.direct-table thead th:first-child {
    text-align: left;
}

.direct-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.direct-table tr:hover {
    background: #fafafa;
}

.direct-table a {
    color: #e21d21;
    text-decoration: none;
    border-bottom: 1px dashed #e21d21;
}

.direct-table .warn {
    color: #b26a00;
    font-size: 12px;
}

.direct-table td.rack-xref {
    color: #888;
    white-space: nowrap;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Ссылка «Детально» */
.detail-link {
    color: #333;
    text-decoration: none;
    border-bottom: 1px dashed #333;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    font-weight: 600;
}

.detail-link:hover {
    color: #e21d21;
    border-bottom-color: #e21d21;
}

/* ============================================================
   Модальное окно
   ============================================================ */

.cabinet-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.cabinet-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
}

.cabinet-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 900px;
    width: 92%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.cabinet-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #eee;
}

.cabinet-modal-header h4 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.cabinet-modal-close {
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #888;
    cursor: pointer;
    padding: 0 6px;
    transition: color 0.2s ease;
}

.cabinet-modal-close:hover {
    color: #e21d21;
}

.cabinet-modal-body {
    padding: 18px 24px 24px;
    overflow-y: auto;
}

body.modal-open {
    overflow: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ============================================================
   Карточки кабинетов / стеллажей
   ============================================================ */

.cabinet-item,
.rack-item {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cabinet-item-name,
.rack-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.cabinet-item-name a {
    color: #e21d21;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: border-color 0.2s ease;
}

.cabinet-item-name a:hover {
    border-bottom-color: #e21d21;
}

.rack-item-name .rack-mode {
    font-weight: 400;
    font-size: 13px;
    color: #777;
    margin-left: 8px;
}

.cabinet-item-details,
.rack-item-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 18px;
    font-size: 13px;
    color: #555;
}

.cabinet-item-details b,
.rack-item-details b {
    color: #333;
    font-weight: 600;
}

.cabinet-empty {
    text-align: center;
    color: #888;
    padding: 20px 0;
    font-size: 14px;
}

.cabinet-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
    background: #f4f4f4;
    color: #555;
}

.cabinet-badge.optimal {
    background: #e6f7ea;
    color: #1e7a3a;
}

.cabinet-scheme-empty {
    text-align: center;
    color: #999;
    font-size: 12px;
    padding: 20px 0;
}

.cabinet-warning {
    margin-top: 10px;
    padding: 8px 12px;
    background: #fff3cd;
    border-left: 3px solid #ffa000;
    border-radius: 4px;
    font-size: 13px;
    color: #7a5c00;
    font-weight: 500;
}

/* Кросс-референс в карточке стеллажа */
.rack-item-xref {
    font-size: 12px;
    color: #888;
    font-weight: 400;
    margin: -4px 0 8px;
    letter-spacing: 0.3px;
    font-family: ui-monospace, Menlo, Consolas, monospace;
}

/* ============================================================
   Схема кабинета — сетка 2×2 (как в основном калькуляторе)
   ============================================================ */

.cabinet-scheme {
    margin: 8px 0 12px;
    padding: 12px 16px;
    background: #fafafa;
    border-radius: 6px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "cabinet shelfA"
        "cabinet shelfB";
    column-gap: 15px;
    row-gap: 0;
    align-items: center;
    justify-items: center;
}

.cabinet-scheme--single {
    grid-template-areas:
        "cabinet shelfA";
    grid-template-rows: auto;
}

.cabinet-scheme-cabinet {
    grid-area: cabinet;
    text-align: center;
    justify-self: center;
    align-self: center;
}

.cabinet-scheme-shelfA { grid-area: shelfA; justify-self: center; }
.cabinet-scheme-shelfB { grid-area: shelfB; justify-self: center; }

@media (max-width: 900px) {
    .cabinet-scheme,
    .cabinet-scheme--single {
        grid-template-columns: 1fr;
        grid-template-areas:
            "cabinet"
            "shelfA"
            "shelfB";
        justify-items: center;
        row-gap: 12px;
    }
}

/* ============================================================
   Схема стеллажа
   ============================================================ */

.rack-section {
    margin-bottom: 24px;
}

.rack-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    padding: 8px 12px;
    background: #f2f6f8;
    border-left: 3px solid #e21d21;
    margin-bottom: 12px;
}

.rack-scheme {
    margin: 8px 0 12px;
    padding: 8px 0;
    background: #fafafa;
    border-radius: 6px;
    display: flex;
    gap: 16px;
    justify-content: space-around;
    flex-wrap: wrap;
    align-items: flex-start;
}

.rack-scheme-block {
    text-align: center;
}

.rack-scheme-block > span {
    display: block;
    font-size: 11px;
    color: #666;
    margin-top: 4px;
}
/* End */
/* /local/components/fiamm/battery.cabracks_1.2/templates/.default/style.css?179328304011332 */
