/* Общие стили для элементов */
.area-item {
    padding: 12px;
    margin-bottom: 5px;
    border: 1px solid #ddd;
    border-bottom: 1px solid #eee; /* Для стилистического единообразия */
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    transition: background-color 0.2s;
}

.area-item:hover {
    background-color: #e9ecef;
}

.area-item:last-child {
    border-bottom: none;
}

.area-item span {
    font-family: monospace;
    color: #495057;
}

/* Кнопки */
.button {
    background-color: #2a6496;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 120px;
    min-height: 40px;
}

.button:hover {
    background-color: #1a4c76;
}

#edit-area, .delete-area {
    display: block;
    margin-bottom: 3px;
    background-color: #00BFFF;
    color: white;
    border: none;
    padding: 0 15px;
    height: 25px;
    line-height: 25px;
    text-align: center;
    cursor: pointer;
    width: 150px; /* Универсальная ширина */
}

#drawButton{background-color: #00BFFF;}

.delete-area {
    background-color: #ff4444;
}

.delete-area:hover {
    background-color: #c82333;
}

#edit-area:hover {
    background-color: #037ba3;
}

/* Дополнительные стили кнопок */
#clearButton {
    background-color: #f44336;
}

#clearButton:hover {
    background-color: #da190b;
}

#confirmArea {
    background-color: #28a745;
    color: #fff;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

#confirmArea:hover {
    background-color: #218838;
}

#cancelArea {
    background-color: #dc3545;
    color: #fff;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#cancelArea:hover {
    background-color: #c82333;
}

/* Контейнер для списка */
#areasList {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 10px;
    background-color: #fff;
}

#areasList p {
    text-align: center;
    color: #6c757d;
    padding: 20px;
    font-style: italic;
}

/* Заголовки */
h3, h4 {
    color: #2a6496;
    margin-bottom: 15px;
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
}

/* Контейнер для инструкций */
.instructions {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
}

.instructions ul {
    margin: 10px 0;
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 5px;
}

/* Контейнер Canvas */
.canvas-container {
    margin-bottom: 20px;
    position: relative;
}

.canvas-container canvas {
    border: 0px solid #eee;
}

.canvas-container .rect {
    fill: rgba(255, 192, 203, 0.3) !important;
    stroke: red !important;
    stroke-width: 2px !important;
}

/* Модальное окно */
.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 {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#areaCoordinates {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    font-family: monospace;
    line-height: 1.4;
}

/* Контейнер управления */
.controls {
    margin-bottom: 20px;
}
