.form-table {
    width: auto !important;
    margin-bottom: 20px !important;
}

.form-table#materials-table input[name^="scw_materials"][name$="[name]"],
.form-table#services-table input[name^="scw_services"][name$="[name]"] {
    width: 350px !important;
    height: 30px !important;
    font-size: 16px !important;
    line-height: 20px !important;
    padding: 5px !important;
    box-sizing: border-box !important;
    border: 2px solid #ff0000 !important;
}

.form-table#materials-table input:not([name$="[name]"]),
.form-table#services-table input:not([name$="[name]"]) {
    width: 90px !important;
    height: 30px !important;
    font-size: 14px !important;
    line-height: 20px !important;
    padding: 5px !important;
    box-sizing: border-box !important;
    border: 2px solid #00cc00 !important;
}

.form-table#materials-table input[type="file"] {
    width: 100px !important;
    height: 100px !important;
    box-sizing: border-box !important;
    border: 2px solid #00cc00 !important;
}

.form-table#services-table button,
.form-table#materials-table button {
    background-color: #cc0000 !important;
    color: #fff !important;
    height: 30px !important;
    line-height: 20px !important;
    padding: 0 10px !important;
    font-size: 14px !important;
    border-radius: 0 !important;
    border: 0 !important;
}

/* Стилі для форми налаштувань віджета */
.scw-color-field {
    width: 100px !important;
    height: 30px !important;
    box-sizing: border-box !important;
}

.form-table select[name="scw_widget_font_size"] {
    width: 100px !important;
    height: 30px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
}

/* Макет фронтенду */
.scw-header .scw-title {
    margin: 0;
    font-weight: bold;
}

.scw-meta {
    white-space: nowrap;
}

.scw-currency-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
}

.scw-currency-switcher .form-check {
    margin-bottom: 0;
}

.scw-currency-switcher .form-check-input {
    margin-top: 0;
}

.scw-currency-switcher .form-check-label {
    font-size: 14px;
    cursor: pointer;
}

.scw-material-section .material-detail,
.scw-layout-section .material-detail,
.scw-services-section .service-total,
.scw-total-section .material-detail {
    margin: 0;
    min-height: 24px; /* Компактний рядок */
}

.scw-material-section .form-label,
.scw-layout-section .form-label,
.scw-services-section .form-label,
.scw-total-section .form-label {
    font-weight: bold;
}

.scw-layout-section input.form-control,
.scw-services-section input.form-control {
    height: 20px; /* Компактне поле введення */
}

.scw-material-section .table,
.scw-services-section .table,
.scw-layout-section .table {
    width: 100%;
}

.scw-material-section .table th,
.scw-material-section .table td,
.scw-services-section .table th,
.scw-services-section .table td,
.scw-layout-section .table td {
    vertical-align: middle;
    padding: 2px 8px; /* Мінімальний відступ */
}

.scw-material-section .material-name-col,
.scw-layout-section .layout-details-col {
    width: 350px; /* Фіксована ширина для матеріалів і макета */
}

.scw-material-section .material-select {
    width: 100%;
}

.scw-material-section .table th:not(.material-name-col),
.scw-material-section .table td:not(:first-child) {
    width: calc((100% - 350px) / 3); /* Рівномірний розподіл колонок */
}

.scw-services-section .service-name-col {
    min-width: 150px; /* Мінімум для уникнення згортання */
    max-width: 400px; /* Максимум для уникнення переповнення */
    width: auto; /* Адаптація до вмісту */
    white-space: nowrap; /* Без переносу тексту */
}

.scw-services-section .table th:not(.service-name-col),
.scw-services-section .table td:not(:first-child) {
    width: calc((100% - min-content) / 4); /* Рівномірний розподіл колонок */
}

.scw-services-section .service-quantity {
    width: 100px;
}

.scw-services-section .scw-services-header tr {
    background-color: #f8f9fa !important; /* Колір заголовка */
}

.scw-services-section .scw-services-header th {
    font-weight: bold !important; /* Жирний шрифт заголовків */
}

.scw-services-section .table tbody tr.service-row.highlighted {
    background-color: #00ff00 !important; /* Зелена підсвітка */
    color: #000000 !important; /* Читабельність тексту */
}

.scw-services-section .table tbody tr.service-row.highlighted-fallback {
    background-color: #ff0000 !important; /* Червоний для тестування */
}

.scw-services-section .table tr {
    height: 24px; /* Компактна висота рядка */
}

.scw-services-section .table input.form-control {
    height: 20px; /* Компактна висота поля */
}

.scw-layout-section .material-image {
    width: 100%;
    height: auto; /* Збереження пропорцій */
}

.scw-layout-section .layout-image-col {
    text-align: center; /* Центрування зображення */
}