.calculator-container {
    max-width: 100%;
    margin: 0 auto;
}

.form-field {
    margin-bottom: 20px;
}
/* Скрытие label когда отключено отображение названия поля */
.hidden-label {
    display: none !important;
}

/* Для чекбоксов с изображением - особый случай */
.checkbox-field-content .hidden-label {
    display: none;
}

/* Убираем отступы когда label скрыт */
.field-content:has(.hidden-label) input,
.field-content:has(.hidden-label) select {
    margin-top: 0;
}

.checkbox-field-content:has(.hidden-label) {
    min-height: auto;
}
/* Стили для обычных полей с изображением */
.field-with-image {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.field-image {
    flex-shrink: 0;
    width: 80px;
}

.field-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    border: 2px solid #e0e0e0;
}

.field-content {
    flex: 1;
}

.field-content label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.field-content input,
.field-content select {
    width: 100%;
    padding: 12px;
    border: 2px solid #616841;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.field-content input:focus,
.field-content select:focus {
    border-color: #616841;
    outline: none;
}

/* Стили для чекбокса с изображением */
.checkbox-field-with-image {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 5px;
    background: transparent;
}

.checkbox-field-with-image:hover {

}

.checkbox-container {
    position: relative;
    display: flex;
    align-items: center;
}

.checkbox-container input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.custom-checkbox {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: white;
    border: 2px solid #616841;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.custom-checkbox:hover {
    border-color: #005a87;
    background: #f0f8ff;
}

.checkbox-container input[type="checkbox"]:checked + .custom-checkbox {
    background: #616841;
    border-color: #616841;
}

.checkmark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-size: 16px;
    font-weight: bold;
    transition: transform 0.2s ease;
}

.checkbox-container input[type="checkbox"]:checked + .custom-checkbox .checkmark {
    transform: translate(-50%, -50%) scale(1);
}

.checkbox-container input[type="checkbox"]:checked + .custom-checkbox .checkmark::before {
    content: "✓";
}

.checkbox-field-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
}

.checkbox-field-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
}

.checkbox-field-content {
    flex: 1;
}

.checkbox-label-text {
    display: block;
    font-weight: bold;
    color: #333;
    font-size: 16px;
    cursor: pointer;
    margin: 0;
}

.checkbox-label-text:hover {
    color: #616841;
}

/* Общие стили */
.form-field input.error {
    border-color: #ff0000;
}

.required {
    color: #ff0000;
}

.calculate-button {
    background: #616841;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    margin-top: 25px;
    transition: background 0.3s ease;
}

.calculate-button:hover {
    background: none;
}

#calculator-results {
    margin-top: 30px;
    padding: 25px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.chart-container {
    max-width: 400px;
    margin: 10px auto 25px;
}

.chart-container:not(:has(canvas)) {
    display: none;
}

#detailed-results {
    margin-top: 25px;
}

.total-result {
    background: #f0f8ff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #616841;
    font-size: 18px;
    font-weight: bold;
}

.field-results {
    list-style: none;
    padding: 0;
    margin: 0;
}

.field-results li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.field-results li:last-child {
    border-bottom: none;
}

.field-results strong {
    color: #333;
    font-weight: 600;
}

.field-results li.multiplied {
    background-color: #f0f8ff;
    border-left: 3px solid #616841;
    padding-left: 15px;
    font-weight: bold;
}

/* Стили для элементов диаграммы с умножениями */
.chart-container .multiplication-item {
    font-weight: bold;
    color: #616841;
}
/* Стили для радиокнопок */
.radio-field-with-image {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.radio-group.horizontal {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
}

.radio-option {
    display: flex;
    align-items: center;
}

.radio-option input[type="radio"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    margin: 0;
    padding: 5px 0;
}

.radiomark {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #616841;
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.radio-label:hover .radiomark {
    border-color: #005a87;
    background: #f0f8ff;
}

.radio-option input[type="radio"]:checked + .radio-label .radiomark {
    background: #616841;
    border-color: #616841;
}

.radio-option input[type="radio"]:checked + .radio-label .radiomark::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* Адаптивность для горизонтальных радиокнопок */
@media (max-width: 768px) {
    .radio-group.horizontal {
        flex-direction: column;
        gap: 10px;
    }
}

/* Стиль для группы полей с радиокнопками */
.field-group[data-field-type="radio"] {
    border-left: 4px solid #ff6b6b;
}

/* Новые стили для полей без названия */
.field-content:not(:has(label)) input,
.field-content:not(:has(label)) select {
    margin-top: 0;
}

.checkbox-field-content:not(:has(.checkbox-label-text)) {
    min-height: auto;
}

/* Адаптивность для полей без названия */
@media (max-width: 768px) {
    .field-content:not(:has(label)) input,
    .field-content:not(:has(label)) select {
        margin-top: 0;
    }
}