/* ========== ПАНЕЛЬ НАСТРОЕК ОБЛАСТЕЙ (БОКОВОЕ МЕНЮ) ========== */
.layout-settings-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 680px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 2px 0 12px rgba(0,0,0,0.2);
    z-index: 9998;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding: 20px;
    overflow-y: auto;
}

/* Сетка блоков в 2 колонки */
.blocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px; /* Отступ между блоками */
}

.layout-settings-panel.open {
    transform: translateX(0);
}

.layout-control {
    padding: 12px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-width: 300px; /* Минимальная ширина для корректного отображения */
}

.layout-control.pending-changes {
    border-color: #f39c12;
    box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.2);
}

.layout-control-title {
    font-size: 12px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.layout-control-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.width-control {
    display: grid;
    grid-template-columns: 28px 28px 28px;
    align-items: center;
}

.width-step-btn {
    width: 28px;
    height: 32px;
    padding: 0;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    background: #f5f5f5;
    color: #1a1a1a;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.width-input {
    width: 28px;
    text-align: center;
    height: 32px;
    line-height: 28px;
    padding: 0;
    -moz-appearance: textfield;
}

.width-input::-webkit-outer-spin-button,
.width-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.position-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.position-group span {
    font-size: 11px;
    font-weight: 700;
    color: #666;
    white-space: nowrap;
}

.position-grid-small {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 4px;
    justify-content: start;
}

.position-btn-small {
    width: 28px;
    height: 28px;
    padding: 0;
    background: #fff;
    border: 1px solid #1a1a1a;
    border-radius: 0;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    color: #1a1a1a;
    transition: all 0.2s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.position-btn-small:hover {
    background: #f5f5f5;
}

.position-btn-small.active {
    background: #1a1a1a;
    color: #fff;
}

