/* Стили для модального окна выбора прибора */
.device-selection-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.device-option,
.subtype-option {
    width: 180px;
    height: 130px;
    border: 2px solid #ddd;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px;
}

.device-option:hover,
.subtype-option:hover {
    border-color: #4a90e2;
    background-color: #f0f8ff;
}

.device-option.selected,
.subtype-option.selected {
    border-color: #4a90e2;
    background-color: #e6f2ff;
}

.device-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.device-option.disabled .device-image img {
    filter: grayscale(100%);
}

.device-image {
    width: 60px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.device-image img {
    max-width: 100%;
    max-height: 100%;
}

.device-name {
    font-size: 12px;
    font-weight: bold;
    text-align: center;
}

.subtype-selection {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.subtype-options {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

/* Стили для модального окна (общие) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content-device {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    position: relative;
}

.close-device-selection {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-device-selection:hover {
    color: black;
}

.modal-controls {
    margin-top: 20px;
}

.save-thresholds {
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    display: block;
    margin: 20px auto 0;
}

.save-thresholds:hover {
    background-color: #3a7bc8;
}